3d-graphics

Howto convert transformed coordinates to world coordinates in OpenGL?

Hello, everybody, I have a transformation set up in Opengl like this: glPushMatrix(); glTranslated(pntPos.X(), pntPos.Y(), pntPos.Z()); glRotated(dx, 1, 0, 0); glRotated(dy, 0, 1, 0); glRotated(dz, 0, 0, 1); //I use this to Render a freely placeable textbox in 3d //space which is based on the FTGL-Toolkit [1] (for TTF support). m_F...

Cubemap from panoramic horizontally wrappable image

I'm trying to write an algorithm to generate the "ceiling panel" from a horiontally wrappable panoramic image like the one above. Images 1 to 4 are a straight cut out for the walls of the cube but the ceiling will be more complicated as I assume it needs to be composited from parts 5a to 5d. Does anyone know the solution in pseudocode?...

How do I color / texture a 3d object dynamically ?

I have a 3D model, composed of triangles. What I want to do is, given a point near to the model, I would like to color the model (triangles) to another color, say blue. Right now, I have a bounding sphere about the model, and when the collision occurs, I just want to approximately color the portions of model from where the collision occ...

separate shadow pass in translucent scene?

Is it possible to implement separate shadow passes in scenes that are heavy on translucent geometry? I would think not since it is not possible to 'insert' a shadow between 2 polygons that have already been alpha-blended. I'd love to be corrected though, since separate passes allow simpler shader setups. ...

Determining camera location from 3 known points

Hi, I'm new here - so please bear with me if I make a faux pas! My question is, is there a good algorithm for determining the 3d location and orientation of a camera based on where 3 (or more) known 3d points end up on an image as viewed from that camera? The question comes down, in my calculation to 6 equations, with 6 unknowns, thou...

Data display with 3d graphs in Java?

Can you please recommend a library that can draw a simple (see the image) 3D graph in Java? The library should comply with the following requests: it has to be freely available for non-commercial use it should be simple to use (given a set of data, it should draw a 3D graph) when drawn, users should be able to do basic control over...

Rotating a model in 3D: Suggestions for center of rotation

I need to allow the user to pan, rotate, zoom in/out of my scene in 3D which uses a parallel projection. Panning and zooming in/out has been pretty straight forward. However, when using the mouse for rotation, I am not sure what to use as the center of rotation. In particular, I am not sure at what depth inside the screen the center of r...

What technologies exist to integrate 3D content with web-site?

I am web-developer. I would like to integrate 3D Content into my web-site. The level of integration should allow something like 3D Cube floating above HTML Content. Moreover, I want 3D Content to be interactive, i.e. one should be able to click on certain side of the cube and get some JavaScript code executed in same way as if somebody c...

Given an octree of voxels, how do you render with smooth surfaces?

I noticed most 3d voxel models are actually pretty low resolution, but then are rendered all smoothed out with some sort of interpolation. Given its ray traced, what is the algorithm used to render it smoothly? Could anybody suggest a book on the topic? ...

WorldWind: 3D-Objects - Sphere for Moon, how?

hi, I asked this question in an Nasa WorldWind forum but haven't got a reply yet http://forum.worldwindcentral.com/showthread.php?t=24428 So, perhaps you could help me :). I'm still playing around with WWJ and what you posted here http://forum.worldwindcentral.com/showthread.php?t=24318 THX! currently I'm trying to add different ...

Visualisation of star catalogues and celestial coordinates

Does anyone have a suggested methodology for visualising the data in a star catalogue such as the Bright Star Catalogue. I'm thinking that there would be a notional sphere and a viewpoint i.e. at the center of that sphere with two vectors representing the view direction and view horizons. I would then somehow project from the star cata...

Calculate volume based on STL file

Just wondering if anyone had a simple, efficient way of calculating the volume of a stereolithographic file (STL)? And rendering this in a Windows Form Control? ...

Calculating which line is in front at the point where two line projections intersect

Two lines in 3d are projected onto 2d screen, and their projections intersect at a point which can be calculated. If the endpoints of the lines in 3d space are known and their intersection point in the projection plane is also known, how can I determine which line is in front at this intersection point? ...

pyopengl: Could it replace c++ ?

Hi everyone. I'm starting a computer graphics course, and I have to choose a language. Choices are between C++ and Python. I have no problem with C++, python is a work in progress. So i was thinking to go down the python road, using pyopengl for graphics part. I have heard though, that performance is an issue. Is python / pyopengl ma...

matplotlib: How to adjust ticks at the corner of a 3Dplot with mplot3d

Hey hello, the problem I'm facing at the moment is the lack of ticks at the corners of the 3D-plots from matplotlib.mplot3d. Say the xaxis ranges from 0 to 10, then only the ticks 2,4,6 and 8 will be displayed. What I'm looking for is a way to format the ticks similiar to pylab: from pylab import * plot([1,2,3]) xticks([0, 1, 2], ['a',...

Java3D: Painting 2D HUD over a Canvas3D

Hello, I'm using Java3D to render a three-dimensional scene. I would like to overlay a two-dimensional "heads-up-display" on top of the 3d image. How can I efficiently paint the 2d content on top of the 3d canvas? Thanks! ...

point light illumination using Phong model

Hello: I wish to render a scene that contains one box and a point light source using the Phong illumination scheme. The following are the relevant code snippets for my calculation: R3Rgb Phong(R3Scene *scene, R3Ray *ray, R3Intersection *intersection) { R3Rgb radiance; if(intersection->hit == 0) { radiance = scene->background;...

3D effect to distort paper

This may be a little hard to describe since I don't have a sample. I'm trying to find a math function or full 3d function in php or a similar language that can help me with the following effect: imagine if you were to take a flat sheet or paper and glue it on a glass of water. It wouldn't be flat any more. It would have a curve, and on...

3D visualization in browser

Hello, I am looking for solutions for 3D visualizations in web browsers. For now I just need to do research about this topic, i.e. I need to know how many solutions exist and which of these are good and why? Thanks ...

How do I prevent jagged edges alongside the surfaces of my 3d model?

Lets say I've implemented in openGL a crude model viewer with shading which renders a series of blocks, such that I have something that looks like this. http://i.imgur.com/TsF7K.jpg Whenever I rotate my model to the side, it causes an unwanted jagged effect along any surface with a steep viewing angle. http://i.imgur.com/Bgl9o.jpg I'...