1
\$\begingroup\$

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

\$\endgroup\$
4
  • \$\begingroup\$ math.stackexchange.com/questions/4322/… \$\endgroup\$ – user144188 Jan 1 at 10:22
  • 1
    \$\begingroup\$ 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 \$\endgroup\$ – furas Jan 2 at 11:10
  • \$\begingroup\$ this is it, make it the answer and I'll check it \$\endgroup\$ – Bluebomber357 Jan 2 at 17:33
  • \$\begingroup\$ 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 \$\endgroup\$ – Bluebomber357 Jan 2 at 17:36
2
\$\begingroup\$

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
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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