Fun mathematics

=============


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.

If you have seen the swedish forum for quality in teaching mathematics, mattekvalitet, maybe you wondered how I made the picture of a Möbius strip interlinked with a torus. Well, I used MATLAB (ver 4.2c) with the commands:
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')

That's all. I should not take all credits for the MATLAB script, actually I just modified the script (included in the distribution of MATLAB) for plotting the klein bottle. If you have MATLAB you can study the script by giving the command
type xpklein
and you can find where the file is (if you want to edit it) by giving the command
which xpklein
I 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);


This is the curve given by x^2-y^2++x^3+y^3=0. Tilt your head and observe that this is a theta-curve. :-)

This is the curve given by x^2-y^2++x^3+2*y^3=0. Apparantly a vartheta-curve. :-)
I commented that when I've seen this it's no surprise that some people think that math is like greek to them. :-) Ooops, forgot to warn you about my corny humour. Anyway, I started to play with the equations too:
Let me see, how does one tie a knot?

Even though the curve isn't smooth and even it is an odd knot for virtual christmas wrappings. Ya say it's even since it's tie(d)? :-)

This is the curve given by 0.001+x^4-2*x^2*y^2+3*x^5+3*x^2*y^3+y^4-3*y^2*x^3-3*y^5+1*x^6+4*x^3*y^3+2*y^6=0. Maybe it should be called shooting eagle with sharp arrow? Or, maybe it should be left as an unbiased rorschach-test.

This is the curve given by 0.001+x^4-3*x^2*y^2+3*x^5+3*x^2*y^3+y^4-5*y^2*x^3-3*y^5+2*x^6+4*x^3*y^3+2*y^6=0. Shooting fat seagull with blunt arrow? Tnx to zap@lysator.liu.se for comments on this and the two curves above.


Peter Johansson (pejoh@mai.liu.se)


[ LiU och LiTH |  Välkommen till MAI |  Tillämpad matematik |  Personal |

Last modified: Thu Jan 23 15:35:15 MET 1997