From: Bruce S. <Bru...@nc...> - 2008-11-20 02:56:37
|
Take the average of the two points to get the position: a = vector(-1,0,0) b = vector(1,0,0) y = vector(0,2,0) cylinder(pos=a+y, axis=b-a) box(pos=(a+b)/2, axis=b-a) Doug Mair wrote: > When using a box in VPython, pos specifies the center of the entire box. > > I'm trying to draw a box given two points. > > This works for Cylinder, but not box: > > cylinder(pos=point1, axis=point2-point1) > box(pos=point1, axis=point2-point1) > > How do I get the box to match the cylinder? > > Thanks, > -Doug > > ------------------------------------------------------------------------- > 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 |