home *** CD-ROM | disk | FTP | other *** search
- // web4.pop
- // describes a form based on William Latham's "Web Forms"
- // extends upon web.pop by adding rotational commands to horn forms
- // extends upon web1.pop by adding vector-egg-scaling
- // extends upon web2.pop in many ways
-
- population 0
- dimensions = 1
- colour_model RGB
- render_quality flat
-
- genome 0 {
-
- // top level structure iterates in a circle, creating outward pointing spokes
- setScalarMem( 0, 5 : 3 : 10 ), // mem[0] = #spokes
- branchFor(
- getScalarMem(0),
- 1, // mem[1] = current spoke [ 0 ... #spokes-1]
-
- // inter-spoke code - rotates in a circle
- *join(
- swivelLeft( div(dtor(360), getScalarMem(0)) ),
- rotate( <0,0,0> : <-.8,-.8,-.8> : <.8,.8,.8> )
- ),
-
- // spoke code - creates a horn form jutting out at right angles to
- // main circle and then branches smaller sub-horns at right angles
- join(
- swivelRight( dtor(90) ),
-
- // major horn form
- *scope(
- eggScale( 1 : .5 : 1.5 ),
- repeat(
- 5 : 2 : 20,
- join(
- forward( .3 : 0.001 : 0.45 ),
- moveHue( .01 : -.02 : .02 ),
- rotate( <0,0,0> : <-.8,-.8,-.8> : <.8,.8,.8> ),
- eggVectorScale( <1,1,1> : <.9,.9,.9> : <1.1,1.1,1.1> ),
- lay
- )
- )
- ), // end major horn form
-
- // minor branches
- *repeat(
- 10 : 2 : 15,
-
- join(
- forward( .5 : 0.1 : 1.5 ),
- rotate( <0,0,0> : <-.8,-.8,-.8> : <.8,.8,.8> ),
-
- // minor horn-form
- *scope(
- swivelRight( dtor(90) ),
- scale( .5 : 0.1 : 1.3 ),
- repeat(
- 20 : 2 : 40,
- join(
- forward( .5 : 0.05 : 0.6 ),
- moveHue( .01 : -.02 : .02 ),
- rotate( <0,0,0> : <-.8,-.8,-.8> : <.8,.8,.8> ),
- eggVectorScale( <1,1,1> : <.9,.9,.9> : <1.1,1.1,1.1> ),
- lay
- )
- )
- ) // end minor horn form
- )
- ) // end minor branches
-
- ) // end spoke code
- ) // end web 'branchFor'
- }
-
- // eof : web4.pop
-