PDA

View Full Version : Simple math problem.



Meanz
12-31-2011, 02:38 AM
Hello, I am having some issues, for some reason my brain won't connect.

I have a tile as shown on this image
http://img13.imageshack.us/img13/595/coordfailure.png

I want to divide this tile into 4 new tiles.
The tile is composed with sides the length of 1 unit, but the height of each corner is variable.

So when I create the new tiles, I am unable to figure out the height that the new corners should have.

Basically I can't find a way to determine the y values of p5, p6 and p7.

as shown here.
http://img191.imageshack.us/img191/595/coordfailure.png

Any help would be appreciated.

trinitrotoluene
12-31-2011, 01:36 PM
To find the coordinates of your points p5, p6 and p7, you can use the definitions and properties defined for points (http://en.wikipedia.org/wiki/Point_(geometry)) and vectors (http://en.wikipedia.org/wiki/Euclidean_vector)
So to calculate p5, you can do this:


p5 = p1 + (p2-p1)*0,5 // here p1 is the "origin"
or p5 = p2 + (p1-p2)*0,5 //here p2 is the "origin"


p2-p1 and p1-p2 define a vector. p5 is half way to p1 and p2 so the vector is multiplied by 0,5. The addition of a point with a vector give another point. Derive the other points with the same method.

Meanz
12-31-2011, 07:36 PM
Thanks for replying,
Yeah after the champagne I realized that basic vector math's would easily give me the answer, I got no idea why I forgot about it.