Your browser seems not to support HTML 5 Canvas!
LOD64
FPS64
Graphics API...

Scalar Field Expression

Constants: 123 (integers), 123.456 (floats), ... etc.
Symbolic constants: phi (golden ratio), pi (π), e (Napier's constant).
Variables: x, y, z
Operators: +, -, *, /, ^
Functions: sin, cos, exp, log, sqrt


Field expression:

dF/dX:

dF/dY:

dF/dZ:

Scalar Field Polygonizing

This is an example on polygonizing scalar field isosurfaces. A scalar field can be thought of as a function of which the domain is an N-dimensional space (3-dimensional space in this case), and the range is a set of scalar (real) values. An isosurface is a surface in the domain space of which every point is mapped to the same scalar value when applying the scalar field function.

To render such a surface, one needs to polygonize it or tessellate it first. One known algorithm for doing that is the marching cubes algorithm.

The algorithm used here is a variant of the marching cubes, called the marching tetrahedra.

For a deeper dive, see this blog post of Paul Bourke's.

Foundational Stuff

I used the following to test the main building blocks:

The Controls / Key Mappings

The following keys change the function of mouse-dragging:

CContour Value
RRotation
ZZoom
HShininess
FFogginess
DLight Direction
LLight Radius

The following keys perform the specified actions:

⬇Reduce level of detail
⬆Increase level of detail
⬅Previous Field
➡Next Field
XExport (two files with the extensions "gltf" and "bin")