Skip to content

Instantly share code, notes, and snippets.

@lucasgautheron
Last active June 23, 2017 18:29
Show Gist options
  • Save lucasgautheron/fbbfbc17d0a49694d334d37ed273f219 to your computer and use it in GitHub Desktop.
Save lucasgautheron/fbbfbc17d0a49694d334d37ed273f219 to your computer and use it in GitHub Desktop.
raydir = rays direction
for each face f
f->enlightened = true
for each different face tf
if (ray with direction "raydir" and including tf barycenter intersects face f
AND raydir.dot(f-tf) is positive) then
f->enlightened = false
leave for loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment