From: Adrian M. V. <amv...@is...> - 2008-12-04 22:58:19
|
Hello mail list I check my code in vpython3x as show below. Using scene.visible = 0 and scene.visible = 1 it load faster, and more faster than using crude code with Coin3D and SoQT or VTK for Python. The problem is to manipulate (ex. rotate), it is really slow. The idea can be to hide all wile rotating or zooming and re-render (possible showing the bounding box as visual reference) The question is: How to do that? ******************************************************** from visual import * scene = display(title='Ejemplo VPython', center=(1400,0,1400)) scene.fullscreen=0 scene.exit=0 scene.autocenter = 1 scene.visible = 0 for x in range(100): for z in range(10): for y in range(100): box(pos=vector(1000+x*8.33,-15+z*3.,1000+y*8.33), size=(8.33*0.9,3.*0.9,8.33*0.9), color=color.red) scene.visible = 1 ----- Original Message ----- From: Bruce Sherwood To: Adrián Martínez Vargas Sent: Monday, December 01, 2008 6:17 PM Subject: Re: [Visualpython-users] optimise visualization for large set of data That's basically what I did: scene.autocenter = 1 for x in range(100): for y in range(100): for z in range(10): box(pos=(x,y,10*z), size=(0.5,0.5,0.5)) scene.visible = 1 Bruce Sherwood Adrián Martínez Vargas wrote: Estimate I can get the code you use to test? It is the same to previous versions? For the test I used from visual import * scene = display(title='Ejemplo VPython', center=(1400,0,1400)) scene.fullscreen=0 scene.exit=0 for x in range(100): for z in range(10): for y in range(100): bloque=box(pos=vector(1000+x*8.33,-15+z*3.,1000+y*8.33), size=(8.33*0.9,3.*0.9,8.33*0.9), color=color.red) Dr. Adrian Martínez Vargas Revista Minería y Geología (Editor Principal) ISMM, Las Coloradas, s/n Moa, Holguín, Cuba CP. 83329 http://www.ismm.edu.cu/revistamg/index.htm -----Original Message----- From: Bruce Sherwood <Bru...@nc...> To: Adrián Martínez Vargas <amv...@is...> Cc: vis...@li... Date: Mon, 01 Dec 2008 18:00:51 -0500 Subject: Re: [Visualpython-users] optimise visualization for large set of data It's not quite released yet. But almost everything is ready to go. Bruce Sherwood Adrián Martínez Vargas wrote: > Estimate Bruce Sherwood > > The only link that I get from http://wiki.python.org/ is e 4.beta > version, where I can get the 5th version? > > > Dr. Adrian Martínez Vargas > Revista Minería y Geología (Editor Principal) > ISMM, Las Coloradas, s/n > Moa, Holguín, > Cuba > CP. 83329 > http://www.ismm.edu.cu/revistamg/index.htm > > -----Original Message----- > From: Bruce Sherwood <Bru...@nc...> > To: Adrián Martínez Vargas <amv...@is...> > Cc: vis...@li... > Date: Sat, 29 Nov 2008 13:01:19 -0500 > Subject: Re: [Visualpython-users] optimise visualization for large > set of data > > For Visual, that is a large data set in terms of having interactive > zoom > and rotate. > > Using the latest experimental version (Visual 5), which has an > option to > display cycle time (time between renders) and render time (time > required > to render the scene), on a rather fast laptop (Dell XPS with NVIdia > graphics), 100x100x10 boxes has a cycle time of 1.35 seconds, and a > render time of 0.17 seconds. In other words, Visual is hardly able to > deal with that many objects interactively. > > In Visual 5 there is a new object, "points", which is similar to curve > but the points aren't connected. With the same 100x100x10 grid there is > a cycle time of 0.33 seconds and a render time of 0.080 seconds. > > Bruce Sherwood > > > Adrián Martínez Vargas wrote: > > hello mail list > > > > I have problems to visualise a large number of data, the > visualization > > windows get slowly, for example with 100x100x10 boxes it is > really slow, > > and it is not too much. > > > > The question is: how to optimise the visualization for large set > of data? > > > > your > > Adrian > > > > > > > ---------------------------------------------------------------------- -- > > > > > ---------------------------------------------------------------------- --- > > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > > Build the coolest Linux based applications with Moblin SDK & win > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > < http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > > > > > > ---------------------------------------------------------------------- -- > > > > _______________________________________________ > > Visualpython-users mailing list > > Vis...@li... > > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Bruce S. <Bru...@nc...> - 2008-12-05 03:35:18
|
Keep all your real objects invisible most of the time and just show a box which you rotate, then click on something in the scene to signal that you now want to see the data (the target could be a small box or sphere in a corner of the window), in which case you make the box invisible and your real objects visible. Click again to revert. A variation on this would be to show a sample of your data at all times, but click to show all the data (or hide most of the data). I'll comment that it isn't rotation itself that's slow. Rendering is pretty much independent of camera angle. Rather the issue is that once a scene takes a long time to render due to containing a large number of objects, rotation and zoom will be very slow because you get few updates per second. Bruce Sherwood Adrian Martínez Vargas wrote: > Hello mail list > > I check my code in vpython3x as show below. Using scene.visible = 0 and > scene.visible = 1 it load faster, and more faster than using crude code with > Coin3D and SoQT or VTK for Python. > > The problem is to manipulate (ex. rotate), it is really slow. > > The idea can be to hide all wile rotating or zooming and re-render (possible > showing the bounding box as visual reference) > > The question is: How to do that? > > > ******************************************************** > from visual import * > scene = display(title='Ejemplo VPython', > center=(1400,0,1400)) > scene.fullscreen=0 > scene.exit=0 > scene.autocenter = 1 > scene.visible = 0 > > for x in range(100): > for z in range(10): > for y in range(100): > box(pos=vector(1000+x*8.33,-15+z*3.,1000+y*8.33), > size=(8.33*0.9,3.*0.9,8.33*0.9), > color=color.red) > > scene.visible = 1 > ----- Original Message ----- > From: Bruce Sherwood > To: Adrián Martínez Vargas > Sent: Monday, December 01, 2008 6:17 PM > Subject: Re: [Visualpython-users] optimise visualization for large set of > data > > > That's basically what I did: > > scene.autocenter = 1 > for x in range(100): > for y in range(100): > for z in range(10): > box(pos=(x,y,10*z), size=(0.5,0.5,0.5)) > scene.visible = 1 > > Bruce Sherwood > > Adrián Martínez Vargas wrote: > Estimate > > I can get the code you use to test? > It is the same to previous versions? > > For the test I used > > from visual import * > scene = display(title='Ejemplo VPython', > center=(1400,0,1400)) > scene.fullscreen=0 > scene.exit=0 > > for x in range(100): > for z in range(10): > for y in range(100): > bloque=box(pos=vector(1000+x*8.33,-15+z*3.,1000+y*8.33), > size=(8.33*0.9,3.*0.9,8.33*0.9), > color=color.red) > > > Dr. Adrian Martínez Vargas > Revista Minería y Geología (Editor Principal) > ISMM, Las Coloradas, s/n > Moa, Holguín, > Cuba > CP. 83329 > http://www.ismm.edu.cu/revistamg/index.htm > > > -----Original Message----- > From: Bruce Sherwood <Bru...@nc... > <mailto:Bru...@nc...>> > To: Adrián Martínez Vargas <amv...@is... > <mailto:amv...@is...>> > Cc: vis...@li... > <mailto:vis...@li...> > Date: Mon, 01 Dec 2008 18:00:51 -0500 > Subject: Re: [Visualpython-users] optimise visualization for large set of > data > > > It's not quite released yet. But almost everything is ready to go. > > Bruce Sherwood > > Adrián Martínez Vargas wrote: > > Estimate Bruce Sherwood > > > > The only link that I get from http://wiki.python.org/ is e 4.beta > > version, where I can get the 5th version? > > > > > > Dr. Adrian Martínez Vargas > > Revista Minería y Geología (Editor Principal) > > ISMM, Las Coloradas, s/n > > Moa, Holguín, > > Cuba > > CP. 83329 > > http://www.ismm.edu.cu/revistamg/index.htm > > > > -----Original Message----- > > From: Bruce Sherwood <Bru...@nc... > <mailto:Bru...@nc...>> > > To: Adrián Martínez Vargas <amv...@is... > <mailto:amv...@is...>> > > Cc: vis...@li... > <mailto:vis...@li...> > > Date: Sat, 29 Nov 2008 13:01:19 -0500 > > Subject: Re: [Visualpython-users] optimise visualization for large > > set of data > > > > For Visual, that is a large data set in terms of having interactive > > zoom > > and rotate. > > > > Using the latest experimental version (Visual 5), which has an > > option to > > display cycle time (time between renders) and render time (time > > required > > to render the scene), on a rather fast laptop (Dell XPS with NVIdia > > graphics), 100x100x10 boxes has a cycle time of 1.35 seconds, and a > > render time of 0.17 seconds. In other words, Visual is hardly able to > > deal with that many objects interactively. > > > > In Visual 5 there is a new object, "points", which is similar to > curve > > but the points aren't connected. With the same 100x100x10 grid there > is > > a cycle time of 0.33 seconds and a render time of 0.080 seconds. > > > > Bruce Sherwood > > > > > > Adrián Martínez Vargas wrote: > > > hello mail list > > > > > > I have problems to visualise a large number of data, the > > visualization > > > windows get slowly, for example with 100x100x10 boxes it is > > really slow, > > > and it is not too much. > > > > > > The question is: how to optimise the visualization for large set > > of data? > > > > > > your > > > Adrian > > > > > > > > > > > > ---------------------------------------------------------------------- > -- > > > > > > > > > ---------------------------------------------------------------------- > --- > > > This SF.Net email is sponsored by the Moblin Your Move > > Developer's challenge > > > Build the coolest Linux based applications with Moblin SDK & win > > great prizes > > > Grand prize is a trip for two to an Open Source event anywhere in > > the world > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > < http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/>> > > > > > > > > > > > > ---------------------------------------------------------------------- > -- > > > > > > _______________________________________________ > > > Visualpython-users mailing list > > > Vis...@li... > <mailto:Vis...@li...> > > > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |