2d geometry problem .... ?

User avatar
Brian Peacock
Tipping cows since 1946
Posts: 28719
Joined: Thu Mar 05, 2009 11:44 am
About me: Ablate me:
Location: Location: Location:
Contact:

2d geometry problem .... ?

Post by Brian Peacock » Tue Mar 10, 2020 5:02 pm

Figure A:

Image

Given the coordinates of A, B, and C and some arbitrary point within the triangle P ...


Figure B:

Image

... and given some arbitrary angle a, how can I work out the distance d to the boundary of the triangle?

Cheers in advance :cheers:


===================================================
Attachments
Figure_B.png
Figure_A.png
Rationalia relies on voluntary donations. There is no obligation of course, but if you value this place and want to see it continue please consider making a small donation towards the forum's running costs.
Details on how to do that can be found here.

.

"It isn't necessary to imagine the world ending in fire or ice.
There are two other possibilities: one is paperwork, and the other is nostalgia."

Frank Zappa

"This is how humanity ends; bickering over the irrelevant."
Clinton Huxley » 21 Jun 2012 » 14:10:36 GMT
.

User avatar
Brian Peacock
Tipping cows since 1946
Posts: 28719
Joined: Thu Mar 05, 2009 11:44 am
About me: Ablate me:
Location: Location: Location:
Contact:

Re: 2d geometry problem .... ?

Post by Brian Peacock » Tue Mar 10, 2020 6:21 pm

Fixed the attachment issue above. So the problem is calculating the distance to the boundary of a triangle from any point within it it, in any direction, when the points of the triangle are three sets of {x, y} 2d coordinates relative to top-left {0, 0}.
Rationalia relies on voluntary donations. There is no obligation of course, but if you value this place and want to see it continue please consider making a small donation towards the forum's running costs.
Details on how to do that can be found here.

.

"It isn't necessary to imagine the world ending in fire or ice.
There are two other possibilities: one is paperwork, and the other is nostalgia."

Frank Zappa

"This is how humanity ends; bickering over the irrelevant."
Clinton Huxley » 21 Jun 2012 » 14:10:36 GMT
.

User avatar
laklak
Posts: 19091
Joined: Tue Feb 23, 2010 1:07 pm
About me: My preferred pronoun is "Massah"
Location: Tannhauser Gate
Contact:

Re: 2d geometry problem .... ?

Post by laklak » Tue Mar 10, 2020 6:30 pm

I don't think you can.
Yeah well that's just, like, your opinion, man.

User avatar
Brian Peacock
Tipping cows since 1946
Posts: 28719
Joined: Thu Mar 05, 2009 11:44 am
About me: Ablate me:
Location: Location: Location:
Contact:

Re: 2d geometry problem .... ?

Post by Brian Peacock » Tue Mar 10, 2020 6:31 pm

Bum.
Rationalia relies on voluntary donations. There is no obligation of course, but if you value this place and want to see it continue please consider making a small donation towards the forum's running costs.
Details on how to do that can be found here.

.

"It isn't necessary to imagine the world ending in fire or ice.
There are two other possibilities: one is paperwork, and the other is nostalgia."

Frank Zappa

"This is how humanity ends; bickering over the irrelevant."
Clinton Huxley » 21 Jun 2012 » 14:10:36 GMT
.

User avatar
Brian Peacock
Tipping cows since 1946
Posts: 28719
Joined: Thu Mar 05, 2009 11:44 am
About me: Ablate me:
Location: Location: Location:
Contact:

Re: 2d geometry problem .... ?

Post by Brian Peacock » Tue Mar 10, 2020 6:36 pm

I was hoping there'd be some kind of formula, but perhaps I need to break it down into smaller triangles or something.
Rationalia relies on voluntary donations. There is no obligation of course, but if you value this place and want to see it continue please consider making a small donation towards the forum's running costs.
Details on how to do that can be found here.

.

"It isn't necessary to imagine the world ending in fire or ice.
There are two other possibilities: one is paperwork, and the other is nostalgia."

Frank Zappa

"This is how humanity ends; bickering over the irrelevant."
Clinton Huxley » 21 Jun 2012 » 14:10:36 GMT
.

User avatar
Scot Dutchy
Posts: 14875
Joined: Tue Feb 23, 2010 2:07 pm
About me: Dijkbeschermer
Location: 's-Gravenhage, Nederland
Contact:

Re: 2d geometry problem .... ?

Post by Scot Dutchy » Tue Mar 10, 2020 6:37 pm

Nope.
"Wat is het een gezellig boel hier".

User avatar
Brian Peacock
Tipping cows since 1946
Posts: 28719
Joined: Thu Mar 05, 2009 11:44 am
About me: Ablate me:
Location: Location: Location:
Contact:

Re: 2d geometry problem .... ?

Post by Brian Peacock » Tue Mar 10, 2020 6:48 pm

Surely I haven't stumbled upon an unsolvable Trigonometry problem?
Rationalia relies on voluntary donations. There is no obligation of course, but if you value this place and want to see it continue please consider making a small donation towards the forum's running costs.
Details on how to do that can be found here.

.

"It isn't necessary to imagine the world ending in fire or ice.
There are two other possibilities: one is paperwork, and the other is nostalgia."

Frank Zappa

"This is how humanity ends; bickering over the irrelevant."
Clinton Huxley » 21 Jun 2012 » 14:10:36 GMT
.

User avatar
NineBerry
Tame Wolf
Posts: 6608
Joined: Thu Feb 26, 2009 1:35 pm
Location: nSk
Contact:

Re: 2d geometry problem .... ?

Post by NineBerry » Tue Mar 10, 2020 6:51 pm

Connect the dot to all three corners. That creates three triangles. The height of these triangles is the distance of the point to the borders.

User avatar
Svartalf
Offensive Grail Keeper
Posts: 35883
Joined: Wed Feb 24, 2010 12:42 pm
Location: Paris France
Contact:

Re: 2d geometry problem .... ?

Post by Svartalf » Tue Mar 10, 2020 6:53 pm

it's not a trig problem. to calculate a distance, you need measurements. If you knew the length of the sides of the triangle, and the point's distance to the other two sides, you might have a prayer of doing it, but in a triangle of indeterminate size and with an undefined point, calculating a distance is impossible.
Embrace the Darkness, it needs a hug

PC stands for "Patronizing Cocksucker" Randy Ping

User avatar
NineBerry
Tame Wolf
Posts: 6608
Joined: Thu Feb 26, 2009 1:35 pm
Location: nSk
Contact:

Re: 2d geometry problem .... ?

Post by NineBerry » Tue Mar 10, 2020 7:10 pm

Svartalf wrote:
Tue Mar 10, 2020 6:53 pm
it's not a trig problem. to calculate a distance, you need measurements. If you knew the length of the sides of the triangle, and the point's distance to the other two sides, you might have a prayer of doing it, but in a triangle of indeterminate size and with an undefined point, calculating a distance is impossible.
Rubbish. You do that in 7th grade at school

User avatar
laklak
Posts: 19091
Joined: Tue Feb 23, 2010 1:07 pm
About me: My preferred pronoun is "Massah"
Location: Tannhauser Gate
Contact:

Re: 2d geometry problem .... ?

Post by laklak » Tue Mar 10, 2020 7:31 pm

You can get the lengths of the big triangle legs because you're got the coordinates. With all three legs you can get the internal angles. But that's still not solving the problem. To do that you'd need either the coordinates where two legs of the cross intersect the big triangle, or 2 angles and one length on the smaller triangle to calculate d. The smaller triangle has one 90 angle, and one equal to 360 -(a + 90). But you still need a length.

You could move point P anywhere within the big triangle and angle a would remain the same, but d would change.
Yeah well that's just, like, your opinion, man.


User avatar
Brian Peacock
Tipping cows since 1946
Posts: 28719
Joined: Thu Mar 05, 2009 11:44 am
About me: Ablate me:
Location: Location: Location:
Contact:

Re: 2d geometry problem .... ?

Post by Brian Peacock » Tue Mar 10, 2020 8:40 pm

NineBerry wrote:
Tue Mar 10, 2020 6:51 pm
Connect the dot to all three corners. That creates three triangles. The height of these triangles is the distance of the point to the borders.
Image

The figure may be misleading. The angle a is arbitrary, therefore h = 2A/b only guarantees d = h when a is a specific value - imagine how it'd look with a ± 20°
Rationalia relies on voluntary donations. There is no obligation of course, but if you value this place and want to see it continue please consider making a small donation towards the forum's running costs.
Details on how to do that can be found here.

.

"It isn't necessary to imagine the world ending in fire or ice.
There are two other possibilities: one is paperwork, and the other is nostalgia."

Frank Zappa

"This is how humanity ends; bickering over the irrelevant."
Clinton Huxley » 21 Jun 2012 » 14:10:36 GMT
.

User avatar
Brian Peacock
Tipping cows since 1946
Posts: 28719
Joined: Thu Mar 05, 2009 11:44 am
About me: Ablate me:
Location: Location: Location:
Contact:

Re: 2d geometry problem .... ?

Post by Brian Peacock » Tue Mar 10, 2020 8:50 pm

I think I need this explained in a simpler form that the Wiki page offers.
Rationalia relies on voluntary donations. There is no obligation of course, but if you value this place and want to see it continue please consider making a small donation towards the forum's running costs.
Details on how to do that can be found here.

.

"It isn't necessary to imagine the world ending in fire or ice.
There are two other possibilities: one is paperwork, and the other is nostalgia."

Frank Zappa

"This is how humanity ends; bickering over the irrelevant."
Clinton Huxley » 21 Jun 2012 » 14:10:36 GMT
.

User avatar
JimC
The sentimental bloke
Posts: 65276
Joined: Thu Feb 26, 2009 7:58 am
About me: To be serious about gin requires years of dedicated research.
Location: Melbourne, Australia
Contact:

Re: 2d geometry problem .... ?

Post by JimC » Tue Mar 10, 2020 8:50 pm

9B has nailed it. You actually don't need the angle you mentioned in your OP, Brian, simply all 4 coordinates, then use 3 different versions of the formula, one for the perpendicular distance to each of the 3 sides. You could, additionally, calculate the angle if you wanted.
Nurse, where the fuck's my cardigan?
And my gin!

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests