Artifacts on dielectric #513
                  
                    
                      maurocolella
                    
                  
                
                  started this conversation in
                Debugging
              
            Replies: 2 comments
-
| Refraction bugs are typically fun to figure out. One thing to try is to hand trace a ray directly through the center of the glass sphere. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            -
| Thank you. I was concerned that there could be a bug or room for clarification in the relevant chapter of the book. I will take a close look as soon as I have time. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thank you for this wonderful book series. It's Sunday. I have done what the title says: in one weekend, ported the code of book 1 to Python, as an exercise in both Python and raytracing.
I believe I made a mostly (very) straight port of everything including the dielectric material, but when transposing the exact code currently found in the book, now in comment at:
https://github.com/maurocolella/python-raytracer/blob/master/threed/dielectric_material.py
I get an awful artifact (see attached).
I am not quite sure what is happening. I hastily reverted this to a version that produced the desired result from a previous iteration of the book, essentially based on implementations by other readers.
Help with this would be appreciated greatly.

Beta Was this translation helpful? Give feedback.
All reactions