Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have to do what described in the picture below.

enter image description here

Any ideas on how to do this?

share|improve this question
What have you tried? –  Arkamis Oct 17 '12 at 21:56
@EdGorcenski I am using this formula at the moment en.wikipedia.org/wiki/…. –  kokos Oct 17 '12 at 22:48
@EdGorcenski If you have something to propose me I am glad to know! –  kokos Oct 17 '12 at 22:50

1 Answer 1

To calculate the barycentric cooordinates of a point wrt a given triangle, the wikipedia formulae are fine. You can write the formulae in terms of triangle areas or vector cross products, instead, if you want. This makes them look tidier, certainly, and provides some intuituion: http://mathworld.wolfram.com/BarycentricCoordinates.html

If you're writing code, the formulae based on areas or cross products will be more convenient if you already have functions for computing the latter.

Again, if you're writing code, you have to think about which two coordinates you will get from the quotient formulae, and which one you'll compute by subtraction. Some calculations will be more stable than others.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.