[OpenSCAD] finding angle from a coordinate

don bright hmbright at fastmail.com
Wed Oct 12 22:03:35 EDT 2016


Here is my attempt

https://gist.github.com/donbright/b1999d40048b771d32fe9324e904a9f8

It is somewhat certain to work in all 8 octants

-- 
  don bright
  hmbright at fastmail.com

On Wed, Oct 12, 2016, at 08:26 PM, tony873004 wrote:
> I have a column with a radius of 1.
> The column's base is located at 0,0,0, and its top is located at 3,4,5.
> As I understand it, to orient the column I need to use rotate, rather
> than
> specify the endpoint.
> [code]
> translate([0,0,0]) {
>   rotate([a,b,c]) {
>     cylinder(r = 1, h = 7.071);
> }
> }
> [/code]
> How would I go about finding the angles a,b,c, knowing the endpoint?
> Thanks!
> 
> 
> 
> 
> --
> View this message in context:
> http://forum.openscad.org/finding-angle-from-a-coordinate-tp18684.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
> 
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org




More information about the Discuss mailing list