NB. Moebius Strip

moebius=: 3 : 0
u=. steps 0 2p1 20
v=. steps _0.3 0.3 20
x=. (cos u) + ((cos u) * cos u%2) */ v
y=. (sin u) + ((sin u) * cos u%2) */ v
z=. (sin u%2) */ v
cleanz 1.5 *"1 fit11 makexyz x;y;z
)

TDATA=: moebius''
TCLR=: (0 0 0 ,: 1 1 1) hue fit01 2{"1 TDATA
TPATTERN=: 16 16$, RGBA WHITE,GRAY,YELLOW,:WHITE
TPATPOS=: */~ int01 <:#TDATA
ROTXYZ=: 325 205 155
CLEARCOLOR=: 0.9 0.9 1
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
)

NB. also?
Another_moebius=: 3 : 0
r=. 5
a=. 1
u=. steps 0 4p1 20
u2=. -: u
x=. ((r-a) * sin u2) */ sin u
y=. ((r-a) * sin u2) */ cos u
z=. (a * cos u2) +/ u*0
cleanz 1.5 *"1 fit11 makexyz x;y;z
)
