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