POV-Ray : Newsgroups : povray.binaries.images : Hypercubes Server Time
30 Jul 2024 16:19:29 EDT (-0400)
  Hypercubes (Message 1 to 3 of 3)  
From: Anthony D  Baye
Subject: Hypercubes
Date: 4 Mar 2011 20:15:01
Message: <web.4d718db31975f9add7f39bd00@news.povray.org>
I hacked this out in some spare (read: stolen) time yesterday.  It's a simple
orthogonal mapping of the points in an n-dimensional hypercube plotted around a
circle of given radius.

I'll admit, it doesn't look like much, at the moment. It isn't as pretty as I'd
like.

I have been working on this idea for a while now, The nodes are indexed in the
order that they are placed -- starting at the right and moving
counter-clockwise, the adjacents are determined by conducting a series of
bitwise-xor operations between the index of the current node and each successive
power of 2 from 0 to 2^N

Funny story:

I searched the newsgroup before embarking on this endeavor, and the only mention
of bitwise operations I saw indicated that they were not supported and likely
never would be (except by patch) because, "why would you need them?".

So I went needlessly out of my way, and wrote macro versions of the bitwise
operators (converting ints to arrays and back)

When I tried to render, PoV told me, politely, that there were already functions
with the names I had chosen (what are the odds?  great programmers think alike?)

the point, I suppose, is: Thanks (to whomever) for implementing these functions,
because there is a point to having them in a mathematical toolbox.

end Segue:

the coloring for each node and it's edges is a semi-random value between ~0.29
and 255.

What I have yet to figure out is how to "untwist" the projections without
plotting 2^N points by hand - it would sort of run counter to the point.

I would also like to extend the projection into 3D, in some manner.  I've been
trying to think of how to create a mapping similar to a coxeter projection
algorithmically. From there, it should be simple to add a Z-offset to each
concentric ring.

If anyone wants to see the source, I can post it in p.b.s.f.
as usual ideas or comments are welcome.

A.D.B.


Post a reply to this message


Attachments:
Download 'ncube.png' (572 KB)

Preview of image 'ncube.png'
ncube.png


 

From: Christian Froeschlin
Subject: Re: Hypercubes
Date: 5 Mar 2011 13:12:07
Message: <4d727cf7@news.povray.org>
Anthony D. Baye wrote:

> I hacked this out in some spare (read: stolen) time yesterday.  It's a simple
> orthogonal mapping of the points in an n-dimensional hypercube plotted around a
> circle of given radius.

I didn't quite follow how the circle plays into this ...

> I'll admit, it doesn't look like much, at the moment.

Try animating it with a rotating hypercube, might look interesting.


Post a reply to this message

From: Anthony D  Baye
Subject: Re: Hypercubes
Date: 5 Mar 2011 16:10:00
Message: <web.4d72a671867fdfd31a86e02e0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> Anthony D. Baye wrote:
>
> > I hacked this out in some spare (read: stolen) time yesterday.  It's a simple
> > orthogonal mapping of the points in an n-dimensional hypercube plotted around a
> > circle of given radius.
What we're concerned with is topology:  As long as each point remains connected
to its original neighbors, its physical location is unimportant.

In this case, the circle is a convenient reference frame for placing the
vertices as long as one remembers that the adjacents of a given node are those
whose index number is offset by exactly one bit.

> I didn't quite follow how the circle plays into this ...
>
> > I'll admit, it doesn't look like much, at the moment.
>
> Try animating it with a rotating hypercube, might look interesting.

I'm still trying to figure out rotations, it's easy to keep track of edges
between adjacent vertices when the nodes are in order, but once out of order I
have to keep track of a node's index while its position changes, which is
considerably more difficult.

I could probably do some sort of dynamic array thing using the Resize_Array
macro, and use the array to redraw the hypercube with each frame, but the arrays
grow exponentially with respect to the number of dimensions.

I'd also have to store the array on the disk each time.

Regards,

A.D.B.


Post a reply to this message

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