Geomatic Function Documentation

Reference documentation for all available geomatic functions and their parameters.

arc

Signature: \arc center radius startAngle endAngle
Input types:
  • center: Point, default value: p0
  • radius: Scalar, default value: 2
  • startAngle: Scalar, default value: 0
  • endAngle: Scalar, default value: 90
Output type: Arc
Autogenerated id: arc{counter} (e.g., arc0)
Auxiliary nodes generated: None
Create an arc with center, radius, and start/end angles.

bezier-cubic

Signature: \bezier-cubic p1 control1 control2 p2
Input types:
  • p1: Point
  • control1: Point
  • control2: Point
  • p2: Point
Output type: BezierCubic
Autogenerated id: bc{counter} (e.g., bc0)
Auxiliary nodes generated: None
Create a cubic Bezier curve from two endpoints and two control points.

bezier-quadratic

Signature: \bezier-quadratic p1 control p2
Input types:
  • p1: Point
  • control: Point
  • p2: Point
Output type: BezierQuadratic
Autogenerated id: bq{counter} (e.g., bq0)
Auxiliary nodes generated: None
Create a quadratic Bezier curve from two endpoints and a control point.

circle

Signature: \circle center radius
Input types:
  • center: Point, default value: p0
  • radius: Scalar, default value: 2
Output type: Circle
Autogenerated id: circ{counter} (e.g., circ0)
Auxiliary nodes generated: None
Create a circle with a center point and radius.

ellipse

Signature: \ellipse center radiusX radiusY rotation
Input types:
  • center: Point, default value: p0
  • radiusX: Scalar, default value: 3
  • radiusY: Scalar, default value: 2
  • rotation: Scalar, default value: 0
Output type: Ellipse
Autogenerated id: ell{counter} (e.g., ell0)
Auxiliary nodes generated: None
Create an ellipse with center, radii, and rotation.

ellipse-from-foci

Signature: \ellipse-from-foci focus1 focus2 stringLength
Input types:
  • focus1: Point
  • focus2: Point
  • stringLength: Scalar
Output type: Ellipse
Autogenerated id: ell{counter} (e.g., ell0)
Auxiliary nodes generated: center, radiusX, radiusY, rotation
Create an ellipse from two foci and a string length.

line

Signature: \line point1 point2
Input types:
  • point1: Point
  • point2: Point
Output type: Line
Autogenerated id: line{counter} (e.g., line0)
Auxiliary nodes generated: None
Create a line from two points.

point

Signature: \point x y
Input types:
  • x: Scalar, default value: 0
  • y: Scalar, default value: 0
Output type: Point
Autogenerated id: p{counter} (e.g., p0)
Auxiliary nodes generated: None
Create a point from x and y coordinates.

scalar

Signature: \scalar value
Input types:
  • value: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Create a scalar value from another scalar.

text

Signature: \text value
Input types:
  • value: Text
Output type: Text
Autogenerated id: text{counter} (e.g., text0)
Auxiliary nodes generated: None
Create a text node with a string value.

triangle

Signature: \triangle vertex1 vertex2 vertex3
Input types:
  • vertex1: Point
  • vertex2: Point
  • vertex3: Point
Output type: Triangle
Autogenerated id: tr{counter} (e.g., tr0)
Auxiliary nodes generated: l_0, l_1, l_2 (Line nodes)
Create a triangle from three vertex points.

angle

Signature: \angle point1 vertex point3
Input types:
  • point1: Point
  • vertex: Point
  • point3: Point
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate the angle at a vertex formed by three points.

area-circle

Signature: \area-circle circle
Input types:
  • circle: Circle
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate the area of a circle.

area-triangle

Signature: \area-triangle triangle
Input types:
  • triangle: Triangle
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate the area of a triangle.

bisect-angle

Signature: \bisect-angle line1 line2
Input types:
  • line1: Line
  • line2: Line
Output type: Line
Autogenerated id: line{counter} (e.g., line0)
Auxiliary nodes generated: midPoint (Point node)
Calculate the angle bisector of two lines that share a point.

centroid

Signature: \centroid triangle
Input types:
  • triangle: Triangle
Output type: Point
Autogenerated id: p{counter} (e.g., p0)
Auxiliary nodes generated: None
Calculate the centroid (geometric center) of a triangle.

circumcenter

Signature: \circumcenter triangle
Input types:
  • triangle: Triangle
Output type: Point
Autogenerated id: p{counter} (e.g., p0)
Auxiliary nodes generated: None
Calculate the circumcenter of a triangle (center of circumscribed circle).

distance

Signature: \distance point1 point2
Input types:
  • point1: Point
  • point2: Point, default value: p0
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate the Euclidean distance between two points.

incenter

Signature: \incenter triangle
Input types:
  • triangle: Triangle
Output type: Point
Autogenerated id: p{counter} (e.g., p0)
Auxiliary nodes generated: None
Calculate the incenter of a triangle (center of inscribed circle).

mid-point

Signature: \mid-point point1 point2
Input types:
  • point1: Point
  • point2: Point
Output type: Point
Autogenerated id: p{counter} (e.g., p0)
Auxiliary nodes generated: None
Calculate the midpoint between two points.

project-point

Signature: \project-point point line
Input types:
  • point: Point
  • line: Line
Output type: Point
Autogenerated id: p{counter} (e.g., p0)
Auxiliary nodes generated: None
Project a point onto a line (find the closest point on the line).

reflect-point

Signature: \reflect-point point line
Input types:
  • point: Point
  • line: Line
Output type: Point
Autogenerated id: p{counter} (e.g., p0)
Auxiliary nodes generated: None
Reflect a point across a line.

slope-of-line

Signature: \slope-of-line line
Input types:
  • line: Line
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate the slope angle of a line (angle between 0 and 2PI).

intersection-circle-circle

Signature: \intersection-circle-circle circle1 circle2
Input types:
  • circle1: Circle
  • circle2: Circle
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: p0, p1 (Point nodes)
Calculate the intersection points of two circles.

intersection-line-bezier-quadratic

Signature: \intersection-line-bezier-quadratic line bezier
Input types:
  • line: Line
  • bezier: BezierQuadratic
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: p0, p1... (Point nodes)
Calculate the intersection points of a line and a quadratic Bezier curve.

intersection-line-circle

Signature: \intersection-line-circle line circle
Input types:
  • line: Line
  • circle: Circle
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: p0, p1 (Point nodes)
Calculate the intersection points of a line and a circle.

intersection-line-ellipse

Signature: \intersection-line-ellipse line ellipse
Input types:
  • line: Line
  • ellipse: Ellipse
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: p0, p1 (Point nodes)
Calculate the intersection points of a line and an ellipse.

intersection-line-line

Signature: \intersection-line-line line1 line2
Input types:
  • line1: Line
  • line2: Line
Output type: Point
Autogenerated id: p{counter} (e.g., p0)
Auxiliary nodes generated: None
Calculate the intersection point of two lines.

clear-trail

Signature: \clear-trail trailId
Input types:
  • trailId: Any
Output type: Dummy
Autogenerated id: dummy{counter} (e.g., dummy0)
Auxiliary nodes generated: None
Clear the accumulated history of a trail node.

evaluate-polynomial

Signature: \evaluate-polynomial polynomial x
Input types:
  • polynomial: Polynomial
  • x: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Evaluate a polynomial at a given x.

plot

Signature: \plot x y
Input types:
  • x: Scalar
  • y: Scalar
Output type: Plot
Autogenerated id: plot{counter} (e.g., plot0)
Auxiliary nodes generated: SVG path data
Plot y vs x over the visible canvas range.

plot-inverse

Signature: \plot-inverse x y
Input types:
  • x: Scalar
  • y: Scalar
Output type: Plot
Autogenerated id: plot{counter} (e.g., plot0)
Auxiliary nodes generated: None
Plot the output along x while sweeping the independent variable down the y-axis (e.g. x = f(y))

polynomial

Signature: \polynomial a0...
Input types:
  • a0: Scalar (variadic)
Output type: Polynomial
Autogenerated id: polynomial{counter} (e.g., polynomial0)
Auxiliary nodes generated: None
Create a polynomial function from coefficients.

trail

Signature: \trail pointId...
Input types:
  • pointId: Any (variadic)
Output type: Trail
Autogenerated id: trail{counter} (e.g., trail0)
Auxiliary nodes generated: accumulated history points
Track the path of a point as its parameters change.

convex-hull

Signature: \convex-hull point1 point2...
Input types:
  • point1: Point
  • point2: Point (variadic)
Output type: Polygon
Autogenerated id: poly{counter} (e.g., poly0)
Auxiliary nodes generated: l_0...l_n (Line nodes)
Calculate the convex hull of a set of points using the Graham scan algorithm.

polygon

Signature: \polygon vertex1 vertex2 vertex3...
Input types:
  • vertex1: Point
  • vertex2: Point
  • vertex3: Point (variadic)
Output type: Polygon
Autogenerated id: poly{counter} (e.g., poly0)
Auxiliary nodes generated: l_0...l_n (Line nodes)
Create a polygon from three or more vertex points.

polygon-from-side

Signature: \polygon-from-side a b n
Input types:
  • a: Point
  • b: Point
  • n: Scalar, default value: 6
Output type: Polygon
Autogenerated id: poly{counter} (e.g., poly0)
Auxiliary nodes generated: p_2...p_(n-1) (Point nodes), l_0...l_(n-1) (Line nodes)
Create a regular polygon from two points forming one side and the number of sides.

polyline

Signature: \polyline point1 point2...
Input types:
  • point1: Point
  • point2: Point (variadic)
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None

rectangle

Signature: \rectangle bottomLeft width height angle
Input types:
  • bottomLeft: Point, default value: p0
  • width: Scalar, default value: 3
  • height: Scalar, default value: 2
  • angle: Scalar, default value: 0
Output type: Polygon
Autogenerated id: poly{counter} (e.g., poly0)
Auxiliary nodes generated: p1, p2, p3 (Point nodes), l_0...l_3 (Line nodes)
Create a rectangle from a bottom-left corner, width, height, and rotation angle.

regular-polygon

Signature: \regular-polygon center radius numVertices startAngle
Input types:
  • center: Point, default value: p0
  • radius: Scalar, default value: 2
  • numVertices: Scalar, default value: 6
  • startAngle: Scalar, default value: 0
Output type: RegularPolygon
Autogenerated id: repo{counter} (e.g., repo0)
Auxiliary nodes generated: p_0...p_n (Point nodes), l_0...l_n (Line nodes)
Create a regular polygon with center, radius, number of vertices, and start angle.

square

Signature: \square bottomLeft side angle
Input types:
  • bottomLeft: Point, default value: p0
  • side: Scalar, default value: 2
  • angle: Scalar, default value: 0
Output type: Polygon
Autogenerated id: poly{counter} (e.g., poly0)
Auxiliary nodes generated: p1, p2, p3 (Point nodes), l_0...l_3 (Line nodes)
Create a square from a bottom-left corner, side length, and rotation angle.

tangent

Signature: \tangent curve x length
Input types:
  • curve: Any
  • x: Scalar
  • length: Scalar, default value: 2
Output type: Line
Autogenerated id: line{counter} (e.g., line0)
Auxiliary nodes generated: p1, p2 (endpoints of tangent line)
Draw a tangent line to a curve at a given x coordinate.

acos

Signature: \acos a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate arccosine of a scalar value (returns radians).

asin

Signature: \asin a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate arcsine of a scalar value (returns radians).

atan

Signature: \atan a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate arctangent of a scalar value (returns radians).

atan2

Signature: \atan2 a b
Input types:
  • a: Scalar
  • b: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate arctangent of y/x (returns radians).

ceil

Signature: \ceil a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Round up to nearest integer.

cos

Signature: \cos a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate cosine of a scalar value (in radians).

deg2rad

Signature: \deg2rad a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Convert degrees to radians.

floor

Signature: \floor a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Round down to nearest integer.

log10

Signature: \log10 a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate base-10 logarithm of a scalar value.

max

Signature: \max a b...
Input types:
  • a: Scalar
  • b: Scalar (variadic)
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Return maximum of two or more scalar values.

min

Signature: \min a b...
Input types:
  • a: Scalar
  • b: Scalar (variadic)
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Return minimum of two or more scalar values.

mod

Signature: \mod a b
Input types:
  • a: Scalar
  • b: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate modulo (remainder) of first scalar divided by second.

rad2deg

Signature: \rad2deg a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Convert radians to degrees.

reciprocal

Signature: \reciprocal a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate reciprocal (1/x) of a scalar value.

relu

Signature: \relu a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Apply ReLU activation function (max(0, x)).

round

Signature: \round a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Round to nearest integer.

sigmoid

Signature: \sigmoid a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Apply sigmoid activation function (1 / (1 + e^(-x))).

sign

Signature: \sign a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Return sign of a scalar (-1, 0, or 1).

sin

Signature: \sin a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate sine of a scalar value (in radians).

tan

Signature: \tan a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Calculate tangent of a scalar value (in radians).

tanh

Signature: \tanh a
Input types:
  • a: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Apply hyperbolic tangent activation function.

x-coord

Signature: \x-coord point
Input types:
  • point: Point
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Extract the x-coordinate from a point.

y-coord

Signature: \y-coord point
Input types:
  • point: Point
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Extract the y-coordinate from a point.

arg

Signature: \arg z
Input types:
  • z: Complex
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Argument (phase angle) of a complex number, in radians

complex

Signature: \complex re im
Input types:
  • re: Scalar
  • im: Scalar
Output type: Complex
Autogenerated id: z{counter} (e.g., z0)
Auxiliary nodes generated: None
Construct a complex number from real and imaginary parts

conj

Signature: \conj z
Input types:
  • z: Complex
Output type: Complex
Autogenerated id: z{counter} (e.g., z0)
Auxiliary nodes generated: None
Complex conjugate (re - im·i)

fft

Signature: \fft array
Input types:
  • array: Array
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: el_0...el_n (Complex nodes)
Compute the fast Fourier transform of an array of scalars (any length).

ifft

Signature: \ifft array
Input types:
  • array: Array
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: el_0...el_n (Complex nodes)
Compute the inverse fast Fourier transform of an array (inverse of fft).

imag

Signature: \imag z
Input types:
  • z: Complex
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Extract the imaginary part of a complex number

real

Signature: \real z
Input types:
  • z: Complex
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Extract the real part of a complex number

arange

Signature: \arange start end step
Input types:
  • start: Scalar, default value: 0
  • end: Scalar, default value: 5
  • step: Scalar, default value: 1
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Create an array of Scalar values from start (inclusive) to end (exclusive) with a given step size

circular-arange

Signature: \circular-arange n r
Input types:
  • n: Scalar, default value: 10
  • r: Scalar, default value: 1
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Create an array of n uniformly spaced points on a circle of radius r

cumsum

Signature: \cumsum array
Input types:
  • array: Array
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Compute the cumulative sum of an array of scalars

linspace

Signature: \linspace start end n
Input types:
  • start: Scalar, default value: 0
  • end: Scalar, default value: 1
  • n: Scalar, default value: 10
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: el_0...el_n (Scalar nodes)
Create an array of evenly spaced values.

ones

Signature: \ones n
Input types:
  • n: Scalar, default value: 1
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Create a 1-D array of n Scalar elements all equal to 1

ones-like

Signature: \ones-like array
Input types:
  • array: Array
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Create an array of Scalar elements all equal to 1, matching the shape of the input array

reduce-max

Signature: \reduce-max array dim
Input types:
  • array: Array
  • dim: Scalar, default value: -1
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Find the maximum element in an array.

reduce-mean

Signature: \reduce-mean array dim
Input types:
  • array: Array
  • dim: Scalar, default value: -1
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Compute the mean of elements in an array of scalars, optionally along a dimension

reduce-min

Signature: \reduce-min array dim
Input types:
  • array: Array
  • dim: Scalar, default value: -1
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Find the minimum element in an array.

reduce-std

Signature: \reduce-std array dim
Input types:
  • array: Array
  • dim: Scalar, default value: -1
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Compute the standard deviation of elements in an array of scalars, optionally along a dimension

reduce-sum

Signature: \reduce-sum array dim
Input types:
  • array: Array
  • dim: Scalar, default value: -1
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Sum elements of an array.

reduce-var

Signature: \reduce-var array dim
Input types:
  • array: Array
  • dim: Scalar, default value: -1
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Compute the variance of elements in an array of scalars, optionally along a dimension

reshape

Signature: \reshape array dim...
Input types:
  • array: Array
  • dim: Scalar (variadic)
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Reshape an array into a new N-dimensional shape

softmax

Signature: \softmax array
Input types:
  • array: Array
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Apply softmax function to an array of scalars

zeros

Signature: \zeros n
Input types:
  • n: Scalar, default value: 1
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Create a 1-D array of n Scalar elements all equal to 0

zeros-like

Signature: \zeros-like array
Input types:
  • array: Array
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Create an array of Scalar elements all equal to 0, matching the shape of the input array

array

Signature: \array element1...
Input types:
  • element1: Any (variadic)
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Create an array of elements of the same type.

get-array-element

Signature: \get-array-element array index
Input types:
  • array: Array
  • index: Scalar
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Get an element from an array by index.

animate

Signature: \animate s animateTo
Input types:
  • s: Scalar
  • animateTo: Scalar
Output type: Scalar
Autogenerated id: num{counter} (e.g., num0)
Auxiliary nodes generated: None
Animate a value over time.

rotate

Signature: \rotate obj center angle
Input types:
  • obj: Any
  • center: Point
  • angle: Scalar
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Rotate a point or set of points around a center.

translate

Signature: \translate obj dx dy
Input types:
  • obj: Any
  • dx: Scalar
  • dy: Scalar
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Translate a point or set of points.

translate-array

Signature: \translate-array array dx dy
Input types:
  • array: Array
  • dx: Scalar
  • dy: Scalar
Output type: Array
Autogenerated id: arr{counter} (e.g., arr0)
Auxiliary nodes generated: None
Translate an array of geometric objects by dx and dy (imperative)

backprop

Signature: \backprop id
Input types:
  • id: Any
Output type: Dummy
Autogenerated id: dummy{counter} (e.g., dummy0)
Auxiliary nodes generated: None
Run autodiff backpropagation from a target node.

gradient-descent-step

Signature: \gradient-descent-step id...
Input types:
  • id: Any (variadic)
Output type: Dummy
Autogenerated id: dummy{counter} (e.g., dummy0)
Auxiliary nodes generated: None
Perform gradient descent on a parameter.

minimize

Signature: \minimize value num-iterations
Input types:
  • value: Any
  • num-iterations: Any
Output type: Dummy
Autogenerated id: dummy{counter} (e.g., dummy0)
Auxiliary nodes generated: None
Minimize a scalar value using gradient descent for N iterations

param

Signature: \param id...
Input types:
  • id: Any (variadic)
Output type: Dummy
Autogenerated id: dummy{counter} (e.g., dummy0)
Auxiliary nodes generated: None
Register parameters for autodiff backpropagation.

partial

Signature: \partial target param
Input types:
  • target: Scalar
  • param: Any
Output type: Any
Autogenerated id: any{counter} (e.g., any0)
Auxiliary nodes generated: None
Partial derivative ∂target/∂param of a scalar target w.r.t. a Scalar or Point variable, or element-wise over an Array of them (reactive)

reevaluate

Signature: \reevaluate id
Input types:
  • id: Any
Output type: Dummy
Autogenerated id: dummy{counter} (e.g., dummy0)
Auxiliary nodes generated: None
Re-evaluate a node using current dependency values and snapshot the result into the store

vector-field

Signature: \vector-field xId yId
Input types:
  • xId: Any
  • yId: Any
Output type: VectorField
Autogenerated id: vf{counter} (e.g., vf0)
Auxiliary nodes generated: arrows (Vector data)
Vector field from a scalar gradient (y: Scalar) or direct R²→R² map (y: Point).

zero-grad

Signature: \zero-grad
Input types:
    Output type: Dummy
    Autogenerated id: dummy{counter} (e.g., dummy0)
    Auxiliary nodes generated: None
    Zero out gradients for all autodiff parameters.

    and

    Signature: \and values...
    Input types:
    • values: Bool (variadic)
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Returns true if all inputs are true

    bin-to-dec-ones-complement

    Signature: \bin-to-dec-ones-complement value
    Input types:
    • value: Text
    Output type: Scalar
    Autogenerated id: num{counter} (e.g., num0)
    Auxiliary nodes generated: None
    Interpret a binary string as a one's complement signed integer

    bin-to-dec-twos-complement

    Signature: \bin-to-dec-twos-complement value
    Input types:
    • value: Text
    Output type: Scalar
    Autogenerated id: num{counter} (e.g., num0)
    Auxiliary nodes generated: None
    Interpret a binary string as a two's complement signed integer

    bin-to-dec-unsigned

    Signature: \bin-to-dec-unsigned value
    Input types:
    • value: Text
    Output type: Scalar
    Autogenerated id: num{counter} (e.g., num0)
    Auxiliary nodes generated: None
    Interpret a binary string as an unsigned integer

    bool

    Signature: \bool value
    Input types:
    • value: Any
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Convert a value to a boolean based on its truthiness

    eq

    Signature: \eq a b
    Input types:
    • a: Scalar
    • b: Scalar
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Returns true if a == b

    filter

    Signature: \filter array mask
    Input types:
    • array: Array
    • mask: Array
    Output type: Array
    Autogenerated id: arr{counter} (e.g., arr0)
    Auxiliary nodes generated: None
    Filter an array by a boolean mask. The mask must broadcast with the array, with exactly one non-broadcast axis specifying which indices to keep.

    fp-to-bin

    Signature: \fp-to-bin value nBits
    Input types:
    • value: Scalar
    • nBits: Scalar, default value: 32
    Output type: Text
    Autogenerated id: text{counter} (e.g., text0)
    Auxiliary nodes generated: None
    Convert a scalar to its IEEE 754 floating-point binary string (16, 32 or 64 bits)

    ge

    Signature: \ge a b
    Input types:
    • a: Scalar
    • b: Scalar
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Returns true if a >= b

    gt

    Signature: \gt a b
    Input types:
    • a: Scalar
    • b: Scalar
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Returns true if a > b

    int-to-bin

    Signature: \int-to-bin value nBits useTwosComplement
    Input types:
    • value: Scalar
    • nBits: Scalar, default value: 8
    • useTwosComplement: Bool, default value: T
    Output type: Text
    Autogenerated id: text{counter} (e.g., text0)
    Auxiliary nodes generated: None
    Convert a scalar to its integer binary string (two's or one's complement) over a fixed bit width

    le

    Signature: \le a b
    Input types:
    • a: Scalar
    • b: Scalar
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Returns true if a <= b

    lt

    Signature: \lt a b
    Input types:
    • a: Scalar
    • b: Scalar
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Returns true if a < b

    not

    Signature: \not value
    Input types:
    • value: Bool
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Returns the logical negation of a boolean value

    or

    Signature: \or values...
    Input types:
    • values: Bool (variadic)
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Returns true if any input is true

    uint-to-bin

    Signature: \uint-to-bin value nBits
    Input types:
    • value: Scalar
    • nBits: Scalar, default value: 8
    Output type: Text
    Autogenerated id: text{counter} (e.g., text0)
    Auxiliary nodes generated: None
    Convert an unsigned non-negative integer to its binary string over a fixed bit width

    xor

    Signature: \xor a b
    Input types:
    • a: Bool
    • b: Bool
    Output type: Bool
    Autogenerated id: bool{counter} (e.g., bool0)
    Auxiliary nodes generated: None
    Returns true if exactly one of the two inputs is true

    clear

    Signature: \clear
    Input types:
      Output type: Dummy
      Autogenerated id: dummy{counter} (e.g., dummy0)
      Auxiliary nodes generated: None
      Clear all nodes from state and canvas.

      copy

      Signature: \copy node
      Input types:
      • node: Any
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Create an independent copy of a geometric node

      help

      Signature: \help id
      Input types:
      • id: Any
      Output type: Dummy
      Autogenerated id: dummy{counter} (e.g., dummy0)
      Auxiliary nodes generated: None
      Show properties of a node.

      hide

      Signature: \hide id...
      Input types:
      • id: Any (variadic)
      Output type: Dummy
      Autogenerated id: dummy{counter} (e.g., dummy0)
      Auxiliary nodes generated: None
      Hide a node from rendering.

      highlight

      Signature: \highlight id...
      Input types:
      • id: Any (variadic)
      Output type: Dummy
      Autogenerated id: dummy{counter} (e.g., dummy0)
      Auxiliary nodes generated: None
      Highlight an element.

      remove

      Signature: \remove id...
      Input types:
      • id: Any (variadic)
      Output type: Dummy
      Autogenerated id: dummy{counter} (e.g., dummy0)
      Auxiliary nodes generated: None
      Remove a node and all its dependencies.

      set-fill

      Signature: \set-fill node fill
      Input types:
      • node: Any
      • fill: Text
      Output type: Dummy
      Autogenerated id: dummy{counter} (e.g., dummy0)
      Auxiliary nodes generated: None
      Set the fill color of a node.

      set-stroke

      Signature: \set-stroke node stroke
      Input types:
      • node: Any
      • stroke: Text
      Output type: Dummy
      Autogenerated id: dummy{counter} (e.g., dummy0)
      Auxiliary nodes generated: None
      Set the stroke color of a node.

      show

      Signature: \show id...
      Input types:
      • id: Any (variadic)
      Output type: Dummy
      Autogenerated id: dummy{counter} (e.g., dummy0)
      Auxiliary nodes generated: None
      Show a previously hidden node.

      eval-ode

      Signature: \eval-ode trajectory t
      Input types:
      • trajectory: Trajectory
      • t: Scalar
      Output type: Point
      Autogenerated id: p{counter} (e.g., p0)
      Auxiliary nodes generated: None
      Point (t, y(t)) on an ODE trajectory at time t (interpolated)

      flow

      Signature: \flow point out p0 t1 steps
      Input types:
      • point: Point
      • out: Any
      • p0: Point
      • t1: Scalar
      • steps: Scalar, default value: 200
      Output type: Trajectory
      Autogenerated id: de{counter} (e.g., de0)
      Auxiliary nodes generated: None
      Integrate dp/dt = F(p) through a 2D vector field and draw the trajectory

      simulate-sde

      Signature: \simulate-sde t x drift diffusion x0 t1 steps seed
      Input types:
      • t: Scalar
      • x: Scalar
      • drift: Any
      • diffusion: Any
      • x0: Scalar
      • t1: Scalar
      • steps: Scalar, default value: 200
      • seed: Scalar, default value: -1
      Output type: Trajectory
      Autogenerated id: de{counter} (e.g., de0)
      Auxiliary nodes generated: None
      Simulate dX = a(t,X) dt + b(t,X) dW (Euler–Maruyama) and draw the sample path

      solve-ode

      Signature: \solve-ode t y dydt y0 t1 steps
      Input types:
      • t: Scalar
      • y: Scalar
      • dydt: Any
      • y0: Scalar
      • t1: Scalar
      • steps: Scalar, default value: 200
      Output type: Trajectory
      Autogenerated id: de{counter} (e.g., de0)
      Auxiliary nodes generated: None
      Integrate dy/dt = f(t, y) from t=0 and draw the trajectory (t, y(t))

      annotate-angle-mark

      Signature: \annotate-angle-mark line1 line2 label
      Input types:
      • line1: Line
      • line2: Line
      • label: Text, default value:
      Output type: AngleMark
      Autogenerated id: amk{counter} (e.g., amk0)
      Auxiliary nodes generated: None
      Arc marking the angle at the shared vertex of two lines, with optional label

      annotate-arrow

      Signature: \annotate-arrow p1 p2 padding label
      Input types:
      • p1: Point
      • p2: Point
      • padding: Scalar, default value: 0
      • label: Text, default value:
      Output type: Arrow
      Autogenerated id: arrow{counter} (e.g., arrow0)
      Auxiliary nodes generated: None
      Straight arrow from p1 to p2 with optional label. padding (0–0.5) shrinks both ends by that fraction of the total length.

      annotate-curly-bracket

      Signature: \annotate-curly-bracket p1 p2 label
      Input types:
      • p1: Point
      • p2: Point
      • label: Text, default value:
      Output type: CurlyBracket
      Autogenerated id: brace{counter} (e.g., brace0)
      Auxiliary nodes generated: None
      Curly bracket between two points with optional label (opens to right of p1→p2)

      annotate-curved-arrow

      Signature: \annotate-curved-arrow p1 p2 control padding label
      Input types:
      • p1: Point
      • p2: Point
      • control: Point
      • padding: Scalar, default value: 0
      • label: Text, default value:
      Output type: CurvedArrow
      Autogenerated id: carrow{counter} (e.g., carrow0)
      Auxiliary nodes generated: None
      Curved arrow from p1 to p2 bending toward a control point. padding (0–0.5) trims both ends by that fraction of the curve.

      annotate-dim-line

      Signature: \annotate-dim-line p1 p2 label
      Input types:
      • p1: Point
      • p2: Point
      • label: Text, default value:
      Output type: DimensionLine
      Autogenerated id: dim{counter} (e.g., dim0)
      Auxiliary nodes generated: None
      Dimension line between two points with extension lines and auto-distance label

      annotate-leader-line

      Signature: \annotate-leader-line p1 p2 label
      Input types:
      • p1: Point
      • p2: Point
      • label: Text
      Output type: LeaderLine
      Autogenerated id: lead{counter} (e.g., lead0)
      Auxiliary nodes generated: None
      Leader line with arrowhead at p1, elbow, and label at p2

      annotate-pin

      Signature: \annotate-pin position label
      Input types:
      • position: Point
      • label: Text, default value:
      Output type: Pin
      Autogenerated id: pin{counter} (e.g., pin0)
      Auxiliary nodes generated: None
      Pin marker at a point with optional label

      annotate-text-box

      Signature: \annotate-text-box text x y fontSize width height
      Input types:
      • text: Text
      • x: Scalar, default value: 0
      • y: Scalar, default value: 0
      • fontSize: Scalar, default value: 14
      • width: Scalar, default value: 0
      • height: Scalar, default value: 0
      Output type: TextBox
      Autogenerated id: tbox{counter} (e.g., tbox0)
      Auxiliary nodes generated: None
      Text label centered at a point, with optional wrapping box. Width/height semantics: w=0, h=0 → no bounded box, single-line label (default). w>0, h>0 → fixed box. w>0, h=-1 → fixed width, height grows to fit wrapped text. w=-1, h>0 → fixed height, width sized to fit text in that many lines. w=-1, h=-1 → both auto, each capped at 5 canvas units.

      abs

      Signature: \abs a
      Works on: Scalar, Complex
      Input types:
      • a: Any
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Absolute value / modulus (scalar or complex)

      add

      Signature: \add a b...
      Works on: Scalar, Complex
      Input types:
      • a: Any
      • b: Any (variadic)
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Add two or more values (scalar or complex)

      div

      Signature: \div a b
      Works on: Scalar, Complex
      Input types:
      • a: Any
      • b: Any
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Divide the first value by the second (scalar or complex)

      exp

      Signature: \exp a
      Works on: Scalar, Complex
      Input types:
      • a: Any
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Exponential e^a (scalar or complex)

      log

      Signature: \log a
      Works on: Scalar, Complex
      Input types:
      • a: Any
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Natural logarithm ln(a) (scalar or complex)

      mul

      Signature: \mul a b...
      Works on: Scalar, Complex
      Input types:
      • a: Any
      • b: Any (variadic)
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Multiply two or more values (scalar or complex)

      neg

      Signature: \neg a
      Works on: Scalar, Complex
      Input types:
      • a: Any
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Negate a value (scalar or complex)

      pow

      Signature: \pow a b
      Works on: Scalar, Complex
      Input types:
      • a: Any
      • b: Any
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Raise the first value to the power of the second (scalar or complex)

      sqrt

      Signature: \sqrt a
      Works on: Scalar, Complex
      Input types:
      • a: Any
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Square root (scalar or complex)

      sub

      Signature: \sub a b
      Works on: Scalar, Complex
      Input types:
      • a: Any
      • b: Any
      Output type: Any
      Autogenerated id: any{counter} (e.g., any0)
      Auxiliary nodes generated: None
      Subtract the second value from the first (scalar or complex)