taiya / dgp

Digital Geometry Processing - Fall 2016 - University of Victoria
38 stars 11 forks source link

HW 1 - Numerical problems #9

Closed maurizio-kovacic closed 7 years ago

maurizio-kovacic commented 7 years ago

To all the folks still working on it, be aware that numerical problem could arise when computing the dot product between two normals.

Vec3 a = _somenormal.normalized(); //forcing a to be a unit vector Vec3 b = _anothernormal.normalized(); //forcing b to be a unit vector Scalar dot = a.dot(b);

dot could be actually greater than 1, due to numerical errors. Something like 1.00000012. This could/will affect your normal orientation in Part3 and definitely Part4.