This is work in progress, the idea occured when I found an old note
about a mathematical banana that I accidently found one upon a time
(late 1991 or early 1992), perhaps when playing with a raytracer
(POVray) or something like that. The banana surface is given in
implicit form by the equation x^4 + y^4 + 1.5*z^4 + 2*x^2*y^2 +
2*x^2*z^2 + 2*y^2*z^2 - 94*x^2 + 78*y^2 - 94*z^2 + 1521 = 0 and you
can get the image as a postscript file if you
wish. The plot was done using Maple V Release 3 with the commands:
with(plots): eq:=x^4 + y^4 + 1.5*z^4 + 2*x^2*y^2 + 2*x^2*z^2 + 2*y^2*z^2 - 94*x^2 + 78*y^2 - 94*z^2 + 1521 = 0; N:=6:implicitplot3d(eq,x=1..10,y=-3..3,z=-8..8,grid=[N*9,N*6,N*16],title='Banana',style=PATCHNOGRID,scaling=CONSTRAINED,projection=NORMAL,light=[45,45,0.8,1,0],ambientlight=[0.4,0.4,0],shading=NONE,orientation=[-138,68]);You may want to change "N:=6" to "N:=2" or something like that if you are not running on something more powerful than a Sun Ultra 170/1E with 192Mbyte RAM (it took 14 minutes and used 150 Mbyte on that beast with N:=6, but with N:=2 any ordinary computer should be able to do it in reasonable time, for instance a Pentium-PC does it, with N:=2, in 6 seconds using 5 Mbyte of Maple Memory, and, yes, it is done faster on the Ultra, namely in 3 seconds). Pretty intuitive, heh? Well, in principle the plot command is
implicitplot3d(eq,x=1..10,y=-3..3,z=-8..8);the rest is only to make some default choices of the resolution, orientation and some options that are available in the plot window.
clf % width of moebius strip mw=8; % small radius of torus sr=30; % big radius of torus br=100; [u,v]=meshgrid(-pi:0.1:pi+0.1,-pi:0.1:pi+0.1); tx=(br*ones(size(v))+sr*cos(v)).*sin(u); ty=(br*ones(size(v))+sr*cos(v)).*cos(u); tz=sr*sin(v); view(60,50); surfl(tx,ty,tz);axis([-2*br 2*br -2*br 2*br -2*br 2*br]);shading interp; hold on mx=br*ones(size(v))+br*sin(v)+mw*u.*sin(v).*cos(v/2); my=mw*u.*sin(v/2); mz=br*cos(v)-mw*u.*cos(v).*cos(v/2); surfl(mx,my,mz);axis([-2*br 2*br -2*br 2*br -2*br 2*br]);shading interp; colormap('pink')
type xpkleinand you can find where the file is (if you want to edit it) by giving the command
which xpkleinI did that and modified it slightly according to this diff
Yes master? > diff /mailocal/packages/matlab/toolbox/matlab/demos/xpklein.m myklein.m 128c128 < n = 12; --- > n = 30; 143c143 < h=surf(x1,y1,z1,X); --- > h=surfl(x1,y1,z1); 153c153 < h=surf(x2,y2,z2,Y); --- > h=surfl(x2,y2,z2); 157a158 > shading interp;to obtain a more beautiful plot (increased the number of sample points, used a command for plotting surfaces using a lighting model, and used interpolated shading to smoothen off the facets).
My colleauge Peter Hackman made a few variations of the well known
alpha-curve, which is given by the equation x^2-y^2+x^3=0 and the plot
is seen to the left. To make the plot I used Maple and gave the
commands:
with(plots): eq:=x^2-y^2+y^3=0; implicitplot(eq,x=-2..2,y=-2..2,grid=[150,150],scaling=CONSTRAINED);
Last modified: Thu Jan 23 15:35:15 MET 1997