From: Ting L. <dri...@gm...> - 2007-01-25 11:53:54
|
Hi, fans, I'm a newbie. VPython is really easy to use. But it looks too simple. I wonder if there is a parameter to customize the number of faces used to draw a sphere (or cylinder ...)? I cannot find it. By default, VPython draws a pretty smooth sphere, I guess the number of slice should be larger than 50. Sphere(pos=(*,*,*),color=color.red) However, low polygon objects are needed. This control is necessary to make smooth animation, especially when the number of objects is large. I know VPython gives a way to build object by user, face. But can the authors make life easier? Another question is also about the rendering efficiency. I don't know if VPython uses gllist internally. (sorry, haven't studied the source) ,and if VPython support object 'instance'? (A instance of an object doesn't need to rebuild the vertex array at a new position but just copy the vertex from the original object and perform translation, scale, or zoom. ) Ting |
From: Arthur <ajs...@op...> - 2007-01-25 12:22:07
|
Ting Li wrote: > Hi, fans, > > I'm a newbie. > > VPython is really easy to use. But it looks too simple. > I wonder if there is a parameter to customize the number of faces used > to draw a sphere (or cylinder ...)? I cannot find it. By default, > VPython draws a pretty smooth sphere, I guess the number of slice > should be larger than 50. VPython adjusts level of detail for primitives like spheres and cylinders on the fly based on distance from the camera. But I agree that the general level of detail should be under user control. I had pointed out to Bruce that the infrastructure to allow adjustment of level of detail from the default (it would be on a scene by scene basis,not a primitive by primitive bases) is already in the code, and that exposing it to Python was trivial, and provided the code. I've lost track of whether it was checked into CVS. Bruce? Art |
From: Bruce S. <Bru...@nc...> - 2007-01-25 13:12:39
|
As Arthur says, he has been working on this, and will probably check it in to CVS himself (I've been buried under course startup issues). However, he's doing this work in the beta version, and it continues to look like a long process to get the beta version up to the point where it can be the standard version. Bruce Sherwood Arthur wrote: > Ting Li wrote: > >> Hi, fans, >> >> I'm a newbie. >> >> VPython is really easy to use. But it looks too simple. >> I wonder if there is a parameter to customize the number of faces used >> to draw a sphere (or cylinder ...)? I cannot find it. By default, >> VPython draws a pretty smooth sphere, I guess the number of slice >> should be larger than 50. >> > > VPython adjusts level of detail for primitives like spheres and > cylinders on the fly based on distance from the camera. > > But I agree that the general level of detail should be under user control. > > I had pointed out to Bruce that the infrastructure to allow adjustment > of level of detail from the default (it would be on a scene by scene > basis,not a primitive by primitive bases) is already in the code, and > that exposing it to Python was trivial, and provided the code. > > I've lost track of whether it was checked into CVS. > > Bruce? > > Art > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: driverz <dri...@gm...> - 2007-01-25 13:15:28
|
Thanks, Art, got it! So we just need to wait;) By the way, I would like to remind the authors, the simplicity of vpython is vital! Do not lose it when you are trying to provide more! (you are working on adding lighting, texture, transparency...) It looks like a real 3D game engine more and more. Be careful! Keep VPython simple to use and fast enough, please! Ting -----Original Message----- From: Arthur [mailto:ajs...@op...] Sent: Thursday, January 25, 2007 1:22 PM To: Ting Li Cc: vis...@li... Subject: Re: [Visualpython-users] VPython render efficiency Ting Li wrote: > Hi, fans, > > I'm a newbie. > > VPython is really easy to use. But it looks too simple. > I wonder if there is a parameter to customize the number of faces used > to draw a sphere (or cylinder ...)? I cannot find it. By default, > VPython draws a pretty smooth sphere, I guess the number of slice > should be larger than 50. VPython adjusts level of detail for primitives like spheres and cylinders on the fly based on distance from the camera. But I agree that the general level of detail should be under user control. I had pointed out to Bruce that the infrastructure to allow adjustment of level of detail from the default (it would be on a scene by scene basis,not a primitive by primitive bases) is already in the code, and that exposing it to Python was trivial, and provided the code. I've lost track of whether it was checked into CVS. Bruce? Art |
From: Arthur <ajs...@op...> - 2007-01-25 13:31:56
|
driverz wrote: > Thanks, Art, > > got it! > So we just need to wait;) > > By the way, I would like to remind the authors, the simplicity of vpython > is vital! Do not lose it when you are trying to provide more! > (you are working on adding lighting, texture, transparency...) > It looks like a real 3D game engine more and more. Be careful! > > Keep VPython simple to use and fast enough, please! > I think this is good advice. I think day-to-day VPython needs little of the fancy graphics stuff, to the extent that it is at the expense of performance. Bruce has been in touch with the original author of VPython, David Scherer, who, I think, expressed similar concerns. OTOH, I think it would be nice if VPython could better step up to the plate for presentation purposes and do the fancy stuff, as well. And I, who do geometric exploration with VPython - not write games, for example - find that transparency to be a great feature. There is obvious benefit to not necessarily having objects hiding one another. So, to me, its a matter of getting the defaults right. And I think the general Python design philosophy is a good one to follow - which I think is always thinking about the trade-offs between simplicity, and putting power into the hands of the user to use as they will. Art |
From: Jonathan B. <jbr...@ea...> - 2007-01-26 23:59:36
|
On Thu, 2007-01-25 at 12:53 +0100, Ting Li wrote: > Hi, fans, > > I'm a newbie. > > VPython is really easy to use. But it looks too simple. > I wonder if there is a parameter to customize the number of faces used > to draw a sphere (or cylinder ...)? I cannot find it. By default, > VPython draws a pretty smooth sphere, I guess the number of slice > should be larger than 50. > > Sphere(pos=(*,*,*),color=color.red) > > However, low polygon objects are needed. This control is necessary to > make smooth animation, especially when the number of objects is large. > > I know VPython gives a way to build object by user, face. > But can the authors make life easier? > > Another question is also about the rendering efficiency. > I don't know if VPython uses gllist internally. VPython 4 uses GL displaylists, whereas 3.x uses vertex arrays (still fairly fast). > (sorry, haven't > studied the source) ,and if VPython support object 'instance'? (A > instance of an object doesn't need to rebuild the vertex array at a > new position but just copy the vertex from the original object and > perform translation, scale, or zoom. ) Where possible, objects share the same geometry to conserve memory and for speed. Objects with instance-specific geometry include arrow, ring, curve, convex, points, and faces. -Jonathan |