|
Post by poster on May 16, 2020 1:48:17 GMT
I am not able to get the test "Computing the normal vector on a cone" to pass.
The all zero point is fine, but it fails on point (1, 1, 1) where instead of the expected vector (1, -1.414213, 1), the actual vector is (.5, -0.707106, .5). Stepping through the code, it looks like the correct vector is being calculated; however, when the cone's local normal at returns its value to the base shape normal at, the normalize inside the base shape turns it into the incorrect value. None of the other shapes I have implemented seem to have this problem--all previous tests are passing, and I am even able to render scenes posted elsewhere on the forum with no problem.
What could I be missing?
|
|
|
Post by poster on May 16, 2020 10:20:43 GMT
Okay, so I naturally was misreading the test and was trying to use shape when the test specifically calls for a cone.
I guess I got so used to using shape for a lot of previous tests that I didn't even think about it.
At any rate, the test is passing now.
|
|