From: K.-Michael A. <kmi...@gm...> - 2012-04-22 22:11:53
|
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 |
From: K.-Michael A. <kmi...@gm...> - 2012-04-22 22:53:56
|
Attachments don't seem to work here, at least not via gmane so my screenshot is here: http://dl.dropbox.com/u/139035/Screen%20Shot%202012-04-23%20at%2000.05.26.pdf Michael On 2012-04-22 22:11:34 +0000, K.-Michael Aye said: > 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 > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2012-04-22 23:07:44
|
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 > > ------------------------------------------------------------------------------ > 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 > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
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 |