Re: Rendering with big coordinates

Bruce Sherwood <[email protected]> Sun, 22 Apr 2012 17:07:33 -0600
Newsgroups gmane.comp.python.visualpython.user
Message-ID <CAFDG03jvJ0gWC8yt8sdLwEnOJG1UNaPO91s3JwYSoS=7L+_cfA@mail.gmail.com>
It has nothing to do with the size of the ellipsoid. VPython handles
numbers with an enormous range; 3400 isn't a big number. The ellipsoid
object inherits from the sphere object, and you'll see that if you
change your ellipsoid to a sphere it will look fine.

I was not previously aware of this problem with ellipsoids.  Probably
the bug is in src/core/sphere.cpp, in the gl_render routine. It must
be that the "level of detail" (lod) is being calculated incorrectly,
as though the ellipsoid occupied a very small portion of the window
(in which case a sphere or ellipsoid is rendered crudely, since then
you can't see detail). Maybe the mistake is that the screen coverage
is computed using "radius", which is an attribute of a sphere but not
of an ellipsoid.

Bruce Sherwood

On Sun, Apr 22, 2012 at 4:11 PM, K.-Michael Aye <[email protected]> wrote:
> Dear all,
>
> I noticed a lack of precision in the rendering of the ellipsoid when going
> to big numbers.
> I need these big numbers because I am trying to display planetary remote
> sensing illumination scenarios.
> Here is the code I used to create the attached image:
>
> from visual import *
>
> xaxis = arrow(axis=(4000,0,0), shaftwidth=40, color=color.red)
> yaxis = arrow(axis=(0,4000,0), shaftwidth=40, color=color.green)
> zaxis = arrow(axis=(0,0,4000), shaftwidth=40, color=color.blue)
> mars = ellipsoid(length=2*3396.19,height=2*3396.19,width=2*3376.2,
> opacity=0.5, color=(1,0.7,0.2))
>
>
> As you can see the ellipsoid is very 'edgy', can this be improved somehow?
>
> Best regards,
> Michael
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Visualpython-users mailing list
> Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/visualpython-users
>

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2