regarding 3D color plot from the output of IDLgrVRML [message #85447] |
Wed, 07 August 2013 14:06 |
seanjao
Messages: 2 Registered: July 2003
|
Junior Member |
|
|
Hi there:
I try to plot a 3D plot by using Object Graphics. My goal is to plot a white 3D shere on a black background.
Here is the highlight of my code.
------------------------------------------------------------ ------------
omodel = obj_new('IDLgrModel')
oview = obj_new('IDLgrView',VIEWPLANE_RECT=[-.7,-.15,1.7,1.7], color=[0, 0, 0])
....... skip the axes part.....
orb111=OBJ_NEW('orb',pos=[200, 300, 500], radius=0.15, COLOR=[255, 255, 255], SHADING=1, STYLE=2, HIDDEN=0)
omodel->add,orb111
oview->add,omodel
;Create the window to display the view
owindow = obj_new('IDLgrWindow', GRAPHICS_TREE=oview, retain=2)
owindow->draw
; ; create your VRML object
oVRML = obj_new('IDLgrVRML')
oVRML->setproperty,FILENAME='test.wrl'
oVRML->draw, oView
-----------------------------------------------------------
The Xwindow does show this orb111 is a white sphere. However, when I use "instant player" (ver 2.3.0) to open this "test.wrl" file, the orb111 is black. Is this problem due to how "instant player" rendering or my code has a bug?
Thanks!
Sean
(Note that I am aware of xplot3d, but I do not like the output. Hence, I try to make my own plot.)
|
|
|