Solved

angle clockwise or counterclockwise?

Posted on 2010-11-13
4
783 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
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 34129463
Take the cross product of the vectors
0
 
LVL 8

Expert Comment

by:vsudip
ID: 34129480
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Two list de-cypher 6 86
2k Power n formula 2 33
Math question 3 57
Math Question 1 51
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…
We are taking giant steps in technological advances in the field of wireless telephony. At just 10 years since the advent of smartphones, it is crucial to examine the benefits and disadvantages that have been report to us.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now