From: <Art...@ao...> - 2001-03-31 15:25:09
|
Bruce asked - >>Sorry to be dense, but could you explain what this is and what it is for? One can create classes sub-classed from UserVector, adding whatever methods and attributes one might need to extend the VPython vector, but use this "extended" vector as one might use the standard vector in VPython code. And the object created from the sub-class can interact with the native VPython vector, e.g one can "cross(v1,v2)" where v1 is inherited from UserVector and v2 is a native VPython vector. >Perhaps a paragraph of intent/utility could be included in the module? >And/or a routine at the end illustrating its use? Yeah being a little lazy there. I am using the UserVector in a dynamic geometry toy I have been iterating over for some time and now brining over to VPython. It is mostly a self-education exercise - programming, graphics, synthetic geometry, analytic geometry, matrix algebra. Considering my starting point on all these subjects, I know how much I have gotten from the process and have become quite an enthusiast of Python\Numeric as an educational tool and see VPython as a perfect extension. I do hope to have something to show interested folks in a few days - so I would hope you might have a look at it and see from it how I utilized the UserVector. ART |