24.04.2014 Views

clifford_a-_pickover_surfing_through_hyperspacebookfi-org

clifford_a-_pickover_surfing_through_hyperspacebookfi-org

clifford_a-_pickover_surfing_through_hyperspacebookfi-org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SMORGASBORD FOR COMPUTER JUNKIES 195<br />

Code 3. Draw a Klein Bottle (Mathematical<br />

Mathematica is a technical software program from Wolfram Research (Champaign,<br />

Illinois). With this versatile tool it is possible to draw beautiful Klein bottles<br />

as discussed in Chapter 5. The following is a standard recipe for creating Klein<br />

bottle shapes using Mathematica.<br />

In[l]:= botx = 6 Cos [u] (1 + Sin[u]);<br />

boty = 16 Sin[u];<br />

rad =4(1- Cos[u] / 2);<br />

In[4]:= X = If[Pi < u False,<br />

Boxed -> False, ViewPoint-> {1.5, -2.7, -1.6}]<br />

Out[7]= -Graphics3D-<br />

The following is a fragment of code from a C program that draws little spheres<br />

along the surface of a Klein bottle.<br />

ALGORITHM: How to Create a Klein Bottle<br />

pi = 3.1415;<br />

for(u= 0; u pi)&&(u pi)&&(u

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!