Hey Hugh! I don't have any more insights quite yet. I've been prepping for this hurricane. We'll be getting the strongest winds at 2am EDT , since we'll be on the east side of the eye wall. Worst place to be, for a north-bound storm.

gonegahgah wrote:I'm looking to present the whole 4D shape on a 2D screen in a new fashion - by rotated projection.

So I will need to track all the orientations. I'm finding I can use 3 rotations to do that for a cube and I'm guessing I'll find that 6 will do for a tesseract when I look to extend up.

I'm working on the algorithms at the moment to produce the rotations.

Using normal axial rotation approaches creates overlapping results which is probably workable.

However, I'm working more with rotations that will provide unique orientations for every combination of three angles.

This is what I'm planning to do, as well. I don't know how you intend on defining the surfaces, but I'm using parametric equations for the 1D and 2D elements. Like I said, all you need is 3 rotate parameters : xw, yw, and zw. And, you want to combine them into a perspective projection:

3 Rotation Parameters:

• XW

--------

x = (X)*cos(a) - (W)*sin(a)

y = Y

z = Z

w = (X)*sin(a) + (W)*cos(a)

• YW

--------

x = X

y = (Y)*cos(b) - (W)*sin(b)

z = Z

w = (Y)*sin(b) + (W)*cos(b)

• ZW

--------

x = X

y = Y

z = (Z)*cos(c) - (W)*sin(c)

w = (Z)*sin(c) + (W)*cos(c)

use angles a,b,c to rotate

• Now, depending on what program you use, you may need to combine these as one single function:

x =(X)*cos(a) - ((X)*sin(a) + ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*cos(a))*sin(a)

y = (Y)*cos(b) - ((X)*sin(a) + ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*cos(a))*sin(b)

z = (Z)*cos(c) - ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*sin(c)

w = (Z)*sin(c) + ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*cos(c)

• Then, do a perspective projection onto plane xyz (flattening the w-axis, which is important for this specific rotation) , with camera distance 'd' , which you may use d = 5 or 6 , if using edge length 2 for your tesseract :

x = (x)/(w+d)

y = (y)/(w+d)

z = (z)/(w+d)

• Which comes out in a combined equation (it's nasty) :

x = ((X)*cos(a) - ((X)*sin(a) + ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*cos(a))*sin(a))/((Z)*sin(c) + ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*cos(c)+d)

y = ((Y)*cos(b) - ((X)*sin(a) + ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*cos(a))*sin(b))/((Z)*sin(c) + ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*cos(c)+d)

z = ((Z)*cos(c) - ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*sin(c))/((Z)*sin(c) + ((Y)*sin(b) + ((X)*sin(a) + (W)*cos(a))*cos(b))*cos(c)+d)

You will have to implement the above function with every single one of the elements you intend on projecting. If you are making a tesseract with 1D and 2D elements, using edge length of 2, that's:

• 32 line segments ( 4 ways to align a group of 8 lines) :

r(x,y,z,w) = { t , ±2 , ±2 , ±2 }

r(x,y,z,w) = { ±2 , t , ±2 , ±2 }

r(x,y,z,w) = { ±2 , ±2 , t , ±2 }

r(x,y,z,w) = { ±2 , ±2 , ±2 , t }

-1 < t < 1

• 24 squares ( 6 ways to align a group of 4 squares ) :

r(x,y,z,w) = { u , v , ±2 , ±2 }

r(x,y,z,w) = { u , ±2 , v , ±2 }

r(x,y,z,w) = { u , ±2 , ±2 , v }

r(x,y,z,w) = { ±2 , u , v , ±2 }

r(x,y,z,w) = { ±2 , u , ±2 , v }

r(x,y,z,w) = { ±2 , ±2 , u , v }

-1 < u,v < 1

These are the parametrized pieces I'm going to use, but not with a tripe rotate function. I'm doing a single rotation, but with adjustable edge lengths, so I can make rotating rectangular tesseracts. Hyperrectangles!