News for hackers. Stuff that matters.
Re:A reasonably speedy Python ray tracer by ricardobeat on Saturday October 21, 2017 @03:47PM (#15523290)
Are the reflections in examples like this physically correct? My brain kind of expects the floor to be strongly curved when reflected in the sphere. Maybe it's just the unfamiliar, unrealistic environment?
Re:A reasonably speedy Python ray tracer by dahart on Saturday October 21, 2017 @05:30PM (#15523717)
Yes, for perfect mirror surfaces. The scene isn't very physically realistic, but the reflections are doing the right thing given the scene. The floor is strongly curved in the reflections. The reflection of the horizon line isn't, only because the camera is near the floor and looking almost level. If the camera were up higher looking down, the horizon reflection would be more strongly curved.
Re:A reasonably speedy Python ray tracer by CyberDildonics on Saturday October 21, 2017 @04:20PM (#15523423)
The simple answer is no, but unless there is an error the rays will at least be traced from the reflection angle. All light you see bouncing off of hard surfaces is some sort of reflection and even for sharp reflections there are a lot of details.

One is fresnel falloff towards edges, which is simple. Another is depth of field carrying into reflections, which is more difficult and not common (yet).

Re:A reasonably speedy Python ray tracer by RBerenguel on Saturday October 21, 2017 @03:56PM (#15523327)
I'm pretty sure the strong curve is because (normal) floors are finite planes, and usually we don't look so close from the sphere's equator in real life.

Once I wrote a raytracer in Lisp based on pg's code in ANSI Common Lisp, so I've seen the results of changing camera positions.

Re:A reasonably speedy Python ray tracer by berkut on Saturday October 21, 2017 @03:58PM (#15523335)
It depends on where the camera is, how far the floor extends and the reflection angle (which might be different for different materials / IOR).

https://imgur.com/a/PCG4O