## Generating the Parametric Equations for Toratopes

Discussion of shapes with curves and holes in various dimensions.

### Generating the Parametric Equations for Toratopes

In one of the other threads (having to do with publishing the article), there is some good info on this, up to 5D. I'd like to dive a little deeper into this, namely the procedural construction method of the equation, starting from a circle.

We know how to derive any implicit equation of any toratope:

1) Start with circle in xy plane, centered at origin of diameter 'a' :

x^2 + y^2 = a^2

2) Shift circle along x by 2a units, so the interior of the circle lies outside the origin, for a non-self-intersecting ring torus:

(x - 2a)^2 + y^2 = a^2

3) Sweep the circle along a circular path into z, around y, by replacing x = sqrt(x^2 + z^2)

(sqrt(x^2 + z^2) -2a)^2 + y^2 = a^2

And we have the equation of a torus. The shift then sweep process can be simplified by replacing any single variable xm with (sqrt(xm^2 + xn^2) -2a). A very easy and straightforward process.

So, how does one do this with parametric equations? What is the shift-then-sweep construction process starting with a circle?

Another thing I wanted to know is how does one write a 3D slice equation of a >3D toratope, parametrically? It doesn't seem as simple by setting variables to zero, as seen in the implicit equation.
It is by will alone, I set my donuts in motion
ICN5D
Pentonian

Posts: 1133
Joined: Mon Jul 28, 2008 4:25 am
Location: Orlando, FL

### Re: Generating the Parametric Equations for Toratopes

With parametric equations (which was the original approach), it works like this:

circle:
x = R cos a
y = R sin a
z = 0

torus:
x = R cos a + r cos a cos b
y = R sin a + r sin a cos b
z = r sin b

You see how the minor circle (r term) is added: the cos part is spread over x and y since you one dimension of the circle is always z, but the other can lie anywhere in the xy plane.

Tiger looks similar:
x = R1 cos a + r cos a cos c
y = R1 sin a + r sin a cos c
z = R2 cos b + r cos b sin c
w = R2 sin b + r sin b sin c

Note that sin and cos are arbitrary -- you can switch them for any parameter without affecting the shape as a whole.

Any parentheses with two terms will work out this way, separating into cos and sin. If a pair of parentheses has three or more terms, it's a bit more complex, for example a sphere is

x = r cos a cos b
y = r cos a sin b
z = r sin a

There can be many such representations, as the number of terms grows.

Let's try deriving a parametric equation of something moderately complex, like the 321-tiger ((III)(II)I).

The outer parentheses have three terms, so we write this as a sphere:
A = r cos a cos b
B = r cos a sin b
u = r sin a

A is (III) and B is (II), so we can expand them with additional radii:
x = r cos a cos b cos c cos d + R1 cos c cos d
y = r cos a cos b cos c sin d + R1 cos c sin d
z = r cos a cos b sin c + R1 sin c
w = r cos a sin b cos e + R2 cos e
v = r cos a sin b sin e + R2 sin e
u = r sin a

Again, this is not the only possible set of parametric equations, various orderings lead to different equations, but they will all describe the same shape.
Marek14
Pentonian

Posts: 1186
Joined: Sat Jul 16, 2005 6:40 pm

### Re: Generating the Parametric Equations for Toratopes

Awesome, thanks! I'm gonna have to pour over this for a bit. There's something else I've been wanting to know how to do: converting from parametric to implicit / implicit to parametric. I might be able to find the parametric way to extrude, taper, spin, etc.
It is by will alone, I set my donuts in motion
ICN5D
Pentonian

Posts: 1133
Joined: Mon Jul 28, 2008 4:25 am
Location: Orlando, FL

### Re: Generating the Parametric Equations for Toratopes

I've been learning quite a bit in the last few days about parametric equations. It all finally clicked: how to derive them for toratopes, convert to implicit, and how rotate. In another thread, you (Marek) outlined a linear construction technique for parametric. That's when it all made sense.

I also found this, a doubly-periodic curve :

x = cos(t)cos(nt)
y = sin(t)cos(nt)
z = sin(nt)

set n=3:
https://www.wolframalpha.com/input/?i=solve+x+%3D+cos(t)cos(3t)+,y+%3D+sin(t)cos(3t),+z+%3D+sin(3t)

The rotation curve is exactly what I've been imagining that might create 3-prong multitorus and the mantis. It does have the criss-crossing cage bars, but a large enough embedded circle/torus should smooth it out. An important part are the intercepts on the xy-plane. They are at the exact locations of an equilateral triangle, and the 3rd roots of unity (projected from the Re, Im plane to x,y). That mathematical property is exactly what we're looking for, in regards to solutions. (doesn't seem to work for 4th roots, at n=4, though)

Another nice thing is the criss crossing at the poles, where we don't get problems with half-circles. But, try to implicitize the 3-prong curve, and you'll run into astronomically complex terms. I don't know, maybe with the help of mathematica, there really is some very elegant equation that defines a 3-prong frame implicitly. What would be better, is to find a way to sharpen the curve at the poles, and form more well-defined semi-circles. To get a single equation that describes an n-prong curve ... well, one can only dream (if that is even what we're after).

In the little I've learned so far, I see much greater potential. The implicit has some advantages, but the parametric can manipulate surfaces on a much deeper level.

What I've been trying to find out, is if it's possible to convert an equation with 3 time variables to just two. Calcplot only accepts 2, which seems really limiting. If there's no workaround, I will have to find another program.

Another thing that I found was accidental, when trying to make a cross section eq of a rotating torus. I tried the same technique as the implicit, by setting the whole equation to zero, for one axis. In other words:

rotating torus equation:

x = ((2 + cos(v))*cos(u))*cos(a) + (sin(v))*sin(a)
y = (2 + cos(v))*sin(u)
z = (sin(v))*cos(a) - ((2+ cos(v))*cos(u))*sin(a)

set to:

x = 0
y = (2 + cos(v))*sin(u)
z = (sin(v))*cos(a) - ((2+ cos(v))*cos(u))*sin(a)

What I unexpectedly got was a 2D image, a projection image of the whole torus! Whoa! I had no idea that that's the way it worked. I should have seen it from the wikipedia article, but it didn't click.

So, it really got me thinking...... if this method creates an n-1D projection of the whole body (not a cross section), then I can feasibly create 3D projections, of the whole body of a 4D toratope. But, the problem still remains regarding the 3 time variables. All four of the 4D toratopes have 3.
It is by will alone, I set my donuts in motion
ICN5D
Pentonian

Posts: 1133
Joined: Mon Jul 28, 2008 4:25 am
Location: Orlando, FL 