|
|
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'
|
|
|
|
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
|
|
|
|
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
|
|