View Full Version : Drawing 3D coordinate system
02-28-2008, 07:16 AM
I'm about to draw a 3D scene with one part centered about three axis. I would need to draw the scene's origin in the lower left corner as a 3D axis system (red, green, blue).
I was trying to do that by first drawing a solid cylinder with a cone at the end but the shading on the arrows is not realistic.
Does someone know how to draw that ?
Thanks a lot !!
02-29-2008, 04:01 AM
I'd just disable the lighting
glDisable(GL_LIGHTING); // No shading
then draw three GL_LINES, in the positive cartesian directions (i.e. semi-axes). If you colour them red, green and blue respectively, it'll be obvious which is which. They will meet at the origin, which will indicate where the origin is. If you only draw half-axes then you don't need arrows, plus the picture is less cluttered.
Oh, and remember to re-enable the GL_LIGHTING.
02-29-2008, 07:16 AM
I forgot to mention that I'm using the Tao framework in order to display and manipulate 2D/3D surfaces. Not sure if this will change anything...
I can draw GL_LINES without any issue, and the three axis looks fine, however the gluCylinder doesn't have a realistic 3D texture and color with dynamic shading and sharpness appearance.
The guys from Eyeshot (http://www.devdept.com) have on the index page a sample of what I would need.
I thought someone already did something similar.
Thanks in advance for any hint !!
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.