

Thread Tools  Search this Thread  Display Modes 
5th May 2002, 07:47  #1 
Forum King

Hypercube (4D analog of a cube)
I've constructed a mostly functional (and extremely fast) hypercube, but since I don't have a functional zip program, I'll have to post the code here. People can use it as they wish, as long as they give me full credit for it
Init: n=58; Beat: iwxt=rand(100)/10000.05; iwyt=rand(100)/10000.05; iwzt=rand(100)/10000.05; ixyt=rand(100)/10000.05; ixzt=rand(100)/10000.05; iyzt=rand(100)/10000.05; Frame: p=0; wxt=wxt+iwxt; wyt=wyt+iwyt; wzt=wzt+iwzt; xyt=xyt+ixyt; xzt=xzt+ixzt; yzt=yzt+iyzt; cwx=cos(wxt); swx=sin(wxt); cwy=cos(wyt); swy=sin(wyt); cwz=cos(wzt); swz=sin(wzt); cxy=cos(xyt); sxy=sin(xyt); cxz=cos(xzt); sxz=sin(xzt); cyz=cos(yzt); syz=sin(yzt); Point: p=p+1; w1=(equal(p,2)+equal(p,9)+equal(p,15)+equal(p,21)+equal(p,22)+equal(p,23)+equal(p,24)+equal(p,25)+equal(p,26)+equal(p,28)+equal(p,29)+equal(p,30)+equal(p,31)+equal(p,32)+equal(p,34)+equal(p,35)+equal(p,36)+equal(p,37)+equal(p,38)+equal(p,39)+equal(p, 40)+equal(p,42)+equal(p,43)+equal(p,44)+equal(p,45)+equal(p,53)+equal(p,54)+equal(p,55)+equal(p,56)+equal(p,57)+equal(p,58))*21; x1=(equal(p,4)+equal(p,11)+equal(p,17)+equal(p,18)+equal(p,19)+equal(p,20)+equal(p,21)+equal(p,26)+equal(p,27)+equal(p,28)+equal(p,29)+equal(p,30)+equal(p,31)+equal(p,40)+equal(p,41)+equal(p,42)+equal(p,43)+equal(p,44)+equal(p,45)+equal(p,46)+equal(p ,48)+equal(p,49)+equal(p,50)+equal(p,51)+equal(p,52)+equal(p,53)+equal(p,55)+equal(p,56)+equal(p,57)+equal(p,58))*21; y1=(equal(p,6)+equal(p,13)+equal(p,14)+equal(p,15)+equal(p,16)+equal(p,17)+equal(p,25)+equal(p,26)+equal(p,27)+equal(p,28)+equal(p,30)+equal(p,31)+equal(p,32)+equal(p,33)+equal(p,34)+equal(p,36)+equal(p,37)+equal(p,38)+equal(p,45)+equal(p,46)+equal(p ,47)+equal(p,48)+equal(p,50)+equal(p,51)+equal(p,52)+equal(p,53)+equal(p,54)+equal(p,55)+equal(p,57)+equal(p,58))*21; z1=(equal(p,8)+equal(p,9)+equal(p,10)+equal(p,11)+equal(p,12)+equal(p,13)+equal(p,19)+equal(p,23)+equal(p,31)+equal(p,32)+equal(p,33)+equal(p,34)+equal(p,35)+equal(p,36)+equal(p,38)+equal(p,39)+equal(p,40)+equal(p,41)+equal(p,42)+equal(p,44)+equal(p, 45)+equal(p,46)+equal(p,47)+equal(p,48)+equal(p,49)+equal(p,50)+equal(p,52)+equal(p,53)+equal(p,54)+equal(p,55)+equal(p,56)+equal(p,57))*21; w2=w1*cwx+x1*swx; x2=w1*swxx1*cwx; w3=w2*cwy+y1*swy; y2=w2*swyy1*cwy; w4=w3*cwz+z1*swz+5; z2=w3*swzz1*cwz; x3=x2*cxy+y2*sxy; y3=x2*sxyy2*cxy; x4=x3*cxz+z2*sxz; z3=x3*sxzz2*cxz; y4=y3*cyz+z3+syz; z4=y3*syzz3+cyz; x5=x4/w4; y5=y4/w4; z5=z4/w4+5; x=x5/z5*8; y=y5/z5*8; PS: If anyone knows where to get a free version of PKzip, email the URL to me at therealatero@hotmail.com "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
5th May 2002, 14:17  #2 
Junior Member
Join Date: Apr 2002
Location: Austria
Posts: 13

haven´t tried your cube yet
but u could check on: http://www.tucows.com/system/comp95.html for comp/decomp utilities cu sonic 
5th May 2002, 14:55  #3 
Major Dude

atero, cool thing, but what is it? a dm or a ssc?
like i tried both thing and on the ssc and on the dm it didn't appear anything so... and atero, http://www.winzip.com , download winzip 8.1, (and if you need a crack, pm me) batman 
5th May 2002, 16:36  #4 
Major Dude
Join Date: Feb 2002
Location: home
Posts: 1,318

Yeah, I plugged it into a superscope, but nothing. (60 fps though)

5th May 2002, 17:34  #5 
Forum King

That's odd...
Aaaaaaaaaaaaaaaaaaaaaaaaagh, I know why it is. When you copy and paste it, it adds all the line breaks  you might have to get rid of them yourselves... And it's a superscope  I don't want to think of what it'd look like as a DM "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
5th May 2002, 17:48  #6 
Forum King

There we go...I also slowed the movement down so you can follow it
"guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
5th May 2002, 18:04  #7 
Major Dude

Firstly I'm amazed on how quick it is... all that code...
But since it's obvious you used pointbypoint assignment, it's not as amazing as it is to me anymore =p It IS amazing... but I don't know whether an average AVSviewer will like it  Some people don't even see what's in an AVS ya know  They'd think "It's just a boring stupid shape" and leave... fortunately we have a lot of people that digs in the AVS =) How are you going to implement that SSC into an AVS preset? [soon to leave, sirs] 
5th May 2002, 18:13  #8 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

Neat
So that's why you wanted 4D rotation . I've been thinking of doing something like this, but I assumed that the result would be too confusing to be cool. If you look closely, you can see that it's a 3Dcube, but instead of square faces, each face is a 2D view of a 3D cube. The logical explanation is that a 4D hypercube consists of 6 cube 'faces'.
I'm going to try more 4D things now. 
5th May 2002, 18:48  #9 
Major Dude
Join Date: Feb 2002
Location: home
Posts: 1,318

Man, that looks messed.
I just don't get it. Can't really tell what's going on. Not for me, sorry. 
5th May 2002, 20:28  #10 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

To understand what a 4D (or ndimensional) cube is, look at the evolution of a cube from 0D to 3D:
 Take a point (0D)  Copy the point and move it, and connect it with a line => we now have a 1D shape (a line)  Take the line (1D)  Copy the line and move it into the second dimension, and connect both ends with 2 lines => we now have a 2D shape (a square)  Take the square (2D)  Copy the square and move it into the third dimension, and connect the matching pairs of corners with 4 lines => we now have a 3D shape (a cube) Now comes the 'weird' part:  Take the cube (3D)  Copy the cube and move it into the fourth dimension, and connect the matching pairs of corners with 8 lines. If you understand the idea, you can expand it into n dimensions. Now, we live in a 3D world, and therefor we can't naturally visualise higher dimensional shapes. To understand what happens, consider a 2D universe (a flat plane) and how it relates to 3D. Just like you can represent 3D by an infinite amount of 2D 'slices' (planes), you can think of 4D as composed of an infinite amount of 3D 'slices' (spaces). Now, think about how we represent 3D space on a flat plane: we project all the points from an eye onto a plane, commonly by dividing by the 'z' coordinate. So if you wanted to represent a 4D hyperspace in 3D space, you'd need to divide 3 coordinates by a 4th (as you're projecting a 4D hyperspace onto a 3D space). This is what Atero's superscope does. On top of that, it takes the 3D result, and projects it onto 2D like any other 3D superscope. Now, you might say "aha! so it's not actual 4D! it's just a 3D shape that moves in a weird way!". Well, so is 3D on a computer: it's a 2D shape that looks like 3D, because our eyes view the world like that too. Now specifically about a 4D hypercube: A 3D cube has 6 square (2D) faces. A 4D cube has 8 cube 'faces' (3D). If you look at Atero's superscope, you'll notice that it hardly looks cubic: all the angles are distorted. Well, if you look at how you draw a 3D cube on a 2D paper, it'll be distorted too. You're just used to it so much, that it becomes natural. Higherdimensional shapes might sound like an alien concept, but they have many uses in mathematics and science. And as we can now see, they look cool too 
5th May 2002, 20:31  #11 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

Typo?
I think there's a typo here:
y4=y3*cyz+z3+syz; z4=y3*syzz3+cyz; Those 2 + signs should be multiplications, right? 
5th May 2002, 23:10  #12 
Forum King

That's what was the wrong with it! I've been checking all over my code for typos, but I couldn't find them. Thanx!!
BTW, I'm still trying to work out the scaling/shifting so that it renders correctly. The scaling factors are in the last Waxis statement (w4), and in the very last line where the transforms are taking place "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
9th May 2002, 11:58  #13 
Major Dude
Join Date: Apr 2002
Location: Ballarat, Australia
Posts: 529

Would that mean that a torus is 4dimensional? Because that HyperCube looks awfully like a very lowres toroidal shape.

9th May 2002, 16:19  #14 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

A regular torus is a simple 3D shape.
You don't seem to be getting the point though. The dimension of a shape/space can be seen as the number of linearly independent vectors you can construct in it. For example: In a flat plane, you can construct 2 base vectors (e.g. the X and Y axis) that, when added up, can reach the entire plane. It's impossible to find a third vector that can't be broken up as a sum of the earlier two. In space, there are 3 such vectors (e.g. X, Y, Z). Now, imagine a hypothetical 4D space, where there are 4 such vectors. In our reality, there is no such thing (or at least not found ). To show this 4D shape, we project it into 3D space, much like we can project a 3D shape onto a 2D plane (e.g. a computer screen). So while it becomes a 3D/2D shape, we actually still have the originating 4D shape in mind. A (hyper)cube is very different from a (hyper)torus. It might look the same here, but that's because it's very hard to visualise the 4D structure. 
13th May 2002, 00:52  #15 
Forum King

UnConeD, were you talking to me or Zevensoft?
Anyway, I'm trying to figure this one out: Theoretically, w, x, y, and z should only range from 1 to 1. However, when I shift w by 2 (so it's from 1 to 3) to translate it to 3D, I get distortion. Also, after that translation, the shift of sqrt(2) does not work on the 3D/2D translation  I have to shift and scale by 2. But that brings up another mystery: Using those shifts, the sphere the cube is projected into (and thereby the ring that sphere is projected into) fits perfectly into the window. With shifting and scaling by 2 on any 3D superscope, you end up with a ring larger than the window. Any ideas? ZS, the hypercube is a much different object from the hypertorus. Think of it this way: A two dimensional torus would be an O shape. Stretch that into the third dimension and it becomes a donut, or torus, in prissymathematicianspeak. (Why an I hungry all of a sudden?) You can then stretch that into the fourth dimesion (I don't know how, but I'm working on it); this is the hypertorus. Why did you think my hypercube looked 'toroidal?' This is a (rather poor) wireframe torus: tpi=acos(1)*2; x=sin(i*tpi)*(sin(i*tpi*500)/3+1); y=cos(i*tpi)*(sin(i*tpi*500)/3+1); z=cos(i*tpi*500)/3; UnConeD, do you know the coordinates for a hypertorus? "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
13th May 2002, 09:17  #16 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

Well actually there are two things you can mean by a torus.
Take a grid. Bend it so that two opposite edges are joined, you now have a cylinderlike shape. Bend it again so that the remaining two edges (now circles) are joined: you now have a donut. So the main property of a ntorus is that is an ngrid that is connected to itself in every direction. This has a few 'weird' consequences: for example, if you start out with the other pair of edges, you'll get a differently oriented donut, but the topological properties are still the same. I've been thinking about a system behind hypertori (like the system to go from dot to line to square to cube to hypercube) and here's what I believe is close to correct:  Take a point (0D)  Trace a circular path with it, so that the center of the circular path is outside the shape, and a new axis is used. We now have a circle (2D). However a point on the shape itself can always only move on 1 degree of freedom, so the shape's topology can be considered 1D. Note that this is essentially a line with its begin and endpoints connected.  Take this circle, and trace a circular path with it, so that the center of the circular path is outside the shape, and a new axis is used. We now have a torus/donut (3D). However a point on the shape itself can always move only on 2 degrees of freedom, so the shape's topology can be considered 2D. Note that this is a 2D grid with both pairs of ends connected to the opposite side.  Take this donut, and trace a circular path with it, so that the center of the circular path is outside the shape. We now have a 4hypertorus (4D). However a point on the shape itself can always move only on 3 degrees of freedom, so the shape's topology can be considered 3D. Note that this is a 3D grid with all pairs of opposite faces connected to the opposite side. So for one, you have the topology, and always several geometrical representations that satisfy this topology. Think of generating it by having a hyperdimensional compass (is this the right word? a tool for drawing circles on paper) and dragging the dot, circle and donut through (hyper)space. The formulas have a system to them too. You're always shifting the previous shape around on one axis, and then rotating around to get the circular path: 1: x1 = 0; 2: x2 = (x1 + R1)*cos(a1); y2 = (x1 + R1)*sin(a1); 3: x3 = x2; y3 = (y2 + R2)*cos(a2); z3 = (y2 + R2)*sin(a2); 4: x4 = x3; y4 = y3; z4 = (z3 + R3)*cos(a3); w4 = (z3 + R3)*sin(a3); ... Rx are the radii of the separate stages, ax are a variable ranging from 0...2PI. 
14th May 2002, 07:22  #17 
Forum King

Umm...I applied that to AVS, and the system renders a pringleshape. I assume ax can be i*tpi?
Anyway, attached is the 5D analog, missing only a few lines  I'm trying to find them (so I don't have to rewrite the whole thing from scratch). I'm guessing since "hypercube" is 4d, "super," "ultra," or "sugarrushcube" could be names for 5d.... "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
14th May 2002, 07:32  #18 
Senior Member

I get it now. It's a cube within a cube at first, right? Then the eight connecting lines manipulate their length, like that of a square does to form a generic 4sided shape. Have I got it?

14th May 2002, 08:29  #19 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

uNDefineD: well yes and no.
First of all, remember that it's not what it looks like. Just like a 3D cube is a very ugly shape when you draw it in 2D. It's only our brain that makes it look 3D. Now, remember how you go from a 2D square to a 3D cube, by taking 2 squares and connecting the corresponding pairs of vertices. Now, take a cube. Take another cube and move it in a theoretical 4th dimension. Connect the corresponding vertices. What we have now, is a 4Dhypercube. To understand what it 'looks' like, look at the following analogies:  A 1D line has 2 0Dpoints  A 2D square has 4 1Dlines  A 3D cube has 6 2Dsquares  A 4D hypercube has 8 3Dcubes And there you have it. It's not just 2 cubes that you see, it's 8. Of course, because of the 4D>3D perspective, it'll only look cubic in some positions. But in the original 4D concept, every line is perpendicular to every other line, and they are all of length 1. To make it clearer: in the beginning you see the 'larger' cube and the 'smaller' cube (they're actually the same size if it weren't for the perspective). Now, each face of the smaller cube is connected with the corresponding face of the larger cube. Look at the series of analogies above: take 2 squares (the 2 corresponding faces) and connect them, you now have a cube (if they are the same size and spaced apart at the same length). There's really not much more to be said. It's a weird concept that you have to get used to. Just don't try to think of it in terms of 3D, because it isn't. 
14th May 2002, 08:37  #20 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

The 5D version is nice by the way. As far as the naming goes, I've always been taught that 'hyper' is the generalized form:
A 2hypercube is a square. A 4hypercube is what you posted at first. So the last one is a 5hypercube, right? As far as the 4hypertorus goes, the difficulty lies in drawing all the connecting lines. For example, to draw a sphere you need to draw both parallels and *******ns. I think the easiest way would be to synchronize 3 superscopes in which each superscope draws one main direction (remember that a 4hypertorus is a connected 3D space, just like a 3D torus is a connected 2D grid). 
14th May 2002, 11:14  #21  
Senior Member

Quote:
EDIT: I just saw the Supercube. Because it was moving too fast , I'm _guessing_ that since it's 5D, continuing from UnConeD's analogies, a 5D supercube has 10 4D hypercubes, is that correct? BTW, I must give you kudos for putting up with people who can't code. 

14th May 2002, 11:38  #22 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

uNDefineD: you're totally correct. It has nothing to do with being able to code by the way... the concept of higher order dimensions is not easy to explain, because most people will still try and visualise everything in 3D. Once you let go of that, it's easier.
The 5D hypercube should indeed have 10 hypercubes in it, but as Atero said there are a few sides missing. And because it's representing 5 dimensions in 2, it's very hard to see the geometry in it. All in all this is very fun thread . Higher dimensional geometries are normally only used theoretically (e.g. a computer network can be connected in a 4Dhypercube arrangement, or even higher) but it seems they're cool for visuals too. 
15th May 2002, 00:48  #23 
Senior Member

Thanks, UnConeD. BTW, about the code thing, I was just making a reference to my inability to logically work out SSCs and DMs and stuff. For me, it's random equations and hope for the best. Seemed to work with my Power Core though...

15th May 2002, 21:01  #24 
Forum King

Some of my personal theories on ndimensional geometry:
Objects in the n'th dimension are seen in the (n1)'th dimension. The closest example is real 3D life: you can see depth, but the depth is created by your mind. Put your hand up in front of your face. You can see the depth beyond your hand, but you cannot see what is behind it. Therefore you see in 2D. A more biological proof is that your retina is 2D, and therefore you cannot see in any higher of a dimension. Imagine then sight on a line. You would see in 0D. The only places you could see would be directly in front of and behind you. On a plane you would see in 1D. And in hyperspace you would see in 3D. To create a higher dimensional object, it is said that you need to move something 'back' into the next dimension. However, we cannot easily do this without creating a perspective into the next dimension first. Put yourself into the first dimension. Shrink the line you are on, then connect the endpoints. This creates a perspective of the second dimension. Then in the second dimension, shrink the square, and connect the vertecies. This is a perspective of the third dimension. Now shrink a cube and connect the vertecies. This is a perspective of a hypercube. Theoretically you would now shrink the hypercube, but since we don't know exactly what the hypercube looks like, we can't do that. The other way to create a perspective is to extend your current object on every dimension available. Then stretch the new objects to meet each other, creating the last new object. For example, copy a square to the left, right, up and down. Then stretch each square to meet the ones next to it, creating a new larger square. Another example is to copy a cube up, down, left, right, backwards, and forwards. Then stretch each new cube to meet the one next to it, creating a new cube. Now once you've created a perspective, move the new objects backwards into the next dimension, without changing the perspective, until all angles are right. I have also developed a formula for finding the number of edges in an ndimensional cube: 2^(n1)*n which is basically an expression of the number of connections you can make between two adjacent points. 2^n is the number of points (a line is 2 points, four lines of a square is 4 points, six sides of a cube is 8 points, etc.), and n is the number of possible changes (one for each dimension). However, you do each connection twice with that formula: (1,1) : (1,1) :: (1,1) : (1,1), so you divide by 2; hence 2^(n1). [edit: smilies were screwing up the above bit of code] "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
16th May 2002, 07:18  #25  
Senior Member

Quote:
And one more thing Atero: could I use a remix of your preset for my AVS pack? Cause I reckon I've got something pretty good going on. 

17th May 2002, 02:26  #26 
Forum King

Which preset? The one that I posted in a new topic, completely seperate and disassociated with this one? Or do you just want to use my hypercube?
Yes, sure, why not, as long as you give me full credit for the morpher and the smoke bgdm or the hypercube coding. "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
17th May 2002, 05:38  #27 
Senior Member

Sure. Credit is given where it is due. I didn't mess with the render anyway, all I added was Trans elements.
Thank a lot! You've made my day! EDIT: I'm using the hypercube. I have no idea what the other thingy is... 
19th May 2002, 04:00  #28 
[Forum Pastry]
Join Date: Jun 2001
Posts: 1,032

/me would like to use hypercube
Needs more moocows. 
20th May 2002, 00:39  #29 
Forum King

Sure, I don't mind (again, as long as I'm given full credit for it)
"guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
22nd May 2002, 06:42  #30 
Junior Member

I think that every part of mathematics has now been integrated in to AVS.

22nd May 2002, 14:20  #31 
Major Dude
Join Date: Apr 2002
Location: Ballarat, Australia
Posts: 529

Well, did you know that scientists have found 10 dimensional objects? Basically, they are the smallist objects you can get, called strings (atom > quark > gluon > string). The way they can be explain is, take a line, extend it out into a plane, then wrap it round into a cylinder. Now, that cylinder is made very small, so it looks like a line again, then, extend that into a plane, and wrap it around, and so on. This has been thought to be the basis for all time and space in this universe.

23rd May 2002, 05:28  #32 
Junior Member

Mathematically, I suppose, there can be an infinite number of dimensions. I found a site a long time ago that had pictures of what a 15th dimensional object looked like. It was just a bunch of lines.
ok I'm done... 
25th May 2002, 11:10  #33 
Major Dude
Join Date: Apr 2002
Location: Ballarat, Australia
Posts: 529

4D Sphere
Here's the code for a 4D sphere. It's colourcoded, so that values of W from 1 to 1 are parts of the spectrum from red through green to blue. Z is represented by Brightness.
Init: code: Per Frame: code: Per Point: code: Its best also if you add a Misc>Set render mode and set it to maximum blend with line width of 3. BTW if you want change res to how many 3D subspheres you want (squared equals amount of cirles). 
25th May 2002, 15:36  #34 
[Forum Pastry]
Join Date: Jun 2001
Posts: 1,032

just dont ask anyone to have res=100
Needs more moocows. 
30th May 2002, 02:27  #35 
Forum King

What's the derivation of the hypersphere? It works perfectly, I can see all 8 spheres and their rotation
"guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
31st May 2002, 05:19  #36 
Forum King

I just made a stupid...I can see all the SUBSPHERES and their rotation
WHOAH! I just noticed why my hypercube is all hugified! I was trying to solve the puzzle about the correct shifting factor, and I discovered that I had to shift it on the waxis by sqrt(8) for it to work properly. Well, I just found out that if I do this: a=(...)0.5; instead of this: a=(...)*21; (a is the axis, and ... is the tracing content) I only have to shift w by sqrt(2)  the supposedly correct shifting factor. Then I used this scope: w1=i*21; x1 through z1=0; and shifted by sqrt(2), and it worked fine. That means that the ... must equal 2 at the end. That shouldn't be happening! Each equal(a,b) statement only happens once, but it's like they're happening twice  they return 0 or 1, but right now they're either doubling themselves or they're returning 2. How would that be happening? The same goes for my 5d rotation. If it's just a line spanning from 1 to 1, and u, w, and z are all shifted by sqrt(2), the 5hypersphere that it's rotating in is projected correctly in the window. But I can't fix the 5hypercube the same way. I'm still trying to find the right scaling factor for it...when I do I'll post it "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
31st May 2002, 13:55  #37 
Major Dude

the 4dsphere, is that a sphere with 8 3dspheres inside?
and why does it look like a lot of spirals batman 
31st May 2002, 20:37  #38 
Forum King

I don't think you fully understand dimensional geometry yet. First of all, the step up from sphere to hypersphere is the same as from circle to sphere. A sphere is made up of an infinite number of circles, changing in size. A hypersphere is made up of an infinite number of spheres, ranging in size. Of course, we can't render an infinite number of spheres, or circles, so we have to take short cuts. For a sphere all we do is render a line spiraling around in a spherical shape. Then (I think) you render a sphere like this several times, and then stretch it into the fourth dimension (hyper)spherically. This creates the hypersphere Zevensoft made. res controls the number of spheres rendered.
Also, I find for the hypersphere res should be a power of 10 and n should be an exponent of res divided by 10, 100, or 1000 PLUS ONE. The plus one ensures that everything is congruent (which makes it much easier to watch). "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 
1st June 2002, 00:20  #39 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

The hypersphere is nice, but it has one flaw: it doesn't describe the surface of the sphere. Using a line to spiral around a spherical surface gives you the shape, but it fails to describe the topology.
A better representation of a sphere is using parallels and *******ns (as in my Groovy Saturn preset). Of course, doing this for a hypersphere would be *very* hard. But it's really the best thing to do. Just like the hypercube is only complete with all the connecting lines. 
2nd June 2002, 20:10  #40 
Forum King

UnConeD, I've been reading a book on the subject, and it had the source code for a program (in C) which will supposedly render ndimensional cubes. I compiled it, the code is fine, it just doesn't work. The rendering part goes something like this:
printf("%f %f \n",x1,y1) f, x1 and y1 should be the coordinates for the points. The only problem is, it's printing a series of numbers, not positions. I think it has something to do with my using a C++ compiler. Could you help? If you want I could send you it's code, my code (i had to tweak it a bit to fit my compiler), and the program. "guilt is the cause of more disauders than history's most obscene marorders" E. E. Cummings 

Thread Tools  Search this Thread 
Display Modes  

