[fluxus] rendering 4D (newbie questions)

Claude Heiland-Allen claudiusmaximus at goto10.org
Sat Feb 25 12:48:17 PST 2006


Hi all,

Sorry for the following annoying newbie questions:  I've never used 
scheme before (although I know a bit of Lisp), I've never used OpenGL 
before (although I know some of the maths behind it), but I want to make 
cool stuff with fluxus ;-)


I've been working on some visualisation of 4D structures (*), and 
because it's slow doing it all on the CPU, and because fluxus is much 
more advanced all-round than my pitiful code, I thought I'd try to port 
it to fluxus.  My questions are based on reading the docs included with 
fluxus-0.8 .

1)  I notice the vector stuff seems to be limited to 3-vectors, which is 
kinda awkward because I need 4-vectors and 4x4-matrices to rotate them 
about planes in 4D.  How would I go about implementing these?  I guess 
it would be easiest to implement in scheme, but faster in C, and I 
already have working C code for this.

2)  How about multidimensional arrays?  For example, my C code has 
c4d_vertex[16][4] and c3d_vertexid[8][8].  I guess nested lists would 
do, albeit possibly inefficiently?.

3)  How would I go about constructing a (distorted) cube, given 8 
3-vectors for the vertices?  From my brief reading, I guess I would use 
(build-cube) and (pdata-set ...) to move the vertices - is this on the 
right track?

4)  I noticed an (opacity n) function - does this work in terms of 
solids (so you see less and less the thicker the object is) or in terms 
of surfaces?

5)  I think that is all for now!


Claude


*) Here's what I have done so far, using libsdl and libpng (source 
should compile on Linux and OS X and there is a Windows build too, 
compiled by a friend).

http://claudiusmaximus.goto10.org/files/coding/hypercube/
http://claudiusmaximus.goto10.org/index.php?page=gallery/digital/hypercube



More information about the Fluxus mailing list