|
From: Bruce S. <Bru...@nc...> - 2009-11-14 04:28:35
|
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 |