Go Back   Winamp Forums > Visualizations > AVS > AVS Presets

Closed Thread
Thread Tools Search this Thread Display Modes
Old 5th May 2002, 06:47   #1
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
Hypercube (4-D 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)/1000-0.05; iwyt=rand(100)/1000-0.05; iwzt=rand(100)/1000-0.05; ixyt=rand(100)/1000-0.05; ixzt=rand(100)/1000-0.05; iyzt=rand(100)/1000-0.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))*2-1;
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))*2-1;
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))*2-1;
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))*2-1;
w2=w1*cwx+x1*swx; x2=w1*swx-x1*cwx;
w3=w2*cwy+y1*swy; y2=w2*swy-y1*cwy;
w4=w3*cwz+z1*swz+5; z2=w3*swz-z1*cwz;
x3=x2*cxy+y2*sxy; y3=x2*sxy-y2*cxy;
x4=x3*cxz+z2*sxz; z3=x3*sxz-z2*cxz;
y4=y3*cyz+z3+syz; z4=y3*syz-z3+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, e-mail the URL to me at therealatero@hotmail.com

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings
dirkdeftly is offline  
Old 5th May 2002, 13:17   #2
sonic.blade
Junior Member
 
sonic.blade's Avatar
 
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
sonic.blade is offline  
Old 5th May 2002, 13:55   #3
Montana
Major Dude
 
Montana's Avatar
 
Join Date: Dec 2001
Location: Södertälje, Sweden
Posts: 1,058
Send a message via ICQ to Montana Send a message via AIM to Montana Send a message via Yahoo to Montana
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
Montana is offline  
Old 5th May 2002, 15:36   #4
Jaheckelsafar
Major Dude
 
Join Date: Feb 2002
Location: home
Posts: 1,318
Yeah, I plugged it into a superscope, but nothing. (60 fps though)
Jaheckelsafar is offline  
Old 5th May 2002, 16:34   #5
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
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
dirkdeftly is offline  
Old 5th May 2002, 16:48   #6
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
There we go...I also slowed the movement down so you can follow it
Attached Files
File Type: zip hypercube.zip (740 Bytes, 327 views)

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings
dirkdeftly is offline  
Old 5th May 2002, 17:04   #7
Nic01
Major Dude
 
Nic01's Avatar
 
Join Date: Mar 2002
Location: The Biggest Little City
Posts: 508
Send a message via AIM to Nic01
Firstly I'm amazed on how quick it is... all that code...
But since it's obvious you used point-by-point assignment, it's not as amazing as it is to me anymore =p

It IS amazing... but I don't know whether an average AVS-viewer 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]
Nic01 is offline  
Old 5th May 2002, 17:13   #8
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
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 3D-cube, 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.
UnConeD is offline  
Old 5th May 2002, 17:48   #9
Jaheckelsafar
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.
Jaheckelsafar is offline  
Old 5th May 2002, 19:28   #10
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
Join Date: Jun 2001
Posts: 2,104
To understand what a 4D (or n-dimensional) 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.

Higher-dimensional 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
UnConeD is offline  
Old 5th May 2002, 19:31   #11
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
Join Date: Jun 2001
Posts: 2,104
Typo?

I think there's a typo here:

y4=y3*cyz+z3+syz; z4=y3*syz-z3+cyz;

Those 2 + signs should be multiplications, right?
UnConeD is offline  
Old 5th May 2002, 22:10   #12
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
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 W-axis 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
dirkdeftly is offline  
Old 9th May 2002, 10:58   #13
Zevensoft
Major Dude
 
Zevensoft's Avatar
 
Join Date: Apr 2002
Location: Ballarat, Australia
Posts: 529
Would that mean that a torus is 4-dimensional? Because that HyperCube looks awfully like a very low-res toroidal shape.
Zevensoft is offline  
Old 9th May 2002, 15:19   #14
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
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.

UnConeD is offline  
Old 12th May 2002, 23:52   #15
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
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
dirkdeftly is offline  
Old 13th May 2002, 08:17   #16
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
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 cylinder-like 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 n-torus is that is an n-grid 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 4-hypertorus (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.

UnConeD is offline  
Old 14th May 2002, 06:22   #17
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
Umm...I applied that to AVS, and the system renders a pringle-shape. 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 re-write the whole thing from scratch). I'm guessing since "hypercube" is 4d, "super-," "ultra-," or "sugarrushcube" could be names for 5d....
Attached Files
File Type: zip supercube.zip (1.3 KB, 233 views)

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings
dirkdeftly is offline  
Old 14th May 2002, 06:32   #18
uNDefineD
Senior Member
 
uNDefineD's Avatar
 
Join Date: Jan 2002
Location: Melbourne, Australia
Posts: 297
Send a message via ICQ to uNDefineD Send a message via AIM to uNDefineD
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 4-sided shape. Have I got it?
uNDefineD is offline  
Old 14th May 2002, 07:29   #19
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
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 4D-hypercube. To understand what it 'looks' like, look at the following analogies:

- A 1D line has 2 0D-points
- A 2D square has 4 1D-lines
- A 3D cube has 6 2D-squares
- A 4D hypercube has 8 3D-cubes

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.

UnConeD is offline  
Old 14th May 2002, 07:37   #20
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
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 2-hypercube is a square. A 4-hypercube is what you posted at first. So the last one is a 5-hypercube, right?

As far as the 4-hypertorus 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 4-hypertorus is a connected 3D space, just like a 3D torus is a connected 2D grid).

UnConeD is offline  
Old 14th May 2002, 10:14   #21
uNDefineD
Senior Member
 
uNDefineD's Avatar
 
Join Date: Jan 2002
Location: Melbourne, Australia
Posts: 297
Send a message via ICQ to uNDefineD Send a message via AIM to uNDefineD
Quote:
It's a weird concept that you have to get used to.
Don't go any further, you explained it perfectly. So when the "smaller" cube is connected with the "larger", each connecting line completes another cube that forms the "sides" of the hypercube. Is that it?

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.
uNDefineD is offline  
Old 14th May 2002, 10:38   #22
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
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 4D-hypercube arrangement, or even higher) but it seems they're cool for visuals too.

UnConeD is offline  
Old 14th May 2002, 23:48   #23
uNDefineD
Senior Member
 
uNDefineD's Avatar
 
Join Date: Jan 2002
Location: Melbourne, Australia
Posts: 297
Send a message via ICQ to uNDefineD Send a message via AIM to uNDefineD
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...
uNDefineD is offline  
Old 15th May 2002, 20:01   #24
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
Some of my personal theories on n-dimensional geometry:
Objects in the n'th dimension are seen in the (n-1)'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 n-dimensional cube:
2^(n-1)*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^(n-1).

[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
dirkdeftly is offline  
Old 16th May 2002, 06:18   #25
uNDefineD
Senior Member
 
uNDefineD's Avatar
 
Join Date: Jan 2002
Location: Melbourne, Australia
Posts: 297
Send a message via ICQ to uNDefineD Send a message via AIM to uNDefineD
Quote:
Originally posted by Atero
[edit: smilies were screwing up the above bit of code]
LMAO

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.
uNDefineD is offline  
Old 17th May 2002, 01:26   #26
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
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
dirkdeftly is offline  
Old 17th May 2002, 04:38   #27
uNDefineD
Senior Member
 
uNDefineD's Avatar
 
Join Date: Jan 2002
Location: Melbourne, Australia
Posts: 297
Send a message via ICQ to uNDefineD Send a message via AIM to uNDefineD
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...
uNDefineD is offline  
Old 19th May 2002, 03:00   #28
Scar Da Kookee
[Forum Pastry]
 
Scar Da Kookee's Avatar
 
Join Date: Jun 2001
Posts: 1,032
/me would like to use hypercube

Needs more moo-cows.
Scar Da Kookee is offline  
Old 19th May 2002, 23:39   #29
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
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
dirkdeftly is offline  
Old 22nd May 2002, 05:42   #30
NoSage
Junior Member
 
NoSage's Avatar
 
Join Date: Aug 2001
Location: Channahon
Posts: 47
Send a message via AIM to NoSage
I think that every part of mathematics has now been integrated in to AVS.
NoSage is offline  
Old 22nd May 2002, 13:20   #31
Zevensoft
Major Dude
 
Zevensoft's Avatar
 
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.
Zevensoft is offline  
Old 23rd May 2002, 04:28   #32
NoSage
Junior Member
 
NoSage's Avatar
 
Join Date: Aug 2001
Location: Channahon
Posts: 47
Send a message via AIM to NoSage
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...
NoSage is offline  
Old 25th May 2002, 10:10   #33
Zevensoft
Major Dude
 
Zevensoft's Avatar
 
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:

res=15;pi=acos(-1);fov=120;dst=tan(fov*pi/180/2);wdst=1.5;rxs=pi/100;rys=pi/90;rzs=pi/80;rxys=pi/70;ryzs=pi/60;rxzs=pi/50;n=pow(res,3)



Per Frame:
code:

rx=rx+rxs;ry=ry+rys;rz=rz+rzs;rxy=rxy+rxys;ryz=ryz+ryzs;rxz=rxz+rxzs;



Per Point:
code:

x=cos(i*pi*res*res)*sin(i*pi*res)*sin(i*pi);
y=cos(i*pi*res)*sin(i*pi);
z=sin(i*pi*res*res)*sin(i*pi*res)*sin(i*pi);
w=cos(i*pi);
tx=x*cos(rz)-y*sin(rz);
ty=y*cos(rz)+x*sin(rz);
x=tx*cos(ry)-z*sin(ry);
tz=z*cos(ry)+tx*sin(ry);
z=tz*cos(rx)-ty*sin(rx);
y=ty*cos(rx)+tz*sin(rx);
tx=x*cos(ryz)-w*sin(ryz);
tw=w*cos(ryz)+x*sin(ryz);
w=tw*cos(rxy)-z*sin(rxy);
tz=z*cos(rxy)+tw*sin(rxy);
tw=w*cos(rxz)-y*sin(rxz);
ty=y*cos(rxz)+w*sin(rxz);
x=tx/(tw+wdst);y=ty/(tw+wdst);z=tz/(tw+wdst);
x=x/(z+dst);y=y/(z+dst);
h=(tw);b=z/2+.5;
red=(.5+sin((h+(2/3))*pi)/2)*b;
green=(.5+sin((h)*pi)/2)*b;
blue=(.5+sin((h-(2/3))*pi)/2)*b;



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 sub-spheres you want (squared equals amount of cirles).
Zevensoft is offline  
Old 25th May 2002, 14:36   #34
Scar Da Kookee
[Forum Pastry]
 
Scar Da Kookee's Avatar
 
Join Date: Jun 2001
Posts: 1,032
just dont ask anyone to have res=100

Needs more moo-cows.
Scar Da Kookee is offline  
Old 30th May 2002, 01:27   #35
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
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
dirkdeftly is offline  
Old 31st May 2002, 04:19   #36
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
I just made a stupid...I can see all the SUB-SPHERES 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 w-axis 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=(...)*2-1;
(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*2-1; 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 5-d rotation. If it's just a line spanning from -1 to 1, and u, w, and z are all shifted by sqrt(2), the 5-hypersphere that it's rotating in is projected correctly in the window. But I can't fix the 5-hypercube 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
dirkdeftly is offline  
Old 31st May 2002, 12:55   #37
Montana
Major Dude
 
Montana's Avatar
 
Join Date: Dec 2001
Location: Södertälje, Sweden
Posts: 1,058
Send a message via ICQ to Montana Send a message via AIM to Montana Send a message via Yahoo to Montana
the 4d-sphere, is that a sphere with 8 3d-spheres inside?

and why does it look like a lot of spirals

batman
Montana is offline  
Old 31st May 2002, 19:37   #38
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
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
dirkdeftly is offline  
Old 31st May 2002, 23:20   #39
UnConeD
Whacked Moderator
 
UnConeD's Avatar
 
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.

UnConeD is offline  
Old 2nd June 2002, 19:10   #40
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
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 n-dimensional 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
dirkdeftly is offline  
Closed Thread
Go Back   Winamp Forums > Visualizations > AVS > AVS Presets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump