1

https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-back-face-culling

I am on lesson 2 of the "Opengl in 500 lines" tutorial. I follow the part of the lesson in "The method I adopt for my code", but I don't understand this leap from

P = A + uAB-vector + vAC-vector 

to

0-vector = uAB-vector + vAC-vector + PA-vector. 

enter image description here

  • https://math.stackexchange.com/questions/4322/check-whether-a-point-is-within-a-3d-triangle –  Jan 01 '21 at 10:22
  • 1
    if I understand if you have P = A + uAB + vAC and you substract P on both sides then you get 0 = A + uAB + vAC - P but A - P can mean vector PA – furas Jan 02 '21 at 11:10
  • this is it, make it the answer and I'll check it – Bluebomber357 Jan 02 '21 at 17:33
  • I'll break out the second part of my question into a new one, I should have just started with the question that was just answered – Bluebomber357 Jan 02 '21 at 17:36

1 Answers1

2

If I understand if you have

 P = A + uAB + vAC 

and you substract P on both sides then you get

 0 = A + uAB + vAC - P 

and you change order

 0 = A - P + uAB + vAC

but A - P can mean vector PA

 0 = PA + uAB + vAC
furas
  • 202
  • 1
  • 8