From: Stef M. <s.m...@ru...> - 2008-12-04 00:17:52
|
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 |