From: <bre...@un...> - 2008-10-26 22:48:56
|
I'm no expert, but wouldn't it be cylinder(pos=(x1,y1,z1), axis=(x2-x1,y2-y1,z2-z1)) "Doug Mair" <dou...@gm...> 27/10/2008 08:40 AM To <vis...@li...> cc Subject [Visualpython-users] Line between two 3D points. Hi all, What is the VPython code to draw a cylinder between two arbitrary 3D points? I'm looking for an equivalent to the Windows GDI: line(x1, y1, x2, y2), but in 3d. Maybe Line(x1, y1, z1, x2, y2, z2) or Line(point1=(x,y,z), point2=(x,y,z)) It seems that I would have to calculate the angle vector between the two points and use that as the axis. Then I would have to calculate the distance between the two points. Is there an easier way? Sample code would help too. Thanks, Doug Mair ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ------------------------------------------------------------------------- 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 UNITED GROUP This email message is the property of United Group. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you may not disclose, copy or distribute this email, nor take or omit to take any action in reliance on it. United Group accepts no liability for any damage caused by this email or any attachments due to viruses, interference, interception, corruption or unauthorised access. If you have received this email in error, please notify United Group immediately by email to the sender's email address and delete this document. |