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

  • Home
  • SEARCH
  • 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 1024943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:51:10+00:00 2026-05-16T11:51:10+00:00

How can I test whether a line has a point that lies within (not

  • 0

How can I test whether a line has a point that lies within (not on the edge of) a triangle. (All in 2D).

Currently I’m thinking I’ll do this:

  • Define the line, and each side of the triangle as Ax+By+C=0, and have an xrange.
  • Check if the line intersects any of the lines of the triangle.
  • If it does, check that this is NOT at the end of the line.

Is there a better way to do this?

  • 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-16T11:51:10+00:00Added an answer on May 16, 2026 at 11:51 am
    1. substitute the 3 points into the line’s equation. e.g. if the line is 4x − 3y + 2 = 0, and the triangle’s vertices are (2, 1), (4, 3), (0, 5), we get the values 7, 9 and -13 respectively.

    2. check if all values are of the same sign. If yes, the line does not intersect the triangle. In the above example, the line intersects the triangle.

      http://www.imgftw.net/img/743059947.png

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

Sidebar

Related Questions

Using VBA, how can I: test whether a file exists, and if so, delete
It is my understanding that I can test that a method call will occur
How can I test my site in AOL without installing AOL? I did that
How can i test whether my NSString contains the following file name : test.pdf
the book says that reintegrated branch should not be used as it can't accept
Is there a way to programmatically test whether ssh can authenticate using a public
Good afternoon, We have implemented a C++ cKeyArray class to test whether we can
I wonder if I can test landscape view using simulator?
Can jQuery test an array for the presence of an object (either as part
How can I test the same regex against different regular expression engines?

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.