NEOLearn

Math examples

The engine's math examples: what each one shows, whether it runs in a browser and the command that runs it.

Updated October 20, 2026

On this page

Primitives, bounding volumes, curves, random sampling and ray casting with the math library. There are 6 examples on this page. For the concepts behind them, see Math.

Run any of them from the engine core's workspace (the folder of the engine source that holds the neo crate's Cargo.toml); see Run an example.

Examples#

ExampleWhat it showsWebRun
Bounding Volume Intersections (2D)Showcases bounding volumes and intersection testsYescargo run --example bounding_2d
Cubic SplinesExhibits different modes of constructing cubic curves using splinesYescargo run --example cubic_splines
Custom PrimitivesDemonstrates how to add custom primitives and useful traits for them.Yescargo run --example custom_primitives
Random SamplingDemonstrates how to sample random points from mathematical primitivesYescargo run --example random_sampling
Rendering PrimitivesShows off rendering for all math primitives as both Meshes and GizmosYescargo run --example render_primitives
Smooth FollowDemonstrates how to make an entity smoothly follow another using interpolationYescargo run --example smooth_follow

See also#