legume.Square

class legume.Square(eps=1, x_cent=0, y_cent=0, a=0)

Square shape

__init__(eps=1, x_cent=0, y_cent=0, a=0)

Create a square shape

Parameters:
  • eps (float) – Permittivity value

  • x_cent (float) – x-coordinate of square center

  • y_cent (float) – y-coordinate of square center

  • a (float) – square edge length

Methods

__init__([eps, x_cent, y_cent, a])

Create a square shape

compute_ft(gvec)

Compute Fourier transform of the polygon

is_inside(x, y)

Elementwise indicator function for the shape

rotate(angle)

Rotate the polygon around its center of mass by angle radians