NB. Seashell
NB.
NB. experiment with parameters to seashell
NB.
NB. e.g.
NB.   SEAPARMS=: 0.2 3 0.4 4

SEAPARMS=: 0.2 1 0.1 2

seashell=: 3 : 0
'a b c n'=. y.
u=. steps 0 9r4p1 20
v=. steps 0 2p1 20
nv=. n * v
vp=. v % 2p1
vp1=. 1 - vp
x=. -((a * 1+cos u) */ vp1 * cos nv) +"1 c * cos nv
y=. ((a * 1+cos u) */ vp1 * sin nv) +"1 c * sin nv
z=. ((a * sin u) */ vp1) +"1 b * vp
1.4*fit11 makexyz mid11 each x;y;z
)

TDATA=: seashell SEAPARMS
TPATTERN=: 256 256 $, RGBA (10<?100$100){0.99 0.75 0.5,:1
TPATPOS=: fit01 TDATA
ROTXYZ=: 295 275 75
COLOR=: 1 1 0.5
CLEARCOLOR=: SKYBLUE
COLORMATERIAL=: 1

demo=: 3 : 0
stdlistlight''
gentexture2D TPATTERN
2 drawsurface makenewlist TDATA;'';TPATPOS
)
