From: Anders P. <an...@gm...> - 2008-10-26 22:20:47
|
Hello! This is simple to to. You need to write like this: point1=(a,b,c) point2=(x,y,z) cylinder(pos=point1, axis=point2-point1) Regards /Anders Petersson On Sun, Oct 26, 2008 at 10:40 PM, Doug Mair <dou...@gm...> wrote: > 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 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 > > |