legume.Hexagon

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

Hexagon shape

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

Create a hexagon shape

Parameters:
  • eps (float) – Permittivity value

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

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

  • a (float) – hexagon edge length

Methods

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

Create a hexagon 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