From: Bruce S. <Bru...@nc...> - 2009-11-14 04:52:53
|
You may find it interesting and useful to set scene.show_rendertime = True. It will show you the "cycle" time (how many milliseconds between runnings of the rendering thread) and the "render" time (how many milliseconds it takes to render the scene). Since you find zooming and rotating to be very slow, presumably you'll see very large cycle times and very large render times. I don't recognize the description you give of "wild" rotations. You might try a very small data set first. It's possible that what's happening is that in the very long time interval between renders you're making very large mouse movements corresponding to very large rotations, with long delays before the effect is seen, so the viewing is basically out of control. Bruce Sherwood Tim Smith (25121) wrote: > I pulled out one dataset we may use of 208,352 spheres ( I will try > points soon). The initial scene renders quickly but zooming and panning > of the image is very slow. > When I say it's wild, it seems like my scene is rotating on a huge axis, > where I want my scene to flip and spin while staying in the centre of > the screen. Right now when I right click and drag down my model flys off > the display and does a big circle till it comes back around on the > screen. Could this be todo with the data set I'm rendering ?? > > > -----Original Message----- > From: Bruce Sherwood [mailto:Bru...@nc...] > Sent: Saturday, 14 November 2009 12:29 PM > To: vis...@li... > Subject: Re: [Visualpython-users] basic questions > > VPython implements a second "rendering" thread which about 25 times per > second > interrupts your computations to create a 3D image (using OpenGL) from > the > current attributes of the objects, and the current (mouse-determined) > "camera" > viewing angle. A complete rendering is done each time (25 per second) > even if no > object has changed nor the camera has moved. For this reason performance > with > very large numbers of objects is likely to be poor, but it's easy enough > to test > simply by creating a very large number of objects. You could make the > window > invisible while computing, so as not to be interrupted by rendering, but > once > you make the window visible you may see poor performance for zooming and > rotating. > > The cheapest object to render is "points" which makes 2D disks or > squares > positioned at 3D locations. It is moreover an array object, with a list > for the > positions of the points. > > Please say more about your question regarding zoom and rotate. What is > "wild" > about using the mouse to rotate or zoom the camera for looking at the > scene? > > There is documentation on mouse manipulations in the Visual help > available on > the Help menu in IDLE. Under Windows, Events, & Files see Mouse Events. > Also, in > the contributed section of vpython.org are some example programs that do > fancy > things with the mouse. And see the Tutorial on the first page of the > help for > the basics on using the mouse to zoom and rotate. > > Bruce Sherwood > > Tim Smith (25121) wrote: >> 1. Can vpython handle large datasets? I'm considering using it > for >> a project modelling a large geographical body, I might need to plot >> 1,000,000 points or more. >> >> 2. What would be the best object to use ? >> >> 3. Is there a tutorial on mouse manipulation so I can zoom in and > >> out and rotate my object? The default behaviour seems a bit wild > |