-
Notifications
You must be signed in to change notification settings - Fork 4
NOME3 Language Reference
https://docs.google.com/document/d/15c1VIXpGUxIL3daA3pI-iYW4K5ebd3snveDFWXRpa70/edit# contains latest specs.
point id (x y z) endpoint
Defines a point at the specified x
, y
, and z
coordinates.
polyline id ( point_idlist ) [closed] endpolyline
Define a polyline, a chain of piecewise linear segments. You can optionally make it closed, i.e., the last point connects back to the first.
-
point_idlist
: a list of points of the formpoint1 point2 ...
face id (point_idlist) endface
Define a face from a list of points. Front face uses counter clockwise winding.
-
point_idlist
: a list of points of the formpoint1 point2 ...
mesh id
face faceId1 ( point_idlist1 ) endface
...
face faceIdN ( point_idlistN ) endface
endmesh
Also creates a collection of faces, which can optionally be colored. Faces in a mesh can then be referred to in the rest of the program via a hierarchical name: id.faceId
. Variable names must be unique within a mesh.
-
faceId
: the name of the face -
point_idlist
: a list of points of the formpoint1 point2 ...
circle id (n ro) endcircle
Defines a circle.
-
n
: the number of line segments -
ro
: the radius
sphere id (num_sides radius num_rotation max_theta min_phi max_phi) endsphere
Defines a sphere.
-
num_sides
: the number of line segments in the latitudinal direction -
radius
: the radius of the sphere -
num_rotation
: the number of line segments in the longitudinal direction -
max_theta
: the max theta of any latitude, resulting in a sliced sphere -
min_phi
: the min phi that determines the cutoff at the north pole of the sphere -
max_phi
: the max phi that determined the cutoff at the south pole of the sphere
funnel id (n ro ratio h) endfunnel
Defines a funnel.
-
n
: the number of sides -
ro
: the radius -
ratio
: the ratio between the top ring and the bottom ring -
h
: the height
tunnel id (n ro ratio h) endtunnel
Defines a tunnel.
-
n
: the number of sides -
ro
: the radius -
ratio
: the ratio between the two rings at the ends and the middle ring -
h
: the height
beziercurve id (point_idlist) slices numSlices endbeziercurve
Defines a Bezier curve.
-
point_idlist
: a list of control points of the formpoint1 point2 ...
-
numSlices
: the number of slices by which the Bezier curve is sampled
bspline id (point_idlist) order numOrder slices numSlices endbspline
Defines a B-spline.
-
{order}
: an integer that specifies the B-spline's order to be{order}
-
point_idlist
: a list of control points of the formpoint1 point2 ...
-
numSlices
: the number of points that will appear on the curve - Number of control points must be greater than or equal to
{order}
- For closed curves, control points must have at least
{order}
- 1 repeats
torus id (n r_maj r_min theta_max phi_max num_cross) endtorus
Defines a torus.
-
n
: the number of sides on a circular cross section -
r_maj
: the major radius -
r_min
: the minor radius (tube radius) -
theta_max
: specified in degrees. The cross section circle is swept starting at the x-axis and circles the z-axis by the angle theta until thetamax is reached. -
phi_max
: specified in degrees. 360 would result in circular cross section. 180 would be a semi-circle cross section. -
num_seg
: the # of cross sections
torusknot id (p q n tube_radius num_seg) endtorusknot
Defines a torus knot.
-
p
: p -
q
: q -
n
: the number of sides on a circular cross section -
tube_radius
: radius of the cross section -
num_seg
: the # of cross sections
mobiusstrip id (radius twists cuts segs) endmobiusstrip
Defines a mobius strip with a specified number of twists and cuts.
-
radius
: the width of the band. If there are multiple cuts, thenradius
= width of all sub-bands + width of all gaps between sub-bands. -
twists
: the number of twists in the mobius strip. -
cuts
: the number of cuts in the mobius strip band (cuts go parallel to the edges of the band). Gaps and sub-bands will all be of the same width. Sum of widths =radius
. -
segs
: the number of segments around the band.
instance name generator_or_group [rotate (x y z) (degree)] [scale (x y z)] [translate (x y z)] [surface surface_id] endinstance
Creates an instance of geometry. You can optionally rotate, scale, or translate the instance.
-
mesh_id
: the name of the primitive object or group that will be instantiated -
degree
: the angle of rotation on the axes specified -
surface_id
: the surface color
surface id (r g b) endsurface
Defines a surface color. r
, g
, and b
specify the RGB values of the color in the range [0, 1]
group id
instance id1 object_id1 [surface surface_id] endinstance
...
instance idN object_idN [surface surface_id] endinstance
endgroup
Defines a collection of instances of primitive objects or other groups. Groups are the most general construct to introduce hierarchy into the shape description.
-
id
: the name of the instance -
object_id
: the name of the object to be instantiated -
surface_id
: the surface color
bank bankID
set setID1 value1 start1 end1 stepSize1
...
set setIDN valueN startN endN stepSizeN
endbank
Allows the user to change any numerical value in the NOME file through a slider in the GUI.
-
setID
: the variable to be parameterized -
value
: the initial value of the slider -
start
: the lower bound of the slider -
end
: the upper bound of the slider -
stepSize
: the incremental step size of the slider