DrawingToy

Back to documentation index.

DrawingToy()

Generates curves similar to those possible using commercially available drawing toys containing gear-toothed rings and wheels. Curves generated currently assume that the radius of each ring and wheel is equal to its tooth count divided by 5.

Methods

DrawingToy#continuousHypo(ringTeeth, wheelTeeth, hole, phase, offset, holeStep, offsetStep, count)

Adds line segments that approximate one or more curves drawn by rolling a wheel inside a fixed ring (hypotrochoids), where each additional curve may be drawn from a different hole position, a different ring position, or both.

Parameters

Return Value

This object. (Type: DrawingToy)

DrawingToy#epi(ringTeeth, wheelTeeth, hole, [phase])

Adds line segments that approximate a curve drawn by rolling a wheel outside a fixed ring (an epitrochoid).

Parameters

Return Value

This object. (Type: DrawingToy)

DrawingToy#hypo(ringTeeth, wheelTeeth, hole, [phase], [offset])

Adds line segments that approximate a curve drawn by rolling a wheel inside a fixed ring (a hypotrochoid).

Parameters

Return Value

This object. (Type: DrawingToy)

DrawingToy#setColor(color)

Sets the color to apply when drawing future curves with this object.

Parameters

Return Value

This object. (Type: DrawingToy)

DrawingToy#toMeshBuffer()

TODO: Not documented yet.

Return Value

Return value. (Type: *)

Back to documentation index.