pyoptics.fdtd.geometry¶
Shapes that make up a structure.
Every shape has a method contains(x[, y]) that takes broadcastable
coordinate arrays and returns a boolean array. Shapes are combined with a
medium in a Simulation’s structure list, where later entries are drawn on
top of earlier ones. Shapes can be added (union) and subtracted
(difference): Circle((0, 0), 2) - Circle((0, 0), 1.5) is a ring.
Classes
Ring between two radii (2D), e.g. a ring resonator. |
|
Disc (2D), the cross section of a cylinder along z. |
|
Points inside a but not inside b. |
|
The whole domain. |
|
Simple polygon (2D, convex or concave) given by its vertices. |
|
Axis-parallel rectangle (2D) given by its centre and size. |
|
Base class: a region of space, defined by contains(). |
|
Layer lo <= coordinate < hi along an axis (0: x, 1: y), unbounded in the other directions. |
|
Points inside any of the shapes. |
- class pyoptics.fdtd.geometry.Shape[source]¶
Bases:
objectBase class: a region of space, defined by contains().
- class pyoptics.fdtd.geometry.Difference(a, b)[source]¶
Bases:
ShapePoints inside a but not inside b.
- class pyoptics.fdtd.geometry.Slab(lo, hi, axis=0)[source]¶
Bases:
ShapeLayer lo <= coordinate < hi along an axis (0: x, 1: y), unbounded in the other directions. Works in 1D and 2D.
- class pyoptics.fdtd.geometry.Rect(center, size)[source]¶
Bases:
ShapeAxis-parallel rectangle (2D) given by its centre and size.
- class pyoptics.fdtd.geometry.Circle(center, radius)[source]¶
Bases:
ShapeDisc (2D), the cross section of a cylinder along z.