Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visualising 4D objects in OpenGL [closed]

Tags:

c++

c

opengl

Do you know of any, actively developed, C/C++ library that can take a bunch (preferably a large amount) of 4D vertices, project them back into 3D space with respect to some arbitrary "4D camera" projection matrix and output regular 3D vertices that I could feed into OpenGL for hardware accelerated visualisation? I'd also need the ability to perform standard transformations in 4D space (translation, rotation along all 4 axes and uniform scaling).

like image 628
MasterM Avatar asked Aug 08 '11 21:08

MasterM


2 Answers

The following is a poor answer (since I am by no means an expert on the topic), but I decided to take a quick peek around and came up with this thesis: http://steve.hollasch.net/thesis/#chapter4

Projection of a 4D object into 3-space is, as you would expect, a simple extension on the projection of 3D into 2-space, and the above thesis demonstrates different kinds of projection from 4D to 2-space. The code samples are in C, so it should be easy to follow.

like image 107
greyfade Avatar answered Oct 24 '22 05:10

greyfade


Professor Andrew Hanson (Indiana University) developed a graphics library for visualizing 4D geometry. It's called GL4D. It's designed to mimic the feel of OpenGL (though I'm not sure whether it is actually built on top of OpenGL). It is GPU-accelerated. It supports projection, slicing, hidden-surface removal, per-voxel lighting, and semi-transparent shading.

Here's the publication which explains GL4D: GL4D paper

Here's a link to the source code: GL4D Source Code

And here's a video demonstration of GL4D: GL4D Video Demonstration

like image 20
Justin Avatar answered Oct 24 '22 07:10

Justin