Visualising 4D objects in OpenGL [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
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).

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.

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

Related

C++ or MATLAB Library for 3D Graphics for use in Physics Simulation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm looking for a library I can use for C++ or MATLAB so that I can do some rigid-body and particle simulations which I can then render and view.
I'd like to be able to use a library to draw particles or rigid bodies and then programmatically specify rotation, translation, etc.
Additionally, I'd like for the library to have the smallest learning curve possible.
Thanks in advance for your help!
Use Open Scene Graph in c++:
http://www.openscenegraph.org/projects/osg
That library wraps openGL and allows great rendering and has some really good tutorials.
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials
You will be able to define objects positions by their transform from the 0,0,0 frame allowing to to move objects easily in a physics emulation style.
Hope this helps.

CSG Modeling in OpenGL [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 16 days ago.
Improve this question
I am dealing with Constructive Solid Geometry(CSG) modeling with OpenGL.
I want to know how to implement binary operation. I read something about Gold Feather Algorithm and I know about OpenCSG but after reading its source code, I found it too complicated to understand. I just need a simple shortest OpenGL example how to implement it.
There's no restrict in Algorithm as long as it is easy to implement.
OpenGL will not help you. OpenGL is a rendering library/API. It draws points, lines and triangles; it's up to you to tell it what to draw. OpenGL does not maintain a scene or even has a notion of coherent geometric objects. Hence CSG is not something that goes into OpenGL.
Nicol Bolas is correct - OpenGL will not help with CSG, it only provides a way to draw 3D things onto a 2D screen.
OpenCSG is essentially "fake" CSG by using using OpenGL's depthbuffers, stencils and shaders to make it appear that 3D objects have had a boolean operation performed on them.
CSG is a huge task and I doubt you will ever find an "algorithm easy to understand"
Have a look at this project: http://code.google.com/p/carve/ which performs CSG on the triangles/faces which you would then draw to OpenGL

Ray tracing tutorial on GLSL? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I haven't found a good ray tracing tutorial on GLSL, I found one on CUDA that's great, but I really want a GLSL one too. I read the Stanford Graphics paper on GPU ray tracing and I want to see a GLSL implementation.
Shading languages really aren't meant for raytracing. The structure of a rasterizer just doesn't make them a good fit for most raytracing tasks. Yes, raytracers can use rasterizers to do parallel ray computations, and that's good. But the bulk of the algorithm doesn't fit the needs of a rasterizer.
Indeed, now that there are GP-GPU specific languages like OpenCL and CUDA, most of the research time and money is invested in them, not in shoehorning GP-GPU functionality into a rasterizer. It just isn't worth the effort to work around the limitations of a rasterizing pipeline to do raytracing; you'll get better performance with a real GP-GPU language.
And isn't performance the whole reason to do GP-GPU to begin with?

Starting with 3d objects [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have just started with C++ and would like to program and little with 3d objects. Now I could use C++ or Objective C it doesnt matter.
What books are good with 3d objects?
I want to load a 3d object/file created by a 3d application, and then manipulate the 3d object.
Move it on the screen, rotate it etc.
Where is a good place to start to learn this? A book, tutorials etc.
Lesson 31 on gamedev.net should get you started.
Here's a pretty nice site with 3d engine tutorials: http://www.spacesimulator.net/wiki/index.php/3d_Engine_Programming_Tutorials
I have just started with C++
Woah there, have you done any C programming? In order to get anywhere (besides stuck!) in OpenGL, you really need to know C well, since OpenGL is written in C. At the very least you need to know all about pointers, functions, and arrays.
I'd also suggest getting started with 2D objects, and then going to 3D. There really isn't any difference with OpenGL. To render a 2D object, you render the same exact way as a 3D object, but you give every object the same z (depth) value.
Although most of these are deprecated, I'd suggest starting by learning Immediate Mode, moving towards Display Lists, then Vertex Arrays, and finally Vertex Buffer Objects and Index Buffer Objects. These are all different methods of how the GPU gets your vertex/color/texture information, and they all vary in speed.

Mesh triangulation and simplification C++ library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 months ago.
Improve this question
I am looking for a C++ library to triangulate and simplify 3D mesh. My 3D meshes are potentially huge (around 3 millions vertices). It should ideally be open source. Any idea?
Here are some libraries I found:
1) CGAL
++ Does a lot of things;
-- Licensing issues;
2) GTS
++ Open source and quite easy to use;
-- Does less that CGAL
anymore ideas?
vcglib (http://www.vcglib.net) is a open source c++ mesh processing library that offers high quality simplification.
vcglib is the library behind MeshLab (http://www.meshlab.net) so if you find some mesh processing feature in meshlab you will probably find that feature in the vcglib
I am looking for a C++ library to triangulate and simplify 3D mesh.
In addition to the libraries suggested in other answers, I would suggest looking at open-source MeshLib C++ library, which contains very fast and precise decimation functions, see documentation. The implemented algorithm there is based on Surface Simplification Using Quadric Error Metrics article with several improvements and optimizations.
My 3D meshes are potentially huge (around 3 millions vertices).
On top of that, there is a parallel version of mesh simplification specially tailored for such huge meshes. It splits the surface on smaller parts, decimates them concurrently, then merges them again, and decimates the triangles near part boundaries to avoid any visible seams, see MR::decimateParallelMesh() function.