Repository navigation
constants
Home > Constants & unit conversions
< Previous: Lists & collections | Next: Overview >
Named values you can drop straight into the node graph - math constants and millimeter <-> working-unit conversions - just by typing their name.
In the node palette, type a constant's name and press Enter: Locus drops a Number node holding that value, named after the constant. The names are fuzzy-matched, so a few letters find them (gold -> goldenAngle, mmto -> the mm-to-unit family). See Adding & connecting nodes for the quick-entry palette.
| Name | Value | Notes |
|---|---|---|
pi |
3.14159... | π |
tau |
6.28319... | 2π - a full turn; tau / N divides the circle into N |
e |
2.71828... | Euler's number |
phi |
1.61803... | the golden ratio |
sqrt 2 |
1.41421... | |
sqrt 3 |
1.73205... | |
sqrt 5 |
2.23607... | |
silver |
2.41421... | the silver ratio, 1 + sqrt 2 |
goldenAngle |
137.50776 degrees | in degrees, matching Rotate's Angle |
Because node numbers are always millimeters, these constants convert to and from your working unit. Multiply a value by one to move it across units.
| Name | Value | Use |
|---|---|---|
intomm |
25.4 | inches -> mm |
mmtoin |
0.03937... | mm -> inches |
fttomm / mmtoft
|
304.8 / 0.00328... | feet <-> mm |
mtomm / mmtom
|
1000 / 0.001 | meters <-> mm |
sqintosqmm / sqmmtosqin
|
645.16 / 0.00155... | square inches <-> mm2 |
The same four (length both ways, area both ways) exist for every non-mm unit, and any new unit added to the app gets its set automatically.
Place each item goldenAngle further round than the last and the turns never line up - the even, non-repeating spread that packs a sunflower. Node setup: Series -> Math x goldenAngle (the angles) and Math ^ 0.5 x spacing (the radii) -> Point: Polar -> Place. Full walkthrough on the Phyllotaxis page.
A full turn is tau, so tau / N divides the circle into exactly N - no typing 60 and hoping. Node setup: Number tau -> Math (/ 6) -> Rotate (Angle from the result, Repeat 6, Center at the origin) -> a clean six-fold rosette.
The node graph is always in millimeters; multiply a value by mmtoin to read or export it in inches (intomm goes the other way, sqmmtosqin for areas). Node setup: the value -> Math (x mmtoin).
< Previous: Lists & collections | Next: Overview >
- Adding & connecting nodes: the quick-entry palette | Math | Phyllotaxis
Found a bug or have feedback? Open an issue | Docs home | Videos | Credits
Getting Started
- Welcome
- How Locus came to be
- Videos
- Community & support
- Installing & launching
- Licensing & activation
- Beta License Agreement
- Core concepts
- Interface tour
- Your first pattern
Modeling - Drawing
- Canvas basics
- Points
- Typing coordinates
- Lines, rays & segments
- Circles & arcs
- Ellipses
- Compass & straightedge
- Rectangles & squares
- Constraining with Shift
Modeling - Editing
- Selecting objects
- Transform tools
- Align & distribute
- Duplicate, detach & ownership
- Regions & booleans
- Cleanup
- Weld & seams
- Style palettes & Re-ink
Annotation
Layers
Modeling Menus
- File
- Edit
- View
-
Draw
- Select
- Point
- Segment
- Line
- Ray
- Circle: Center Point
- Circle: Center Radius
- Circle: Through 3 Points
- Arc: Center, Start, End
- Straightedge
- Compass
- Compass: Radius
- Ellipse: Center + Axes
- Elliptical Arc
- Rectangle: XY-Aligned
- Rectangle: Directed
- Square
- Regular Polygon: Edge
- Regular Polygon: Center, Vertex
- Regular Polygon: Center, Edge Midpoint
- Dimension: Linear
- Dimension: Angle
- Dimension: Radial
- Label
- Construct
- Combine
- Transform
- Select
- Nodes
The Nodes Window
- Basics of visual programming
- How the node graph works
- Sockets & wires
- Adding & connecting nodes
- Sliders & number inputs
- Keeping the node graph tidy
- View menu (Nodes)
- Lists & collections
- Constants & unit conversions
Node Library
- Overview
- Input
-
Primitives
- Point
- Point: Polar
- Segment
- Line
- Ray
- Circle: Center Point
- Circle: Center Radius
- Circle: Apollonius
- Circle Tangent to...
- Circle: 3 Points
- Arc
- Ellipse
- Elliptical Arc
- Rectangle: XY-Aligned
- Rectangle: Directed
- Square
- Regular Polygon: Edge
- Regular Polygon: Center
- Rectangular Grid
- Oblique Grid
- Triangular Grid
- Construct
- Transform
- Image & Fields
- Combine
-
Data
- Measure
- Numbers
- Lists
- Select
- Clean up
- Display
Clusters
Bridging Modeling & Nodes
Patterns & Symmetry
Image-Driven Fields
Saving, Exporting & Files
Preferences & Language
CLI
Reference


