| Trees | Indices | Help |
|
|---|
|
|
object --+
|
ColorSpiral
Implement a spiral path through HSV colour space.
This class provides functions for sampling points along a logarithmic
spiral path through HSV colour space.
The spiral is described by r = a * exp(b * t) where r is the distance
from the axis of the HSV cylinder to the current point in the spiral,
and t is the angle through which the spiral has turned to reach the
current point. a and b are (positive, real) parameters that control the
shape of the spiral.
a: the starting direction of the spiral
b: the number of revolutions about the axis made by the spiral
We permit the spiral to move along the cylinder ('in V-space') between
v_init and v_final, to give a gradation in V (essentially, brightness),
along the path, where v_init, v_final are in [0,1].
A brightness 'jitter' may also be provided as an absolute value in
V-space, to aid in distinguishing consecutive colour points on the
path.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
a Parameter controlling initial spiral direction (a > 0) |
|||
|
b Parameter controlling rate spiral revolves around axis (b > 0) |
|||
|
v_init Initial value of V (brightness) for the spiral (range 0 to 1) |
|||
|
v_final Final value of V (brightness) for the spiral (range 0 to 1) |
|||
|
jitter Degree of V (brightness) jitter to add to each color (range 0 to 1) |
|||
|
Inherited from |
|||
|
|||
Initialise a logarithmic spiral path through HSV colour space
Arguments:
o a - Parameter a for the spiral, controls the initial spiral
direction. a > 0
o b - parameter b for the spiral, controls the rate at which the
spiral revolves around the axis. b > 0
o v_init - initial value of V (brightness) for the spiral.
v_init in [0,1]
o v_final - final value of V (brightness) for the spiral
v_final in [0,1]
o jitter - the degree of V (brightness) jitter to add to each
selected colour. The amount of jitter will be selected
from a uniform random distribution [-jitter, jitter],
and V will be maintained in [0,1].
|
Generate k different RBG colours evenly-space on the spiral. A generator returning the RGB colour space values for k evenly-spaced points along the defined spiral in HSV space. Arguments: o k - the number of points to return o offset - how far along the spiral path to start. |
|
|||
aParameter controlling initial spiral direction (a > 0) |
bParameter controlling rate spiral revolves around axis (b > 0) |
v_initInitial value of V (brightness) for the spiral (range 0 to 1)
|
v_finalFinal value of V (brightness) for the spiral (range 0 to 1)
|
jitterDegree of V (brightness) jitter to add to each color (range 0 to 1)
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Feb 5 17:59:52 2013 | http://epydoc.sourceforge.net |