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 |
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 |
From: Stef M. <s.m...@ru...> - 2008-12-04 18:16:36
|
thanks Bruce, Bruce Sherwood wrote: > 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) > Yes you perfectly understood my question. I think it must have been too late. I didn't realize that the position is of course also a vector, and vector adding is supported in VPython. And as I thought I had printed all the documents of Vpython, I didn't notice the vector page. I printed it today again, on 4 different printers, on 3 of them it was totally unreadable, on 1 you could read it (not very well). There seems to be something strange with the css class program / program0 I would suggest to put the vector help page on top of content page, because it's so important for "Ordinary Mortals" ;-) cheers, Stef |
From: Bruce S. <Bru...@nc...> - 2008-12-04 18:38:05
|
If you inspect the new documentation scheme now accessible at vpython.org you'll see that a link to vector operations are indeed prominently displayed at all times in the left margin. I hope too that the new layout will make printing the documentation seem less necessary. Bruce Sherwood Stef Mientki wrote: > thanks Bruce, > > Bruce Sherwood wrote: >> 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) >> > Yes you perfectly understood my question. > I think it must have been too late. > I didn't realize that the position is of course also a vector, > and vector adding is supported in VPython. > > And as I thought I had printed all the documents of Vpython, > I didn't notice the vector page. > I printed it today again, on 4 different printers, > on 3 of them it was totally unreadable, on 1 you could read it (not very > well). > There seems to be something strange with the css class program / program0 > > I would suggest to put the vector help page on top of content page, > because it's so important for "Ordinary Mortals" ;-) > > cheers, > Stef |
From: Stef M. <s.m...@ru...> - 2008-12-04 20:07:22
|
Bruce Sherwood wrote: > If you inspect the new documentation scheme now accessible at > vpython.org you'll see that a link to vector operations are indeed > prominently displayed at all times in the left margin. > Very good !! thanks, Stef |