Reflection vs Scattering in Ray-Tracing

In ray-tracing simulations one is faced with a complexity at points of intersection between rays and objects. How to handle the reflection, should it be specular or scattered. In this post we consider the two extreme cases; pure reflection vs scattering. For this we consider that in the case of specular reflection the power of the ray is reduced by 3dB (that is R=0.5) and the ray continues as it would if there was no interaction with the object (off course direction would be changed with angle of reflection being equal to angle of incidence). In the case of scattered […]

Read more

How to Find Point of Intersection of Two Lines

Finding the point of intersection of two lines has many important application such as in Ray-Tracing Simulation.  Two lines always intersect at some point unless they are absolutely parallel, like the rails of a railway track. We start with writing the equations of the two lines in slope-intercept form. y1=b1+m1*x1 y2=b2+m2*x2 Here m1 and m2 are the slopes of the two lines and b1 and b2 are their y-intercepts. At the point of intesection y1=y2, so we have. b1+m1*x1=b2+m2*x2 But at  the point of intersection x1=x2 as well, so replacing x1 and x2 with x we have. b1+m1*x=b2+m2*x or b1-b2=-x*(m1-m2) […]

Read more