The human animal differs from the lesser primates in his passion for lists.
Index
The complete incomplete
[1]
non-alphabetical
[2]
alphabetical list of functions and modules currently in The GHOUL, with links to their documentation.
This took a pile of editing, even with the powerful 'find-and-replace' routine of the
Geany, so you better appreciate it…
Animation
These functions were written primarily to make the GIF illustrations for this documentation…
Animate objects and their properties. Complex version. |
|
Animate objects and their properties. |
|
Smooth transition curve for object properties. |
|
Smooth transition curve for object properties. |
|
Animate objects and their properties. Simple version. |
|
Zoom and rotate around objects. |
Curves
Bézier curve and SVG imaging functions and modules.
Bézier
Angle values of an arc divided into n angles. |
|
Find vertex where x=X. |
|
Find vertex where y=Y. |
|
Bézier curve as an array of vertices. |
|
The developed length of a Bézier curve. |
|
Alias for |
|
Polygon in a tuple of arrays [[Points],[Paths]]. |
|
Polyhedron in a tuple of arrays [[Points],[Faces]]. |
|
Troubleshoot module for visualising TPPlanes. |
|
Cubic Bézier alias for |
|
The developed length of any curve. |
|
Offset an entire curve, left or right. |
|
Calculate vertex on a Bézier curve. |
|
Find vertex at distance D. |
|
Quadratic Bézier alias for |
|
Visualise the generation of a Bézier curve. |
Lists
Indexable variable functions.
Arrays
Add something to each element of an array. |
|
A tuple with the extreme values of all vertices in an array. |
|
Multiply a number of successive array elements with each other. |
|
Select a number of non-successive array elements. |
|
Circular shift an array, left or right. |
|
Sum a number of successive elements of an array. |
|
Demote an entire array of vertices to 2D. |
|
Circular address an array element. |
|
Find index of array element. |
|
Find index of array element. |
|
Find index of array element. |
|
Find index of array element. |
|
Find index of array element. |
|
Find index of array element. |
|
Obsolete, use
|
|
Flattening is depth reduction of an array. |
|
Get the value from a key-value pair in such an array. |
|
Check if something is an array. |
|
Check if something is in an array. |
|
Last value stored in an array. |
|
Like 'leftstring' but for arrays. |
|
Highest possible index of an array. |
|
Like |
|
Obsolete, use
|
|
Add elements to items in an array, e.g., promote from 2D to 3D &c. |
|
Find stuff, quickly, but not as quickly as |
|
Sort an array. Quickly. |
|
Remove double entries from an array. |
|
Flip an array front-to-back. |
|
like 'rightstring', but for arrays. |
|
Scale an array of vertices with X, Y, and Z factors. |
|
Set an array element to a certain value. |
|
Reduce array depth to 1. (I.e, |
|
Substring for arrays. |
|
Sums values of two equal-length arrays. |
Matrices
Mostly (affine) transformation functions.
Perform affine transformations on an array of vertices. |
|
Perform affine transformations on a vertex. |
|
Generate an identity matrix. |
|
Create an affine rotation matrix. |
|
Create an affine scaling matrix. |
|
Create an affine shearing matrix. |
|
Create an affine transform matrix on the basis of The GHOUL’s transform notations. |
|
Create an affine translation matrix. |
|
Transpose a matrix. |
Tuples
Crop a tuple to n items. |
|
Create a tuple filled with n of the same items. |
|
Check if value is a member of the specified range. |
|
'Leftstring' but for tuples. |
|
Pad a tuple to length n with a given value. |
|
Convert a range to a tuple. |
|
Remove an element from a tuple. |
|
Flip a tuple back to front. |
|
'Rightstring' but for tuples. |
|
Set a tuple element to a certain value. |
|
'Substring' but for tuples. |
Vectors
Bisect the (acute) angle between two vectors. |
|
Bisect the obtuse angle between two vectors. |
|
Bisect the angle between two vectors 'to the left'. |
|
Bisect the angle between two vectors 'to the right'. |
|
Vector cross-product. |
|
Vector dot-product. |
|
Homogenise a vector. |
|
Turn inclination and azimuth angles into a vector. |
|
Create a vector of a certain length (and direction). |
|
Vector perpendicular to the 'left' of the given vector. |
|
Vector modulus, or 'length'. |
|
Offset a vector/vertex in the direction of the bisector of two other vectors. |
|
Project a 3D vector onto Z=0. |
|
Vector perpendicular to the 'right' of the given vector. |
|
3D direction of a curve segment. |
|
Create a unit vector. |
|
Angle between two vectors. |
|
Sum all vectors in an array of vectors. |
|
Convert a vector into inclination and azimuth angles. |
|
Convert a vector into polar coordinates. |
Math and Logic
Math, logic and some otherwise-difficult-to-place functions.
And-is-false operation on an array of expressions. |
|
Or-is-false operation on an array of expressions. |
|
Clip a value between a max. and a min. limit. |
|
Convert radians to degrees. |
|
Factorial of n. |
|
Greatest common divisor of an array of values. |
|
Vertex colinear with two other vertices, on a given plane. |
|
Intermediate curve, vertex, color &c. |
|
Interpolate or extrapolate. |
|
Check that value is even. |
|
Check that value is odd. |
|
Check that value is integer. |
|
Check that value is not integer. |
|
Check that value is a fraction. |
|
Check that value is a number. |
|
Check that value is positive. |
|
Check that value is negative. |
|
Return Kronecker delta for two values. |
|
Least common multiple of an array of values. |
|
Circular map a value onto a range. |
|
Like |
|
Like |
|
Like the native '%' operator, but more… |
|
Like |
|
The nth decimal of a number. |
|
The nearest even number to a value. |
|
The nearest odd number to a value. |
|
Or-is-false operation on an array of expressions. |
|
Or-is-true operation on an array of expressions. |
|
Convert degrees to radians. |
|
Fallback value if x=undef. |
|
Fallback value if x=0. |
Meshes
Not much, but pretty important…
Cover an array of vertices with a mesh. |
|
Triangulate a 'face' between four vertices. |
Modifiers
Things that make other things look like other things.
Copy objects in a (partial) circle. |
|
Copy objects in a line. |
|
Compensate radius for '$fn-effect'. |
|
Position an object in 3D. |
|
Trim the -x part of a 2D shape. |
|
Trim the -x part of a 3D shape. |
|
Trim the -z part of a 3D shape. |
|
Position an object on the screen (viewport). |
|
Cut a sector from an object. |
|
Turn a 2D shape into a (partial) torus. |
|
Tumble an object in an animation. |
Objects
Things. Useful or not. 'Line', here, means a long, thin and narrow cube().
A very long line, through a point, at an angle. |
|
A 3D arrow. |
|
Cylinder with radiused ends between two points. |
|
Turn a 2D shape into a 3D cap. |
|
A bar with chamfered ends. |
|
A cube with chamfered edges. |
|
A cylinder with chamfered ends. |
|
A coordinate system, for illustrations. |
|
A cylinder between two points. |
|
For dimensioning an object, for illustrations. |
|
GraphPaper, to illustrate functions and curves. |
|
A very long horizontal line, through a point. |
|
A line between two points. |
|
A protractor for measuring objects. |
|
A ruler for measuring objects. |
|
A cap for a star-shaped end. |
|
A very long vertical line, through a point. |
|
'Waterline' for illustrations. |
Parts
Actual real-world parts, or parts thereof.
Shapes
Useful and maybe-no-so shapes. These are 2D objects, formatted like a polygon, i.e., [[Points],[Paths]] so they can be manipulated at will, unlike the native shapes like circle() &c.
Chamfered rectangle. |
|
Can you do |
|
A diamond. |
|
An ellipse, but more than just |
|
An equilateral triangle. |
|
A grooved surface. |
|
A fillet-like shape. |
|
A multi-edged regular shape, n-gon, nothing like |
|
The reverse of a fillet ;-) |
|
An oval ring. |
|
A rectangle with radiused corners. |
|
Like a box profile, a 'rectangular ring'. |
|
A right triangle. |
|
A ring, not oval, not square, and no, not |
|
A sector, like a wedge out of a circle. |
|
No, don’t even |
|
A star shape. |
Visualisers
things to make otherwise unseen things seen.
Show a curve with cylinders and spheres. |
|
Graph a function. |
|
Show a slice through a complex object. |
|
Show (highlight) a vertex. |
|
Show (highlight) multiple vertices. |
Words
Anything to do with words and letters and their manipulation or creation.
Echos
For the console…
Alert the user to something. |
|
Debugging output. |
|
|
|
Throw an error upon a 'false' result. |
|
Throw an error upon a 'true' result. |
|
Fallback value with alert. |
|
|
|
Halt execution with output. |
Strings
Map a string to its ASCII values (in an array). |
|
Check for empty strings. |
|
Check if value is a string. |
|
Left part of a string. |
|
Map a string to other values. |
|
Right part of a string. |
|
Crop a number to n decimals for output purposes. |
|
Convert a string to a tuple. |
|
Part of a string. |
|
Convert a tuple of strings and numbers to a single string. |