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. |
|
Linear variation of object properties. |
|
Flip-Flop (square wave) variation of object properties. |
|
Triangle 'wave' variation of object properties. |
|
Sinusoid variation of object properties. |
|
Smooth transition curve for object properties. |
|
Smooth transition curve for object properties. |
|
Cyclic value 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
Bézier curve as an array of vertices. |
|
The developed length of any Bézier curve. |
|
Find vertex where x=X. |
|
Find vertex where y=Y. |
|
Polygon in a tuple of arrays [[Points],[Paths]]. |
|
Polyhedron in a tuple of arrays [[Points],[Faces]]. |
|
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. |
|
Visualise the generation of a Bézier curve. |
|
Troubleshoot module for visualising tangent point arrays. |
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. |
|
Flattening is depth reduction of an array. |
|
Get the value from a key-value pair in such an array. |
|
Check if something is in an array. Doesn’t stumble where |
|
Last value stored in an array. |
|
Like 'leftstring' but for arrays. |
|
Highest possible index of an array. It’s ´len()´, but much more better. |
|
Like |
|
Obsolete though interesting, 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. |
|
Preserves only one of any repeated entries in an array. |
|
Remove double entries from an array, but doesn’t affect the last entry. |
|
Flip an array front-to-back. |
|
Like 'rightstring', but for arrays. |
|
Rounds all values in an array. |
|
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, |
|
Generates a list of 'stepped' values. |
|
Substring for arrays. |
|
Sums values of two equal-length arrays. |
Matrices
Mostly (affine) transformation functions.
Perform affine rotation on a vertex or an array of vertices. |
|
Perform affine scaling on a vertex or an array of vertices. |
|
Perform affine translation on a vertex or an array of vertices. Trivial. |
|
Perform affine transformation on a vertex or an array of vertices. Can combine several Transform vectors. |
|
Generate a homogenised matrix. |
|
Generate an identity matrix. |
|
Transpose a matrix. |
|
Create an affine rotation matrix. |
|
Create an affine scaling matrix. |
|
Create an affine shearing matrix. |
|
Create an affine translation matrix. |
|
Create an affine transform matrix on the basis of The GHOUL’s Transform vectors. |
Tuples
Crop a tuple to n items. |
|
Create a tuple filled with n of the same items. |
|
Generate a specified range of values. |
|
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. |
|
Replace all undef entries with a value. |
|
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. |
|
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. |
|
Turn polar coordinates into a vector. |
|
Project a 3D vector onto Z=0. |
|
Vector perpendicular to the 'right' of the given vector. |
|
3D direction of a curve segment. |
|
3D direction of the first curve segment. |
|
3D direction of the last curve segment. |
|
Create a unit vector. |
|
Angle between two vectors. |
|
Project a vector onto one of the coordinate hyperplanes. |
|
Convert a vector into inclination and azimuth angles. |
|
Convert a vector into polar coordinates. |
Math and Logic
Math, logic and some otherwise-difficult-to-classify functions.
And-is-false operation on an array of expressions. |
|
Or-is-false operation on an array of expressions. |
|
Breaks up an arc into a list of angles. |
|
A list of arc vertices. |
|
Like the native |
|
The only time "What is..?" may be answered with "Don’t worry about it." Go and find out if you must… |
|
Clip a value between a max. and a min. limit. |
|
Convert "#FF8000" into [1,0.5,0], and so on. They’re OpenSCAD color notations. |
|
Convert [1,0.5,0] into "#FF8000", and so on. They’re OpenSCAD color notations. |
|
Turns a date into a weekday like "Saturday". |
|
Reduces the number of decimals in a value to a given maximum. |
|
Turns 2000 into "7D0", and suchlike. |
|
Convert radians to degrees. |
|
Factorial of n. |
|
Greatest common divisor of an array of values. |
|
Turns "7D0" into 2000, and suchlike. |
|
Returns the nearest common fraction of a decimal fraction. As this was written for inch measurements, the denominator is from 1/2 to 1/64. |
|
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. |
|
Check if year is a leap year. |
|
Least common multiple of an array of values. |
|
Circular map a value onto a range. |
|
Like |
|
Like |
|
Like the native '%' operator, but much more better… |
|
The index of the most significant digit in a value after conversion into a string. |
|
Like |
|
The nth decimal of a number. |
|
The nearest even number to a value. |
|
The nearest odd number to a value. |
|
Nudge a value off given limits if it equals one of them. |
|
Returns the order of magnitude of a value. |
|
Or-is-false operation on an array of expressions. |
|
Or-is-true operation on an array of expressions. |
|
Convert degrees to radians. |
|
Shorthand for ´rands(0,1,1)[0]´. |
|
Returns two limits and a set of regular intermediate steps. |
|
Returns the sign of a value. |
|
Fallback value if x=undef. |
|
Fallback value if x=0. |
|
Returns value, unless it is equal to 0, when it returns Thought, which is defined as 1/4096. |
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. |
|
Convert World coordinates into Screen coordinates. |
|
Moves |
|
Position an object on the screen (viewport). |
|
Cut a sector from an object. |
|
Removes all but a sector from an object; the opposite of the previous entry. |
|
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 cartoon-looking car. |
|
A cartoon-looking aeroplane. |
|
A very long vertical line, through a point. |
|
'Waterline' for illustrations. |
Parts
Actual real-world parts, or parts thereof.
Parts
Toothed-belt pulley. |
|
Toothed-belt pulley tooth. |
|
A knurled cylinder. |
|
Simple machine thread routine. |
|
Simple machine threaded hole. |
|
Simple machine threaded rod. |
|
Simple machine threaded bolt. |
|
Simple machine threaded nut. |
Shapes
Useful and maybe-not-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. |
|
Turn a (set of) path(s) into The GHOUL’s polygon notation [[Points],[Paths]]. |
|
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
Methods 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
Reorder a string so the characters are ordered alphabetically. |
|
Map a string to its ASCII values (in an array). |
|
Fill a string with characters. |
|
Check if a string represents a hexadecimal number. |
|
Check for empty strings. |
|
Check if value is a string. |
|
Check if a string represents a UniCode. |
|
Left part of a string. |
|
Right part of a string. |
|
Turn a string into lowercase. |
|
Turn a string into uppercase. |
|
Map a string to other values. |
|
Pad a string with characters to a set length. |
|
Like |
|
Replace certain characters in a string. |
|
Remove certain characters from a string. |
|
Remove repeated characters from a string. |
|
Crop a number to n decimals for output purposes. |
|
Convert a string representing a number into that number. |
|
Convert a string into a tuple of characters. |
|
Convert a tuple of strings and numbers into a single string. |
|
Part of a string. |
|
Map a string to its UniCodes. |