-
Notifications
You must be signed in to change notification settings - Fork 0
Implementation
build_shell_mesh()The shell is treated as a record of growth:
- A sequence of elliptical apertures is generated along the logarithmic spiral
- The apertures scale progressively as the shell grows
- Aperture size can be periodically modulated to produce growth ribs
- The final aperture can be enlarged to simulate a mature shell lip flare
- An inner shell surface can be generated to create visible shell wall thickness
- Outer and inner shell surfaces are stitched together into continuous triangular meshes
- Per-vertex colour values are generated to simulate shell pigmentation banding
Each aperture ring represents a moment in the shell’s developmental history.
The shell mesh builder has this structure:
build_shell_mesh()
├── build_aperture_rings()
│ ├── compute_ribbing_factor()
│ ├── compute_lip_factor()
│ ├── compute_inner_axes()
│ ├── pigmentation_band()
│ └── aperture_point()
│
├── stitch_ring_surface()
└── stitch_wall_rim()
build_chamber_septa()Builds curved internal chamber walls (septa) inside the shell.
At intervals along the growth path:
- An existing aperture ring is selected
- Nested interpolated rings are generated inward from the aperture edge
- The centre of the surface is displaced backward along the growth direction
- The resulting geometry forms a shallow concave chamber wall
Older chambers can optionally be rendered darker than newer chambers to emphasise shell growth history.
The septa builder has this structure:
build_chamber_septa()
├── get_aperture_ring()
├── estimate_growth_direction()
├── build_single_septum()
└── stitch_septum_surface()
build_siphuncle_mesh()Builds a simplified siphuncle running through the shell chambers.
The siphuncle is modelled as a small tube that follows the shell’s growth path through the chambered interior.
At each growth stage:
- The centre of an aperture ring is estimated
- The siphuncle position is offset slightly from the chamber centre
- A small circular tube section is generated
- Neighbouring tube sections are stitched into a continuous mesh
This provides a simplified representation of the tube-like structure that connects chambered cephalopod shell compartments.
The siphuncle builder has this structure:
build_siphuncle_mesh()
├── choose_siphuncle_indices()
├── siphuncle_centre_for_ring()
├── build_siphuncle_ring()
└── stitch_tube_rings()
The meshes are rendered using Plotly Mesh3d, allowing:
- Interactive rotation and zooming
- Translucent shell rendering
- Chamber visualisation
- Procedural colour banding
- Shell-like lighting and shading