A single point in 3-D space, rendered as a viewport-facing dot.
Unlike most line/surface primitives, Dot has a visible default radius; topology dots created internally by other constructors are invisible unless styled.
By default each visible cell gets one flat color sampled at the cell corner. Pass smooth = 1 to color vertices for smooth interpolation, or pass a callable as the fourth argument to use it as the mask while keeping flat colors. color_at receives (pos, [ix, iy]); mask receives pos.
Sample a mesh-producing function over a rectangular field.
mesh_at receives (pos, [ix, iy]); mask receives pos. Calls are batched internally, so this is the preferred way to build repeated arrows/glyphs on a grid.
The image is rendered as a textured upright rectangle in the XY plane. name may be a bundled asset name or a project-relative path resolved by the runtime. Not available in web runtimes yet.
letImage=|name,center=[0,0,0],size=[1,1]|...
name
image asset name or path, relative to the currently invoked scene or library
filename should be a project-relative .svg file path, passed as a string such as "icons/play.svg" rather than pasted raw SVG markup. File imports resolve supported relative SVG references from the SVG file's folder. The importer handles ordinary solid-color fills and strokes best; unsupported SVG features such as gradients, filters, masks, and raster images may be ignored. SVG coordinates are y-down, so imported geometry is flipped into Monocurl's y-up scene space. At scale = 1, 100 SVG units map to 1 scene unit. Not available in web runtimes yet.
letSvg=|filename,scale=1|...
filename
project-relative .svg file path
scale
scene scale where 100 SVG units equal scale scene units
Use Text for literal text. It still returns mesh geometry, so Write, Fade, tag_filter, and styling operators all apply. With the default font = nil, text is rendered through the existing LaTeX backend. Passing a string such as "Arial" uses system-font SVG outlines instead; a .ttf, .otf, .ttc, or .otc path is resolved relative to the scene file. Custom/system/font-file text fonts are not available in web runtimes yet; keep font = nil there. Apply text_tag{...} inside the text argument when only part of the rendered text should be addressable; apply tag{...} outside Text when the whole rendered label should share one identity. String escapes use %, not \: write %" for a quote, %% for a literal percent sign, and LaTeX-style backslashes directly.
letText=|text,scale=1,font=nil|...
text
string/list text fragments; use text_tag{...} on fragments that need stable mesh tags after rendering
font
nil for the existing LaTeX-backed renderer, or a system font family / font file path for direct SVG font outlines
Math text converted through TeX into mesh geometry.
Tex accepts a raw TeX string or a list of string-compatible fragments. Fragments wrapped in text_tag{...} become tagged mesh contours after rendering, which makes individual terms usable with tag_filter, filtered styling, TagTrans, and subset-transfer animations. Raw TeX can also contain \text_tag{1,2}{...} or shorthand wrappers like \tag2{...}. Monocurl strings escape with %, not \, so LaTeX commands can usually be written directly, such as "\frac{a}{b}"; use %% when the string itself needs a percent character.
letTex=|tex,scale=1|...
tex
TeX math fragment, string/list text fragments, or text_tag{...} fragments
Use this when the input needs ordinary LaTeX body structure beyond display math; use Tex for ordinary displayed math. additional_preamble is inserted before \begin{document}, which is useful with the system backend for packages and font setup such as \usepackage{fontspec}. Latex supports the same text tagging markers as Tex, so \text_tag{...}{...}, \tag2{...}, and text_tag{...} fragments all become ordinary mesh tags after rendering. Not available in web runtimes yet; use Text or Tex for browser-compatible MathJax rendering.
Attach tags to text fragments before they become mesh contours.
Use text tags for equation transforms and selective coloring inside Text, Tex, and Latex. The tag can be an integer or a list of integers; the wrapper lowers to the LaTeX \text_tag{...}{...} marker before rendering. The rendered contours from that fragment then carry the requested tag list, just as if they had been tagged with tag{...} after they became meshes. Place text_tag{...} inside the text constructor for fragment-level identity. Place tag{...} outside the text constructor only when the entire rendered text mesh should share one identity. Raw TeX strings can use \text_tag{1,2}{...} or the numbered shorthand \tag2{...} directly. Nested text tags are allowed; the innermost tag owns the overlapping contours.
lettext_tag=operator|target,tag|...
target
string-compatible text fragment to tag before rendering
tag
integer tag or list of integer tags; [] is allowed for an explicitly empty tag list
The label is rendered as text, then placed outside the target in dir while staying centered on the target's orthogonal direction. Pass font as a system font name or font filename to use direct font outlines instead of the default LaTeX renderer.
This is a configuration operator; compose it before Axis1d, Axis2d, or Axis3d. It uses set_default internally, so axis settings interpolate cleanly when the axis is animated.
Three-dimensional coordinate axes, optionally with grid lines.
label_up controls how tick labels and titles are oriented per axis; pass three up vectors when default text orientation is not readable from the active camera.
Sample an implicit 2-D contour around f(x, y) <= 0.
Uses a padded rectangular sign grid and extracts the boundary of the non-positive region as linked stroke loops; increase sample counts for sharper features.
Fill the signed area between two explicit functions.
Returns two tagged filled regions, one for where f is below g and one for where it is above. This is useful for shaded inequalities or visualizing approximation error.
Replace mesh tags, optionally filtered by existing tags.
Tags are stable identities for filters and tag-aware animations. A scalar tag becomes a one-element tag list; a list can give one mesh several identities. Use tag{...} after construction for whole mesh leaves. For text/Tex/LaTeX fragments, prefer text_tag{...} inside the constructor so only the generated contours for that fragment receive the tag.
A scalar or list filter matches leaves containing any requested tag. A predicate filter receives the full tag list for each mesh leaf, not one tag at a time. Tags produced by text_tag{...} are ordinary mesh tags here, so this can select individual text or formula fragments after rendering.
Promote lower-dimensional topology into higher-dimensional topology.
uprank turns point chains into line segments and closed line contours into tessellated filled surfaces. It is useful before operations that expect surfaces, such as extrude, or when a closed outline should become fillable.
Demote higher-dimensional topology into lower-dimensional topology.
downrank turns surfaces into boundary strokes and strokes into endpoint dots. Use it for outlines/wire geometry, or to expose a filled shape's boundary for stroke-only proofs and construction diagrams.
Rewrites line geometry into dash segments while preserving fills and dots in the same mesh tree. A scalar lengths value uses the same dash and gap length.
Keep a mesh fixed relative to the frame while camera changes.
Remaps mesh positions from original_camera to live_camera so the mesh keeps the same apparent screen placement during camera motion. Use this for overlays, labels, and callouts that should not drift while the camera lerps.
Rotate a mesh tree so its local XY plane faces the camera.
Keeps the affected mesh tree's bounding-box center fixed, then interprets each vertex offset from that center in a camera-facing local basis. The local y axis follows the camera up direction projected perpendicular to the view direction, and the local x axis is chosen to preserve a right-handed local frame. Use this for labels, panels, and flat mesh trees that should turn toward the camera without changing their center.
Maps each point p to axis_center + x_unit * p.x + y_unit * p.y + z_unit * p.z, and remaps dot/line normal hints through the same basis. This is commonly used to build graphs in axis coordinates and then embed them into global scene coordinates.
Split a mesh into [matching, non_matching] by tag filter.
Useful for transfer animations and custom progressors that need to move part of a mesh tree. The filter rules match tag_filter, including text tags recovered from Text, Tex, and Latex.
Compute an intermediate Trans morph value between two meshes.
This is the pure value form behind the Trans animation. path_arc bends point paths through circular arcs; pass 0 for straight-line motion or a 3-vector whose direction chooses the arc plane and whose length is the arc angle in radians.