POV-Ray : Newsgroups : povray.advanced-users : 4D geometry Server Time
1 Nov 2024 01:21:52 EDT (-0400)
  4D geometry (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Andrew C on Mozilla
Subject: 4D geometry
Date: 2 May 2004 07:05:12
Message: <4094d5e8$1@news.povray.org>
Hi folks.

Firstly, has anyone looked into it? (4D geometry in POV-Ray that is.)

Part of the problem is that the fourth dimension is a little bit 
mind-numbing to think about!

Anyway, I'd like to use POV-Ray to draw animations of a hypercube 
rotating in 4 dimensions, orthographically projected into 3 dimensions.

If I'm not mistaken, a hypercube can be defined as the set of all points 
that satisfy
   -k < (x, y, z, w) < +k
It can also be defined as the intersection of 8 hyperplanes - and this 
lents itself for to rotation.

Suppose we have a hyperplane
   Ax + By + Cz + Dw - E = 0
Then the "normal" would be <A, B, C, D> and the distance from the origin 
would be E. (In 2D, a normal defines a line. In 3D, a normal defines a 
plane. So presumably in 4D a normal defines a hyperplane...)

If (say) <A, B, C, D> = <0, 1, 0, 0>, then an orthographic projection 
into 3D gives us an ordinary plane with normal <0, 1, 0>.

However...

As far as I can tell, if you rotate that hyperplane off the axis even 
slightly (in such a way that D <> 0), then the 3D projection of that 
hyperplane fills the entire 3D space. That would mean that if I do any 
double rotation by a small angle, *all* 8 projections would fill all of 
3D space, resulting in... well... nothing.

Question: is the intersection of the 3D projections of the 8 hyperplanes 
equal to the 3D projection of the intersection of the 8 hyperplanes?

(Question: Does that even make sense?!)

Thoughts / suggestions?
Andrew @ home.


Post a reply to this message

From: Christopher James Huff
Subject: Re: 4D geometry
Date: 2 May 2004 14:42:58
Message: <cjameshuff-4E44F5.14420802052004@news.povray.org>
In article <4094d5e8$1@news.povray.org>,
 Andrew C on Mozilla <voi### [at] devnull> wrote:

> Firstly, has anyone looked into it? (4D geometry in POV-Ray that is.)

Other than Julia fractals and crackle offset, not that I know of. You 
should be able to render a 3D "slice" pretty easily with isosurfaces. 
Something like this:

#declare Box4DFn = function {max(abs(x), abs(y), abs(z), abs(t))}

Then you just have to come up with a rotation to compute the xyzt 
coordinates...a box with an axis aligned to the t axis isn't very 
interesting. It's either an ordinary box, or nothing. This page seems to 
have some info: http://www.geocities.com/igorelik/4rotat.html

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Mark Weyer
Subject: Re: 4D geometry
Date: 3 May 2004 04:49:20
Message: <409607D6.7080405@informatik.uni-freiburg.de>
> Firstly, has anyone looked into it? (4D geometry in POV-Ray that is.)

I have done 4D-geometry visualization long before raytracing. That was
wireframe for red/green glasses. I haven't done it in povray.

> Anyway, I'd like to use POV-Ray to draw animations of a hypercube 
> rotating in 4 dimensions, orthographically projected into 3 dimensions.

I always prefered perspective projection.

Anyway, you seem to want to use a solid 3D object. You will lose a lot of
the 4D information that way. The 4D object has vertices, edges, faces,
and hyperfaces as "visual" elements of its geometry. By your method you
lose all vertices, edges, and faces that are projected to the inside of
the 3D model. You also lose all hyperfaces alltogether.

For povray I could think of several alternatives:

1. Do a wireframe model using spheres and cylinders -- or one large
    spheresweep (after all the graph of the hypercube does have a Eulerian
    cycle). Vertcies and edges will be clearly visible, faces and hyperfaces
    sort of.
2. Show the faces as semitransparent polygons. Possibly of different colours.
    Vertices, edges, and faces are visible, hyperfaces sort of. The faces will
    maybe be too many to not be confusing.
3. Show the hyperfaces by differently coloured media.

Or, maybe, use a combination.

> Question: is the intersection of the 3D projections of the 8 hyperplanes 
> equal to the 3D projection of the intersection of the 8 hyperplanes?

No. and that is not a feature unique to 4D->3D. An example in 2D-1D:
Consider the normal vectors (1,1) and (1,-1) and work it out. Another
example: Take the sets {(0,0),(1,1)} and {(0,1),(1,0)}. Projection, then
intersection yields {0,1}, while the other way around you obtain the empty
set. The first collects all 1D-points that can be extended to some point
in each of the original sets. The second collects all 1D-point that have
one extension that pertains to both sets simultaneously.


-- 
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{rgbt 1}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

From: Andrew C on Mozilla
Subject: Re: 4D geometry
Date: 3 May 2004 08:22:54
Message: <4096399e@news.povray.org>
>> Firstly, has anyone looked into it? (4D geometry in POV-Ray that is.)
> 
> I have done 4D-geometry visualization long before raytracing. That was
> wireframe for red/green glasses. I haven't done it in povray.

Likewise. (I wrote a Java thingy... but Java is just painful!)

>> Anyway, I'd like to use POV-Ray to draw animations of a hypercube 
>> rotating in 4 dimensions, orthographically projected into 3 dimensions.
> 
> 
> I always prefered perspective projection.

Yeah, I know what you mean... Only trouble is working out which effects 
are due to the 4D->3D perspective, and which ones are the 3D->2D 
perspective! ;-)

> Anyway, you seem to want to use a solid 3D object. You will lose a lot of
> the 4D information that way. The 4D object has vertices, edges, faces,
> and hyperfaces as "visual" elements of its geometry. By your method you
> lose all vertices, edges, and faces that are projected to the inside of
> the 3D model. You also lose all hyperfaces alltogether.

Yeah, true.

> For povray I could think of several alternatives:
> 
> 1. Do a wireframe model using spheres and cylinders -- or one large
>    spheresweep (after all the graph of the hypercube does have a Eulerian
>    cycle). Vertcies and edges will be clearly visible, faces and hyperfaces
>    sort of.

I was planning to do this too. But working out where the hell the edges 
are seems like a harder problem then just telling POV-Ray to take the 
intersection of some simple planes.

> 2. Show the faces as semitransparent polygons. Possibly of different 
> colours.
>    Vertices, edges, and faces are visible, hyperfaces sort of. The faces 
> will
>    maybe be too many to not be confusing.

This could work - I think anyway! :-S

> 3. Show the hyperfaces by differently coloured media.

Ooo... hadn't thought of that!

> Or, maybe, use a combination.
> 
>> Question: is the intersection of the 3D projections of the 8 
>> hyperplanes equal to the 3D projection of the intersection of the 8 
>> hyperplanes?
> 
> No. and that is not a feature unique to 4D->3D. An example in 2D-1D:
> Consider the normal vectors (1,1) and (1,-1) and work it out. Another
> example: Take the sets {(0,0),(1,1)} and {(0,1),(1,0)}. Projection, then
> intersection yields {0,1}, while the other way around you obtain the empty
> set. The first collects all 1D-points that can be extended to some point
> in each of the original sets. The second collects all 1D-point that have
> one extension that pertains to both sets simultaneously.

Right...

So figuring out how to project the 8 hyperplanes into 3D and then asking 
POV-Ray for the intersection will get me nowhere fast. (I was already 
beginning to suspect this conclusion, which is why I asked! ;-)

Maybe I'll have a go at the wireframe bit for a while...

Thanks.
Andrew @ home.


Post a reply to this message

From: Andrew C on Mozilla
Subject: Re: 4D geometry
Date: 3 May 2004 08:26:39
Message: <40963a7f$1@news.povray.org>
>>Firstly, has anyone looked into it? (4D geometry in POV-Ray that is.)
> 
> 
> Other than Julia fractals and crackle offset, not that I know of.

...and 4D noise I would imagine...

> You 
> should be able to render a 3D "slice" pretty easily with isosurfaces. 
> Something like this:
> 
> #declare Box4DFn = function {max(abs(x), abs(y), abs(z), abs(t))}
> 
> Then you just have to come up with a rotation to compute the xyzt 
> coordinates...a box with an axis aligned to the t axis isn't very 
> interesting. It's either an ordinary box, or nothing. This page seems to 
> have some info: http://www.geocities.com/igorelik/4rotat.html

OK, will take a look.

Thanks.
Andrew @ home


Post a reply to this message

From: Mark Weyer
Subject: Re: 4D geometry
Date: 3 May 2004 12:10:36
Message: <40966F3F.1090100@informatik.uni-freiburg.de>
>> I always prefered perspective projection.
> 
> Yeah, I know what you mean... Only trouble is working out which effects 
> are due to the 4D->3D perspective, and which ones are the 3D->2D 
> perspective! ;-)

I never had problems with that, but the red/green glasses might have
helped a lot on that one. The problems I had were with too many lines
when having many 4D objects in the same "scene". I'm talking about 4D
tetris here.

>> 1. Do a wireframe model using spheres and cylinders -- or one large
>>    spheresweep (after all the graph of the hypercube does have a Eulerian
>>    cycle). Vertcies and edges will be clearly visible, faces and 
>> hyperfaces
>>    sort of.
> 
> I was planning to do this too. But working out where the hell the edges 
> are seems like a harder problem then just telling POV-Ray to take the 
> intersection of some simple planes.

You have 16 vertices. It is best to think of them as 4-bit words. The
bit i controls wether the coordnate i is -1 or 1. Then you have a line
between vertex n and vertex m if and only if n and m differ by exactly
one bit (or have 3 bits in common). A face consists of 4 vertices that
have 2 bits in common and a hyperface consists of 8 vertices that have
1 bit in common.

> Thanks.

You are welcome


-- 
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{rgbt 1}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

From: Andrew C on Mozilla
Subject: Re: 4D geometry
Date: 3 May 2004 14:02:35
Message: <4096893b$1@news.povray.org>
Mark Weyer wrote:

>>> I always prefered perspective projection.
>>
>>
>> Yeah, I know what you mean... Only trouble is working out which 
>> effects are due to the 4D->3D perspective, and which ones are the 
>> 3D->2D perspective! ;-)
> 
> 
> I never had problems with that, but the red/green glasses might have
> helped a lot on that one. The problems I had were with too many lines
> when having many 4D objects in the same "scene". I'm talking about 4D
> tetris here.

??!?! :-| ?!/"\@_~??!

Four *&$^ dimensional *@$^%# tetris *@*@#?!?! :-|

OK, my head hurts... lol!

>>> 1. Do a wireframe model using spheres and cylinders -- or one large
>>>    spheresweep (after all the graph of the hypercube does have a 
>>> Eulerian
>>>    cycle). Vertcies and edges will be clearly visible, faces and 
>>> hyperfaces
>>>    sort of.
>>
>>
>> I was planning to do this too. But working out where the hell the 
>> edges are seems like a harder problem then just telling POV-Ray to 
>> take the intersection of some simple planes.
> 
> 
> You have 16 vertices. It is best to think of them as 4-bit words. The
> bit i controls wether the coordnate i is -1 or 1. Then you have a line
> between vertex n and vertex m if and only if n and m differ by exactly
> one bit (or have 3 bits in common). A face consists of 4 vertices that
> have 2 bits in common and a hyperface consists of 8 vertices that have
> 1 bit in common.

I just spent about 2 hours figuring that out. POV-Ray is running an 
animation as we speak.

Thanks.
Andrew @ home.


Post a reply to this message

From: Andrew C on Mozilla
Subject: Re: 4D geometry
Date: 3 May 2004 14:22:32
Message: <40968de8@news.povray.org>
Out of interest... I'm told there's an amazing 4D object that has 1200 
sides or something stupid... anyone know how I compute the corners and 
join them up to make a wireframe?

Thanks.
Andrew @ home.


Post a reply to this message

From: Andrew C on Mozilla
Subject: Re: 4D geometry
Date: 3 May 2004 14:29:52
Message: <40968fa0@news.povray.org>
>>> Question: is the intersection of the 3D projections of the 8 
>>> hyperplanes equal to the 3D projection of the intersection of the 8 
>>> hyperplanes?
>>
>>
>> No. and that is not a feature unique to 4D->3D. An example in 2D-1D:
>> Consider the normal vectors (1,1) and (1,-1) and work it out. Another
>> example: Take the sets {(0,0),(1,1)} and {(0,1),(1,0)}. Projection, then
>> intersection yields {0,1}, while the other way around you obtain the 
>> empty
>> set. The first collects all 1D-points that can be extended to some point
>> in each of the original sets. The second collects all 1D-point that have
>> one extension that pertains to both sets simultaneously.
> 
> 
> Right...
> 
> So figuring out how to project the 8 hyperplanes into 3D and then asking 
> POV-Ray for the intersection will get me nowhere fast. (I was already 
> beginning to suspect this conclusion, which is why I asked! ;-)

Here's another question... what about slicing? If I choose a particular 
value for the 4th ordinate and fix that, can I *then* do the 
intersection on 3D? (Taking a slice is after all a set intersection 
operation - and I *believe* those things are associative...)

Andrew @ home.


Post a reply to this message

From: Dave Matthews
Subject: Re: 4D geometry
Date: 3 May 2004 18:13:46
Message: <4096c41a@news.povray.org>
Andrew C on Mozilla wrote:
> Out of interest... I'm told there's an amazing 4D object that has 1200 
> sides or something stupid... anyone know how I compute the corners and 
> join them up to make a wireframe?
> 
> Thanks.
> Andrew @ home.

You might want to check out Paul Bourke's discussion of higher dimensions:

http://astronomy.swin.edu.au/~pbourke/polyhedra/platonic4d/

Here he displays, among other things, a 2d projection of a 3d projection 
of a 4d object with "600 tetrahedral cells, 1200 triangular faces, 720 
edges, 120 vertices" -- probably the one you're thinking of.

Dave Matthews


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.