Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does a plane, that's facing 0,0,0, with origin, 0,0,-10, have a negative z in its normal? #4

Open
alurpal opened this issue Feb 4, 2020 · 1 comment

Comments

@alurpal
Copy link

alurpal commented Feb 4, 2020

Shouldn't its normal be 0,0,1?

In your example scene, the back wall has a normal of 0,0,-1

Backstory: I'm using your code and implementing triangles using https://www.scratchapixel.com/lessons/3d-basic-rendering/ray-tracing-rendering-a-triangle/ray-triangle-intersection-geometric-solution as reference. I got it to work and then realized my normals were going opposite than I thought (mind boggling). Anyway, I was under the impression that the normal was the direction an object's plane was facing.

@SebastianFelgueras
Copy link

It is the same, since the plane is orthogonal to the normal vector, the only relevant thing is the direction of the normal, not if it's pointing forward or backwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants