-
Notifications
You must be signed in to change notification settings - Fork 1
The Basics (primitives and modifiers)
In line with the C++ cfdg program, their are three basic primitive shapes (that get called as terminals)
-
circle (does not support rotation:, w: or h:)
-
square (supports rotation:, w: and h:)
-
triangle (supports rotation:)
ellipse alias oval (supports rotation:, w: and h:)
-
size: unless specified there is a default size, rendering is often terminated by reaching a size limit
-
w: and h: only available since version 0.0.4, used to create ellipse and rectangular shapes
-
x: and y: used for horizontal and vertical translation
-
rotation: for rotations since version 0.0.3 primitives as specified as above accept "degrees" for rotation, as well as the derived shapes
-
flip: invert
Color ( since version 0.0.3 ) is specified like C++ cfdg, HSB 360 1 1 1 last being alpha/transparency
-
color: expects and an array as input eg [60, 1, 1, 1] is yellow
-
hue: expects scalar in range 0 to 360
-
saturation:, brightness:, alpha: expects scalar in range 0 to 1.0 alpha for transparency
Context is saved by using the split command (think of pushMatrix)
Original context is restored using the unwind command (think of popMatrix)
This behaviour mimics, but does not exactly replicate the way C++ cfdg splits operations (the "y" design sample is an example of this divergent behaviour where the split goes down one branch and then another in this implementation, whereas in the C++ the branches are followed simultaneously). Certain fractals such as the levy curve also demonstrate this behaviour, but are more subtly affected.