From: Bruce S. <Bru...@nc...> - 2008-12-04 03:28:18
|
It's great that you found VPython to be useful for real work. I'm not absolutely sure I understand the situation, but here's an example which may address your question: rod = cylinder(pos=(1,2,3), axis=(5,0,0)) end_of_rod = rod.pos+rod.axis # this will be (6,2,3) Bruce Sherwood Stef Mientki wrote: > hello, > > While embedding VPython in my application (PyLab_Works), > I just bumped into a real world problem of my daily work, > which I think can well be solved with VPython. > > I never used VPython before, > but in a short evening I managed to get the basic parts working. > How magnificient VPython is !! > I made a litlle flash movie of it (1.6 MB), to show my problem: > http://mientki.ruhosting.nl/data_www/ic1.htm > > The real world problem is the design of an intensive care unit, > especially the design of the lifting arms in a small room, with > different bed positions. > > Now I bumped into a step, > which I probably can only solve with lots of simple math (my math is a > bit rusty), > but I have the feeling, that there must be a very simple solution. > As you can see in the movie, > with just 10 lines of code, both lifting arms are moving, > unbelievable (at least for me ;-) > In fact the lifting arms should be moved by the mouse, but I doubt that > would be a problem. > The movie shows 2 lifting arms > The problem is to bend the two double arms, light blue and purple, > for that I need to find the rotation point at the end of each first half > arm, > because that's the rotation point of the second half of each arm. > I see I can get the position, axis, and length of the first half of the arm, > so how do I get the end that arm ? > > here are some pictures of real lifting arms. > > http://www.draeger.nl/MT/internet/pdf/CareAreas/ORAnesthesia/or_the_heart_of_hospital_success_en.pdf > > Another question: > is there an event when an object has moved or rotated ? > > thanks, > Stef Mientki > > ------------------------------------------------------------------------- > 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=/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |