APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Specifying order of drawing for 3D drawables post and replies

Return to the Specifying order of drawing for 3D drawables thread
Login to post to this thread

Surface is hiding object
Larry Engelhardt
17 Posts

I am trying to generate a 3D scene with a ball (either a 3D sphere or a 3D particle) moving above a plane.  However, the plane often obstructs the view of the ball.  Is there a trick to force the ball to always be drawn last?  (The ball is the last item in the 3d drawing panel in the view, and the ball is clearly above the plane in the model.)  I have attached an example.  Thanks!

Attached File: test3d.zip


Replies to Surface is hiding object

Re: Surface is hiding object -
Francisco Esquembre
228 Posts

Larry,

Yes. There is. Play with the Depth Factor parameter of the ball.
It is 1 by default. But if you set it to 0.9 it will display the ball as if it was closer to your eye that it really is.

Since the plane death factor is still 1, that can do the trick.

You can also play with the plane's depth factor and set it to 1.1. That will improve things.

(Note. It might be the other way round. I mean, 0.9 for the plane and 1.1 for the ball. But I thinkI remembered it right.)

Paco



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book