module:extras/torusknot.TorusKnot
### new module:extras/torusknot.TorusKnot(revolutions, r, q, s1, m1)
A curve evaluator object for a torus knot or torus-knot-like curve. Uses the formula given in “Decorative Knot Patterns” by L. D. Taylor, 2011.
Parameters
revolutions
(Type: number)
Integer greater than 0. Labeled ‘p’ by Taylor.r
(Type: Array.<number>)
Array of integers and/or non-integers.q
(Type: Array.<number>)
Array of integers. Lowest ‘q’ is the number of equal “parts” of the torus knot.s1
(Type: number)
Integer or non-integer parameter.m1
(Type: number)
Integer parameter.
Methods
- interlaced
TODO: Not documented yet. - simple
Generates a torus knot with simple parameters.
### (static) module:extras/torusknot~TorusKnot.interlaced(p, q, r1, s1)
TODO: Not documented yet.
Parameters
p
(Type: number)
Integer greater than 0 giving the number of revolutions.q
(Type: number)
Integer greater than 0 giving the number of loop crossings.r1
(Type: *)s1
(Type: *)
Return Value
The resulting torus knot evaluator. (Type: TorusKnot)
### (static) module:extras/torusknot~TorusKnot.simple(p, q, r1)
Generates a torus knot with simple parameters.
Parameters
p
(Type: number)
Integer greater than 0 giving the number of revolutions.q
(Type: number)
Integer greater than 0 giving the number of loop crossings.r1
(Type: *)
Return Value
The resulting torus knot evaluator. (Type: TorusKnot)