Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7186901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:43:48+00:00 2026-05-28T18:43:48+00:00

I have a problem (and a solution too). What I want to know is

  • 0

I have a problem (and a solution too). What I want to know is how to arrive at "that" solution. "That" solution is perfect and working fine for all possible combinations.

Assume that you have 3 points in the XY coordinate system: P1(x1, y1), P2(x2, y2) and P3(x3, y3).

Now, join the point P2 with P3. It will result in "ray" originating from point P2 and passing through point P3. I used word ray because I want it in only one direction, i.e. from P2 to P3.

Now, with respect to point P1, is the ray P2 --> P3 in a clockwise or counterclockwise direction?


Solution is:

use following formulae to find value of z1:

z1 = (x3 - x1)(y2 - y1) - (y3 - y1)(x2 - x1)

If z1 is positive, P2 --> P3 is clockwise. If z1 is negative, P2 --> P3 is counterclockwise. And if it is 0 the points are on the same imaginary line extending from P1.

Can someone please help me how to arrive at this solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:43:49+00:00Added an answer on May 28, 2026 at 6:43 pm

    The formula you’ve written is very similar to the formula of cross product of two vectors. As the direction of the cross product is dependent on the CW/CCW configuration, you can easily use it for your problem.

    You can construct two rays P1->P2 and P1->P3. Then you can take their cross product. If the component of the product along Z-axis is positive, then P2 and P3 is in counterclockwise order, and vice versa.

    If you try to do that, the result, which would be the coefficient of k (unit vector along Z-axis) in the cross product, will be precisely the same as the answer you mentioned.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple problem and a solution that will work, but I'm
I have a weird problem that i can't figure out a solution for: I've
I have a strange problem with VS2008. My solution has 8 projects (all c#)
It is known that the halting problem cannot have a definite solution, one that
I have problem with copying sdf file to WM emulator. My solution structure MyApp.DataLayer
I have a problem and search for a solution on Google but can't find
My problem (and solution?) is simple - I hope :) I have a RIA
i have this problem: ms-access could not delete and i found a potential solution
I have an interesting problem and would appreciate your thoughts for the best solution.
Solution: if you have the same problem, addElement() instead of addChild() is what did

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.