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, 2021 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, 2021 at 11:10
  • \$\begingroup\$ this is it, make it the answer and I'll check it \$\endgroup\$ Jan 2, 2021 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\$ Jan 2, 2021 at 17:36

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .