dilevin / computer-graphics-ray-tracing

Computer Graphics Assignment about Ray Tracing
1 stars 5 forks source link

Question about normalizing directional vector #58

Closed junior-stack closed 1 year ago

junior-stack commented 1 year ago

I found a problem when I tried to normalize the unit directional vector d = [0,0,-1]. The d.normalized gives me a result of [-infty, -infty, -infty]. I encountered this when I ran ./raytracing. Not sure if this is a special edge case I need to handle. In addition, I just want to confirm this rgb picture should be wrong when I did nothing to the main.cpp and run ./raytracing

image
junior-stack commented 1 year ago

NVM, I figured out, I initialize the directional vector d wrongly.