Static Materials with intricate shapes¶
This module contains a (currently rather small) collection of objects with a shape that is more intricate than a basic cuboid.
fdtdx.objects.static_material.Cylinder
¶
Bases: StaticMultiMaterialObject
A cylindrical optical fiber with configurable properties.
This class represents a cylindrical fiber with customizable radius, material, and orientation. The fiber can be positioned along any of the three principal axes.
Attributes:
Name | Type | Description |
---|---|---|
radius |
float
|
The radius of the fiber in meter. |
material |
Material
|
The material properties of the fiber. |
axis |
int
|
The principal axis along which the fiber extends (0=x, 1=y, 2=z). |
partial_voxel_grid_shape |
PartialGridShape3D
|
The shape of the voxel grid in grid units. |
partial_voxel_real_shape |
PartialRealShape3D
|
The shape of the voxel grid in physical units. |
color |
tuple[float, float, float]
|
RGB color tuple for visualization (default=LIGHT_GREY). |
Source code in src/fdtdx/objects/static_material/cylinder.py
horizontal_axis: int
property
¶
Gets the horizontal axis perpendicular to the fiber axis.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
The index of the horizontal axis (0=x or 1=y). |
vertical_axis: int
property
¶
Gets the vertical axis perpendicular to the fiber axis.
Returns:
Name | Type | Description |
---|---|---|
int |
int
|
The index of the vertical axis (1=y or 2=z). |
An object with the shape of a cylinder.