# Tutorial on VRML with Maple V--Villarceaux Circles

Jen-chung Chuan
Tsing Hua University
Hsinchu, Taiwan 300
jcchuan@math.nthu.edu.tw

### Sections of a torus

When a torus is cut in half, its boundary could consist of
two disjoint circles,

two concentric circles,

two intersecting circles,

or two interlocking circles.

The last two phenomena are visually nontrivial.

### Computing environment

Creating geometric objects such as the ones displayed above is not difficult under the current computing environment. The following requirements are sufficient for the task:
1. Maple V release 5 (or above),
2. Netscape Communicator 4.5 (or above),
3. Plugin Cosmo Player for Netscape.
Maple V is used to experiment with mathematical ideas and also to create the VRML files. Netscape Communicator configured with plugin Cosmo Player serves as a viewer of the VRML files. If the computer is connected to the Internet, the user enjoys the additional advantage of experimenting VRML files created by other users in an interactive manner.

### Mathematical ideas converted to VRML file

Since Maple V is basically a piece of mathematical software that relies heavily on symbolic manipulating, we need to supply computer with commands full of mathematical formula. Since a torus is nothing but an ideal object obtained by rotating a circle about an axis lying on the same plane as the circle, we might as well assume the z-axis the axis of rotation, the circle having radius a and c the distance from the center of the hole to the center of the torus tube. The torus can now be described by these parametric equations:

 x = (c+a cos(t)) cos(s) y = (c+a cos(t)) sin(s) z = a sin(t)

The actual Maple commands are direct translation of the above formulation:

 a:=3:b:=4:c:=sqrt(a^2+b^2); r:=c+a*cos(t); x:=r*cos(s); y:=r*sin(s); z:=a*sin(t); plot3d([x,y,z],s=0..2*Pi,t=0..2*Pi,scaling=constrained, grid=[50,100],color=cyan);

(Maple commands? Yes, it is a technical programming language. It is so straightforward that you don't need a 5-kilo manual to understand it.)

We now see this appearing on the screen:

To obtain the first two half-tori, simply replace the ranges of the parameters s and t by

s=0..Pi, t=0..2*Pi
and
s=0..2*Pi, t=0..Pi

As for the third half-torus, it is the part of the complete torus lying below the plane

b z = a x,
therefore we apply the command

 u:=solve(b*z=a*x,s);

to compute the range of the parameter s. To view the modification, replace the last command by

 plot3d([x,y,z],s=-u..u,t=0..2*Pi, scaling=constrained,grid=[50,100],color=cyan):

Once we are satisfied with the appearance of the geometric model, we are ready to convert it to VRML. In Maple V, the command vrml resides in the library plottools. To invoke it, we need to issue the command

 with(plottools):

Before applying the command vrml, we need to "squeeze" the action of drawing into one symbol h:

 h:=plot3d([x,y,z],s=-u..u,t=0..2*Pi, scaling=constrained,grid=[50,100],color=cyan):

Finally, apply the magic command

 vrml(h,"f:/data/halftorus.wrl",background_color=white);

The VRML halftorus.wrl is to be found under the subdirectory f:\data\, ready to be viewed directly with Netscape.

The fourth model is obtained by rotating the circle

[b cos(t), a + c sin(t), a cos(t)]
about z-axis by p. Here is the complete listing of commands:

 a:=3;b:=7;c:=sqrt(a^2+b^2);x1:=b*cos(t); y1:=a+c*sin(t); z:=a*cos(t); x:=x1*cos(u)-y1*sin(u); y:=x1*sin(u)+y1*cos(u); h:=plot3d([x,y,z],u=0..Pi,t=0..2*Pi,scaling=constrained); vrml(h,"f:/data/halftorus.wrl",background_color=white);

You may find the related Maple V and VRML files under this webpage:

http://poncelet.math.nthu.edu.tw/chuan/vrml/villarceau.html

### References

1. John Banks and Jeff Brooks, A Mathematical Approach to

2. Slicing Doughnuts, http://johnbanks.maths.latrobe.edu.au/Torus/.
3. Z.A. Melzak, Invitation to Geometry, pp. 63-68.
4. M. Villarceaux, Théorème sur le tore, Nouv. Ann. Math. 7, 345-347, 1848.
5. Eric W. Weisstein, CRC Concise Encyclopedia of Mathemaitcs, p. 1910.