IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 1 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: Yep, that would be a formal statement
Slope of line 1 = (y12 - y11)/(x12 - x11) = tan A1

Slope of line 2 = (y22 - y21)/(x22 - x21) = tan A2

Here (x1i, y1i) and (x2i,y2i), i=1,2 are any two points on lines 1 and 2.

Need A2 - A1.

tan (A2 - A1) = (tan A2 - tan A1) / ( 1 + tan A2 tan A1)

So the answer is

A2 - A1 = arctan (tan A2 - tan A1) / (1 + tan A2 tan A1)

Actually it is much simpler to work with the "homogeneous coordinates" of projective geometry. Then the angle can be calculated as a logarithm of the "cross ratio" of four lines - the two lines you are given and two imaginary "ideal" lines that connect the intersection point of the given lines with the two "circular points at infinity". The angle is then

A = i log XR(L1, L2, I1, I2)

The tangents etc. that appear above are the reduction of this formula for a specific coordinate system.

It really pays to learn projective ideas if you're going to do computational geometry.
-drl
New If he doesn't remember highschool math...
do you think that he'll figure out how to apply what you said?

Curious,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New He's Jay - he'll figure it out
-drl
     Mininum Convex Polygon around Points? - (JayMehaffey) - (16)
         Are they always convex? - (FuManChu) - (7)
             Convex Hull - (JayMehaffey) - (6)
                 Glad you said you found it - (ben_tilly)
                 You need an algorithms book. - (static) - (4)
                     NIST DADS - (ChrisR)
                     I have that one - (JayMehaffey) - (2)
                         Wierd - (altmann) - (1)
                             I have the C++ one, too. - (static)
         Start with center of mass - (drewk)
         Re: Mininum Convex Polygon around Points? - (deSitter) - (6)
             Yep, that would be a formal statement - (JayMehaffey) - (5)
                 Re: Yep, that would be a formal statement - (deSitter) - (2)
                     If he doesn't remember highschool math... - (ben_tilly) - (1)
                         He's Jay - he'll figure it out -NT - (deSitter)
                 You don't need to compute angles - (ben_tilly) - (1)
                     Actually ended up using vector math - (JayMehaffey)

No matter what I accomplish in this life, nobody's going to sculpt my head in thermoplastic resin and make it spit water into the bedrooms of sick children.
40 ms