Repository navigation
Nerves
nerve_mesh builds a named lower-limb nerve. Connected centerlines preserve the sciatic bifurcation and the saphenous branch.

The solids live in extensions/humanoid/skeleton/leg/nerves/. add_leg can draw them with NERVES. See Leg.
This is not a three.js port. See Extensions.
from extensions.humanoid.sex import MALE
from extensions.humanoid.spec import HumanoidSpec
from extensions.humanoid.skeleton.leg.contents import BONES, NERVES
from extensions.humanoid.skeleton.leg.nerves.dimensions import SCIATIC_NERVE
from extensions.humanoid.skeleton.leg.nerves.geometry import nerve_mesh
from units.si import FOOT, Length
var person = HumanoidSpec(Length(6.0, FOOT), MALE)
var sciatic = nerve_mesh(person, SCIATIC_NERVE)side picks RIGHT or LEFT. A right leg is the default.
The solids live in the leg frame. The origin is the tibiofemoral joint line. Plus y is proximal. Plus x is body-right. Plus z is anterior.
The labeled set follows the major adult lower-limb nerve courses.
| Part | Role |
|---|---|
FEMORAL_NERVE |
Beneath the inguinal ligament into the anterior thigh. |
SCIATIC_NERVE |
Posterior gluteal and thigh route to the popliteal-fossa apex. |
TIBIAL_NERVE |
Sciatic branch through the posterior knee and behind the medial malleolus. |
COMMON_FIBULAR_NERVE |
Sciatic branch along biceps femoris and around the fibular neck. |
COMMON_PERONEAL_NERVE |
Compatibility name for COMMON_FIBULAR_NERVE. |
SAPHENOUS_NERVE |
Femoral branch through the adductor canal and medial leg. |
SURAL_NERVE |
Distal-calf union through the posterior calf to the lateral malleolus. |
The sciatic endpoint equals both terminal-branch origins. Its proximal point lies between the ischial and greater-trochanter landmarks.
The femoral field shares its saphenous branch point. The tibial nerve remains posterior to the popliteal vein.
Physical radii drive distance, containment and analytic mass. The mesh alone applies a diagrammatic minimum radius for visibility.
The model truncates at the ankle or fibular neck. It omits plantar, superficial/deep fibular, infrapatellar and foot branches.
nerve_tissue() holds wet density 1.04 g/cm³ as a named adult template. Water fraction is 0.77. Longitudinal modulus is 0.50 MPa. Poisson's ratio is 0.40.
Water fraction is metadata. Mass uses wet density times envelope volume. Do not scale by one minus water fraction again.
These values are named research metadata. This extension does not implement a constitutive model.
- Femoral nerve, StatPearls
- Common fibular nerve, StatPearls
- Tibial nerve and popliteal relations, StatPearls
- Saphenous nerve, StatPearls
- Sural nerve, StatPearls
- Sciatic nerve course and bifurcation
- Lower-extremity nerve cross-sectional areas
from extensions.humanoid.skeleton.leg.nerves.mass import nerve_mass
from units.si import GRAM
var report = nerve_mass(person, SCIATIC_NERVE)
report.mass.to(GRAM)examples/nerves.mojo draws one six foot male right leg. The layers are bones and nerves. It writes out/nerves.png. Run it with:
.venv/bin/mojo run -I . examples/nerves.mojo out/nerves.pngTutorials
How-to
Reference
- Scene graph
- Rotations
- Cameras
- Geometry
- Geometry addons
- Lofts and clipping groups
- Sculptor
- Procedural generators
- Meshes and assets
- Lines
- Points and sprites
- Helpers
- Scene objects
- Animated objects
- Raycasting
- Curves and paths
- Animation
- Skinning
- Materials
- Node materials
- TSL functions
- Lights
- Lighting addons
- Fog
- Textures
- Renderer
- Renderer hooks and material flags
- Rasterization
- GPU backend
- Render target
- Post-processing
- GPU computation
- Compute nodes
- Progressive light map
- Gaussian splats
- Voxel global illumination
- SVG renderer
- Image files
- Image decode queue
- Model files
- More model files
- Exporters
- Scene JSON
- Windowing and controls
- Math
- Norm consumers
- Math addons
- Units
- Coverage tool
- Commands
- Examples
- Benchmarks
- Extensions
- Shared physics
- Physics query snapshots
- Continuous collision
- Tick force restoration
- Water
- Animals
- Buildings
- CARLA
- Femur
- Tibia
- Fibula
- Patella
- Knee
- Muscles
- Vessels
- Lymph
- Nerves
- Integument
- Leg
- Foot
- Pelvis
- Torso
- Arm
- Hand
- Head
- Genome
- Game humanoid
- Humanoid fidelity
- Audio-aligned game faces
- Converted assets
- Mesh quality
- Segment inertia
Explanation
- Software rasterizer
- Scene graph as an array
- Linear color
- Normals are not colors
- Perspective correction
- Fixed-point coverage
- Per-fragment shading
- Mipmaps
- Sorted transparency
- Types and checks
- Render hooks as a trait
- Shared CPU and GPU code
- Bands and threads
- PNG structure
- Extensions beside the port
- CUDA teardown hang
- Mojo compiler hang