Showing posts with label raytracing. Show all posts
Showing posts with label raytracing. Show all posts

Friday, March 23, 2012

What is a Ray ?

To talk about ray let me first talk about a line, a line is a parametric equation based on a point and a vector. It will have a point P which is the point @ which line starts and a direction V which is a vector as shown in image.


A point on line can be represented as where t is a scalar

Point(t) = P + t * V


Varying t will give you points on the line, Now let’s see what is the difference between a line and a Ray, a line extends to both direction whereas a Ray has a origin and one direction @ which it travels. Also for a ray t must be a non-negative value.

Thursday, March 15, 2012

What is a Ray tracer?

Before I go to raytracing let me just talk about some basic physics known as optics, which on the fundamental level says we see objects when light bounces of the object surfaces or object themselves produce light and reaches our eyes

Ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects. This technique is capable of producing hyper realistic visuals compared to regular scanline rendering methods. Ray tracing is capable of simulating a wide variety of optical effects, such as reflection and refraction, scattering, and dispersion phenomena.

The basic idea of ray tracing is to care only about the rays that hit our eyes directly or after some re-bounce, also the generated images will be grids of pixels with limited resolution.