NB. Ennepers surface
NB.
NB. experiment with texture pattern, e.g.
NB. replace any WHITE with another color

enneper=: 3 : 0
u=. steps _2.4 2.4 25
x=. (u - (u^3)%3) + u */ u^2
y=. |: x
z=. -/~ u^2
cleanz 1.3 1.3 2.4*"1 fit11 makexyz x;y;z
)

TDATA=: enneper''
TCLR=: (0 0 0 ,: 1 1 1) hue fit01 -0{"1 TDATA
TPATTERN=: 256 256 $, RGBA BROWN,WHITE,WHITE,:WHITE
TPATPOS=: */~ int01 <:#TDATA

ROTXYZ=: 288 5 10
TRNXYZ=: _0.15 0 0
CLEARCOLOR=: 0.9 1 0.9
COLORMATERIAL=: 0
AMBIENT=: 0.8
DIFFUSE=: 0.75 0.75 1
SPECULAR=: DIFFUSE
SHININESS=: 50 0 0 1
POSITION=: _3 _5 _1 0

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