Geometry API
Complete API reference for geometric primitives and shapes in Prismo.
Geometric Shapes
Box
Sphere
Cylinder
Polygon
Composite Structures
GeometryGroup
Usage Examples
Creating Basic Shapes
from prismo.geometry import Box, Cylinder
from prismo.materials import Material
# Silicon waveguide core
si = Material(epsilon=3.48**2)
core = Box(
center=(0, 0, 0),
size=(10e-6, 0.5e-6, 0.22e-6),
material=si,
)
# Cylindrical post
post = Cylinder(
center=(5e-6, 0, 0.5e-6),
radius=0.3e-6,
height=1e-6,
material=si,
axis='z',
)
Combining Shapes
from prismo.geometry import GeometryGroup
# Create a group of structures
waveguide_array = GeometryGroup()
for i in range(5):
wg = Box(
center=(i * 5e-6, 0, 0),
size=(3e-6, 0.5e-6, 0.22e-6),
material=si,
)
waveguide_array.add(wg)
# Add to simulation
sim.add_structure(waveguide_array)
See Also
Simulations - Simulation setup
Materials API - Material definitions
Examples - Geometry examples