# Thread: Finding a point within a triangle

1. ## Finding a point within a triangle

Hi, I'm new to this place and have a couple of maths problems that are haunting me while developing a game. The one I'm working on at the moment is as follows.

I have 2 polygon configurations. The standard one as seen in the diagram at the bottom. A consistently sized triangle. The 3 corners however can be offset on the Y-axis by any positive number (but can be 0), so they'll never go below. My problem however comes when finding a point within the polygon, marked with a small X on the diagram. I have the point in the top polygon and then need to find the equivalent point in the bottom. This of course means the X axis is the same, but the Y is different. It's as if you have a piece of rubber with a dot on it and I need to calculate it's position if it's stretched over the bottom polygon. I hope this all makes sense!

Attachment 38830
Nick

2. ## Re: Finding a point within a triangle

What do you mean by "equivalent" point? What does "equivalent" mean here? Are you thinking of the triangle as a rubber sheet that has been deformed and the point, x, on that sheet moves with the deformation?

3. ## Re: Finding a point within a triangle

Hi Halls, I probably didn't describe this very well. Yes if I have a deformed triangle I need to find point X on the undeformed triangle.