?
Solved

angle clockwise or counterclockwise?

Posted on 2010-11-13
4
Medium Priority
?
791 Views
Last Modified: 2012-05-10
I am writing a program that needs to determine the angle between two line segments and whether the angle is clockwise or counterclockwise from the main segment.

How do I determine the direction of the angle from the main segment?

All the coordinates are positive numbers.  The segments are of variant sizes.

The solution needs to be an equation since I will have to insert it in some code.

Thanks!

0
Comment
Question by:Emilie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 1500 total points
ID: 34129463
Take the cross product of the vectors
0
 

Author Comment

by:Emilie
ID: 34129483
Math isn't exactly my forte.  Would you mind explaining how to do a cross product of vectors?

Say I have a(x,y), b(x, y) and c(x, y), how do I do the cross product of ab x cb?
0
 

Author Closing Comment

by:Emilie
ID: 34129817
The cross product would be

(bx - ax)*(cy - ay) + (by - ay)*(cx - ax)

- x * y yields a positive number
- y * x yields a negative number
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Win a Jar of Candy Corn: A Scientific Approach! I love mathematics. If you love mathematics also, you may enjoy this tip on how to use math to win your own jar of candy corn and to impress your friends. As I said, I love math, but I gu…
This article seeks to propel the full implementation of geothermal power plants in Mexico as a renewable energy source.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Suggested Courses
Course of the Month11 days, 1 hour left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question