NB. Dini's Surface
NB. - constant negative curvature.

dini=: 3 : 0
u=. steps 0 4p1 40
v=. steps 0.05 2 20
x=. (cos u) */ sin v
y=. (sin u) */ sin v
z=. (0.4 * u) +/ (cos v) + ^. tan v%2
cleanz 3 3 1.5 *"1 fit11 makexyz x;y;z
)

TDATA=: dini''
TCLR=: (0 0 0 ,: 1 1 1) hue fit01 2{"1 TDATA
TPATTERN=: 8 8 $, RGBA WHITE,GRAY,YELLOW,:WHITE
TPATPOS=: */~ int01 <:#TDATA
ROTXYZ=: 310 0 0
TRNXYZ=: 0.75 0.25 0
CLEARCOLOR=: 1 0.9 0.9
COLORMATERIAL=: 0
AMBIENT=: 0.8
DIFFUSE=: LIMEGREEN
SPECULAR=: DIFFUSE
SHININESS=: 50 0 0 1

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