Line3D relative orientation

27 views
Skip to first unread message

Jose Gabriel Egas Ortuño

unread,
Aug 20, 2021, 8:01:37 AM8/20/21
to sympy
Hi.

O can get the direction of a 3D line, relative to a global frame:

l1.direction

How can I get the direction relative to a frame which has been rotated about the global frame?

Thanks.

Jose Gabriel Egas Ortuño

unread,
Aug 20, 2021, 8:01:37 AM8/20/21
to sympy

Hi.

I have a line:

p1, p2 = Point3D(x, y, z), Point3D(x, y, z)
l1 = Line3D(p1, p2)

Then I can get the line's orientation relative to a global frame:

l1.direction

Imagine now I rotate the global frame, is there a way to get the direction relative to a rotated frame?

Thanks in advance....

Chris Smith

unread,
Aug 23, 2021, 2:21:29 PM8/23/21
to sympy
See `help(Line.angle_between)`, especially `smallest_angle_between` -- does that help?

/c

Reply all
Reply to author
Forward
0 new messages