A while back, someone asked me for a good way to plot a Klein Bottle in Maple. I didn't have a good answer at the time, but I recently stumbled upon the following, which does a pretty good job if you don't mind the use of Heaviside in the parameterization.

plot3d(
[4*(1-1/2*cos(u))*sin(v),
6*cos(u)*(1+sin(u))+4*(1-1/2*cos(u))*(cos(u)*(1-Heaviside(u-Pi))+Heaviside(u-Pi))*cos(v+Pi*Heaviside(u-Pi)),
-(16*sin(u)+4*(1-1/2*cos(u))*sin(u)*cos(v)*(1-Heaviside(u-Pi)))],
u=0..2*Pi, v=0..2*Pi,
'scaling'='constrained', 'shading'='zhue', 'style'='wireframeopaque');

plot3d([4*(1-1/2*cos(u))*sin(v),  6*cos(u)*(1+sin(u))+4*(1-1/2*cos(u))*(cos(u)*(1-Heaviside(u-Pi))+Heaviside(u-Pi))*cos(v+Pi*Heaviside(u-Pi)), -(16*sin(u)+4*(1-1/2*cos(u))*sin(u)*cos(v)*(1-Heaviside(u-Pi))) ], u=0..2*Pi, v=0..2*Pi, scaling=constrained, shading=zhue, style=wireframeopaque)

I share it here so perhaps whomever it was that asked me about this can now find this answer via Google.

Challenge: big kudos to anyone who can make a flythrough animation with this plot using the 'vewpoint' option added in Maple 13.


Please Wait...