From: Bruce S. <Bru...@nc...> - 2012-04-23 04:37:09
|
That was indeed the problem -- the level of detail was miscalculated because it was based on "radius", which an ellipsoid doesn't have. I've updated the github repository with new versions of sphere.hpp/.cpp and ellipsoid.hpp/.cpp, which fix the problem. I haven't yet built and posted new installers, which will be VPython 5.74. Bruce Sherwood On Sun, Apr 22, 2012 at 5:07 PM, Bruce Sherwood <Bru...@nc...> wrote: > 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 <kmi...@gm...> 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 |