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()

Animate objects and their properties. Complex version.

Animator()

Animate objects and their properties.

AnimationFXFraction()

Linear variation of object properties.

AnimationFXSquare()

Flip-Flop (square wave) variation of object properties.

AnimationFXTriangular()

Triangle 'wave' variation of object properties.

AnimationFXTwoSines()

Sinusoid variation of object properties.

BezierTransitionUp()

Smooth transition curve for object properties.

BezierTransitionDown()

Smooth transition curve for object properties.

Cycle()

Cyclic value for object properties.

StringTee()

Animate objects and their properties. Simple version.

ViewPort()

Zoom and rotate around objects.

Curves


Bézier curve and SVG imaging functions and modules.

Bézier

BezierCurve()

Bézier curve as an array of vertices.

BezierCurveLength()

The developed length of any Bézier curve.

BezierFractionX()

Find vertex where x=X.

BezierFractionY()

Find vertex where y=Y.

BezierShape()

Polygon in a tuple of arrays [[Points],[Paths]].

BezierSolid()

Polyhedron in a tuple of arrays [[Points],[Faces]].

BezierVertex()

Alias for DeCasteljau(), and more.

CurveLength()

The developed length of any curve.

CurveOffset()

Offset an entire curve, left or right.

DeCasteljau()

Calculate vertex on a Bézier curve.

FindCurveVertex()

Find vertex at distance D.

ShowDeCasteljau()

Visualise the generation of a Bézier curve.

ShowTPA()

Troubleshoot module for visualising tangent point arrays.

SVG

There’s a lot of info on the SVG page, but these are the only SVG user calls.

SVG()

Create SVG shapes and images.

SVG_Shape()

Create SVG shapes from a library.

SVG_Glyph()

Use SVG fonts.

Lists


Indexable variable functions.

Arrays

ArrayAdd()

Add something to each element of an array.

ArrayDomain()

A tuple with the extreme values of all vertices in an array.

ArrayProduct()

Multiply a number of successive array elements with each other.

ArraySelect()

Select a number of non-successive array elements.

ArrayShift()

Circular shift an array, left or right.

ArraySum()

Sum a number of successive elements of an array.

CropArray()

Demote an entire array of vertices to 2D.

Dex()

Circular address an array element.

Find()

Find index of array element.

FindEQ()

Find index of array element.

FindGT()

Find index of array element.

FindGTE()

Find index of array element.

FindLT()

Find index of array element.

FindLTE()

Find index of array element.

FlattenArray()

Flattening is depth reduction of an array.

GetValue()

Get the value from a key-value pair in such an array.

IsInArray()

Check if something is in an array. Doesn’t stumble where search() does…​

Last()

Last value stored in an array.

LeftArray()

Like 'leftstring' but for arrays.

Len()

Highest possible index of an array. It’s ´len()´, but much more better.

Match()

Like GetValue() but with keys and values in separate arrays.

MoebiusArray()

Obsolete though interesting, use Dex() instead.

PadArray()

Add elements to items in an array, e.g., promote from 2D to 3D &c.

QuickFind()

Find stuff, quickly, but not as quickly as search(), so use that.

QuickSort()

Sort an array. Quickly.

RemoveDoubles()

Remove double entries from an array.

RemoveRepeated()

Preserves only one of any repeated entries in an array.

RemoveSuccessive()

Remove double entries from an array, but doesn’t affect the last entry.

ReverseArray()

Flip an array front-to-back.

RightArray()

Like 'rightstring', but for arrays.

RoundArray()

Rounds all values in an array.

ScaleArray()

Scale an array of vertices with X, Y, and Z factors.

SetArrayElement()

Set an array element to a certain value.

SmashArray()

Reduce array depth to 1. (I.e, FlattenArray() on steroids.)

SubArray()

Generates a list of 'stepped' values.

SubArray()

Substring for arrays.

SumArrays()

Sums values of two equal-length arrays.

Matrices

Mostly (affine) transformation functions.

AffineRotate()

Perform affine rotation on a vertex or an array of vertices.

AffineScale()

Perform affine scaling on a vertex or an array of vertices.

AffineTranslate()

Perform affine translation on a vertex or an array of vertices. Trivial.

AffineTransform()

Perform affine transformation on a vertex or an array of vertices. Can combine several Transform vectors.

HomogeniseMatrix()

Generate a homogenised matrix.

IdentityMatrix()

Generate an identity matrix.

MatrixTranspose()

Transpose a matrix.

RotationMatrix()

Create an affine rotation matrix.

ScalingMatrix()

Create an affine scaling matrix.

ShearingMatrix()

Create an affine shearing matrix.

TranslationMatrix()

Create an affine translation matrix.

TransformMatrix()

Create an affine transform matrix on the basis of The GHOUL’s Transform vectors.

Tuples

CropTuple()

Crop a tuple to n items.

FillTuple()

Create a tuple filled with n of the same items.

Interval()

Generate a specified range of values.

IsInRange()

Check if value is a member of the specified range.

LeftTuple()

'Leftstring' but for tuples.

PadTuple()

Pad a tuple to length n with a given value.

RangeToTuple()

Convert a range to a tuple.

RemoveElement()

Remove an element from a tuple.

ReplaceUndef()

Replace all undef entries with a value.

ReverseTuple()

Flip a tuple back to front.

RightTuple()

'Rightstring' but for tuples.

SetTupleElement()

Set a tuple element to a certain value.

SubTuple()

'Substring' but for tuples.

Vectors

Bisect()

Bisect the (acute) angle between two vectors.

BisectObtuse()

Bisect the obtuse angle between two vectors.

BisectLeft()

Bisect the angle between two vectors 'to the left'.

BisectRight()

Bisect the angle between two vectors 'to the right'.

CrossProduct()

Vector cross-product.

DotProduct()

Vector dot-product.

HomogeniseVector()

Homogenise a vector.

LengthVector()

Create a vector of a certain length (and direction).

LPerpVector()

Vector perpendicular to the 'left' of the given vector.

Modulus()

Vector modulus, or 'length'.

Offset()

Offset a vector/vertex in the direction of the bisector of two other vectors.

PolarToVector()

Turn polar coordinates into a vector.

ProjectVector()

Project a 3D vector onto Z=0.

RPerpVector()

Vector perpendicular to the 'right' of the given vector.

SegmentDirection()

3D direction of a curve segment. VectorToIncAz() but different.

StartDirection()

3D direction of the first curve segment.

EndDirection()

3D direction of the last curve segment.

UnitVector()

Create a unit vector.

VectorAngle()

Angle between two vectors.

VectorProject()

Project a vector onto one of the coordinate hyperplanes.

VectorToIncAz()

Convert a vector into inclination and azimuth angles.

VectorToPolar()

Convert a vector into polar coordinates.

Math and Logic


Math, logic and some otherwise-difficult-to-classify functions.

AndIsFalse()

And-is-false operation on an array of expressions.

AndIsTrue()

Or-is-false operation on an array of expressions.

ArcAngles()

Breaks up an arc into a list of angles.

ArcVertices()

A list of arc vertices.

ATan2()

Like the native atan2(), but much more better.

BinomialCoefficient()

The only time "What is..?" may be answered with "Don’t worry about it." Go and find out if you must…​

Clip()

Clip a value between a max. and a min. limit.

ColorHexToTuple()

Convert "#FF8000" into [1,0.5,0], and so on. They’re OpenSCAD color notations.

ColorTupleToHex()

Convert [1,0.5,0] into "#FF8000", and so on. They’re OpenSCAD color notations.

DayOfTheWeek()

Turns a date into a weekday like "Saturday".

Decimals()

Reduces the number of decimals in a value to a given maximum.

DecToHex()

Turns 2000 into "7D0", and suchlike.

Deg()

Convert radians to degrees.

Factorial()

Factorial of n.

GreatestCommonDivisor()

Greatest common divisor of an array of values.

HexToDec()

Turns "7D0" into 2000, and suchlike.

InchFraction()

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.

InlineVertex()

Vertex colinear with two other vertices, on a given plane.

Intermediate()

Intermediate curve, vertex, color &c.

Interpolate()

Interpolate or extrapolate.

IsEven()

Check that value is even.

IsOdd()

Check that value is odd.

IsInteger()

Check that value is integer.

IsNotInteger()

Check that value is not integer.

IsFraction()

Check that value is a fraction.

IsNumber()

Check that value is a number.

IsPositive()

Check that value is positive.

IsNegative()

Check that value is negative.

IsLeapYear()

Check if year is a leap year.

LeastCommonMultiple()

Least common multiple of an array of values.

Map()

Circular map a value onto a range.

MCeil()

Like ceil() but different.

MFloor()

Like floor() but different.

Mod()

Like the native '%' operator, but much more better…​

MostSignificant()

The index of the most significant digit in a value after conversion into a string.

MRound()

Like round() but different.

NDecimal()

The nth decimal of a number.

NearestEven()

The nearest even number to a value.

NearestOdd()

The nearest odd number to a value.

OffLimits()

Nudge a value off given limits if it equals one of them.

OrderOf Magnitude()

Returns the order of magnitude of a value.

OrIsFalse()

Or-is-false operation on an array of expressions.

OrIsTrue()

Or-is-true operation on an array of expressions.

Rad()

Convert degrees to radians.

Rnd()

Shorthand for ´rands(0,1,1)[0]´.

Sequence()

Returns two limits and a set of regular intermediate steps.

Sign()

Returns the sign of a value.

UndefFallback()

Fallback value if x=undef.

ZeroFallback()

Fallback value if x=0.

ZeroThought()

Returns value, unless it is equal to 0, when it returns Thought, which is defined as 1/4096.

Meshes


Not much, but pretty important…​

CoverMesh()

Cover an array of vertices with a mesh.

QuadSpace()

Triangulate a 'face' between four vertices.

Modifiers


Things that make other things look like other things.

CircularArray()

Copy objects in a (partial) circle.

LinearArray()

Copy objects in a line.

OutRadius()

Compensate radius for '$fn-effect'.

Position()

Position an object in 3D.

PosX2D()

Trim the -x part of a 2D shape.

PosX3D()

Trim the -x part of a 3D shape.

PosZ3D()

Trim the -z part of a 3D shape.

ScreenCoords()

Convert World coordinates into Screen coordinates.

ScreenMove()

Moves children() along Screen coordinates.

ScreenPosition()

Position an object on the screen (viewport).

SectorCut()

Cut a sector from an object.

SectorSlice()

Removes all but a sector from an object; the opposite of the previous entry.

Torus()

Turn a 2D shape into a (partial) torus.

Tumble()

Tumble an object in an animation.

Objects


Things. Useful or not. 'Line', here, means a long, thin and narrow cube().

ALine()

A very long line, through a point, at an angle.

Arrow()

A 3D arrow.

BallCylinderBetween()

Cylinder with radiused ends between two points.

Cap()

Turn a 2D shape into a 3D cap.

ChamferedBar()

A bar with chamfered ends.

ChamferedCube()

A cube with chamfered edges.

ChamferedCylinder()

A cylinder with chamfered ends.

CoordinateSystem()

A coordinate system, for illustrations.

CylinderBetween()

A cylinder between two points.

Dimension()

For dimensioning an object, for illustrations.

GraphPaper()

GraphPaper, to illustrate functions and curves.

HLine()

A very long horizontal line, through a point.

Line()

A line between two points.

Protractor()

A protractor for measuring objects.

Ruler()

A ruler for measuring objects.

StarCap()

A cap for a star-shaped end.

ToonCar()

A cartoon-looking car.

ToonPlane()

A cartoon-looking aeroplane.

VLine()

A very long vertical line, through a point.

Waterline()

'Waterline' for illustrations.

Parts


Actual real-world parts, or parts thereof.

Parts

GTPulley()

Toothed-belt pulley.

GTTooth()

Toothed-belt pulley tooth.

KnurledCylinder()

A knurled cylinder.

SimpleThread()

Simple machine thread routine.

SimpleThreadedHole()

Simple machine threaded hole.

SimpleThreadedRod()

Simple machine threaded rod.

SimpleBolt()

Simple machine threaded bolt.

SimpleNut()

Simple machine threaded nut.

Gears

Gears and racks. Only involute spur gears so far.

InvoluteGear()

Involute spur gear generator.

InvoluteGearTooth()

Involute spur gear tooth.

Involute()

An involute curve.

Rack()

Rack generator.

RackTooth()

Rack tooth.

Trochoid()

Trochoid curve.

Thread

Threads, for bolts, not needles. Any shape or form.

Thread()

Very powerful thread generator.

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.

ChamferedRectangle()

Chamfered rectangle.

Circle()

Can you do circle()[0][5]? No, but you can Circle()[0][5]…​

Diamond()

A diamond.

Ellipse()

An ellipse, but more than just scale()circle().

EquilateralTriangle()

An equilateral triangle.

Grooved()

A grooved surface.

InsideRadius()

A fillet-like shape.

NGon()

A multi-edged regular shape, n-gon, nothing like circle($fn=n).

OutsideRadius()

The reverse of a fillet ;-)

OvalRing()

An oval ring.

PathsToPolygon()

Turn a (set of) path(s) into The GHOUL’s polygon notation [[Points],[Paths]].

RadiusedRectangle()

A rectangle with radiused corners.

RectangularProfile()

Like a box profile, a 'rectangular ring'.

RightTriangle()

A right triangle.

Ring()

A ring, not oval, not square, and no, not difference(){circle()circle()}.

Sector()

A sector, like a wedge out of a circle.

Square()

No, don’t even square().

Star()

A star shape.

Visualisers


Methods to make otherwise unseen things seen.

ShowCurve()

Show a curve with cylinders and spheres.

ShowFx()

Graph a function.

ShowSlice()

Show a slice through a complex object.

ShowVertex()

Show (highlight) a vertex.

ShowVertices()

Show (highlight) multiple vertices.

Words


Anything to do with words and letters and their manipulation or creation.

Echos

For the console…​

Alert()

Alert the user to something.

Debug()

Debugging output.

Echo()

echo(), but more.

ErrorOnFalse()

Throw an error upon a 'false' result.

ErrorOnTrue()

Throw an error upon a 'true' result.

FallBack()

Fallback value with alert.

Print()

echo(), but (much) more.

Stop()

Halt execution with output.

Strings

Alphabetical()

Reorder a string so the characters are ordered alphabetically.

AsciiMapString()

Map a string to its ASCII values (in an array).

FillString()

Fill a string with characters.

IsHex()

Check if a string represents a hexadecimal number.

IsNullOrEmptyString()

Check for empty strings.

IsString()

Check if value is a string.

IsUniCode()

Check if a string represents a UniCode.

LeftString()

Left part of a string.

RightString()

Right part of a string.

LowerCase()

Turn a string into lowercase.

UpperCase()

Turn a string into uppercase.

MapString()

Map a string to other values.

PadString()

Pad a string with characters to a set length.

Prefix()

Like PadString(), but at the beginning…​

ReplaceCharacters()

Replace certain characters in a string.

ScrubCharacters()

Remove certain characters from a string.

ScrubRepeated()

Remove repeated characters from a string.

SetDecimals()

Crop a number to n decimals for output purposes.

StringToDecimal()

Convert a string representing a number into that number.

StringToTuple()

Convert a string into a tuple of characters.

TupleToString()

Convert a tuple of strings and numbers into a single string.

SubString()

Part of a string.

UniCodeMapString()

Map a string to its UniCodes.

Text

Generation of text objects.

BrailleText()

Convert text into Braille.

SimpleBarrelText()

Put text on a 'barrel', i.e., a cylinder.

SimpleCircleText()

Put text in a circle.

SimpleText()

Simple text routine, yes, I know, text().


1. Functions that are completely useless to users, i.e., non-user functions, are not listed here. It wouldn’t make sense. They’re not for you…​
2. Functions and modules are ordered alphabetically, grouped by library, which may be grouped by type, which are in alphabetical order.