Rays and the different types of rays
A ray can have up to as many as one to three leptons and there are different types of rays such as
Forward Ray Tracing which is used to follow the light particles (photons) from the light source to the object. Although forward ray tracing can most accurately determine the coloring of each object, it is highly inefficient. This is because many rays from the light source never come through the view plane and into the eye. Tracking every light ray from the light source down means that many rays will go to waste because they never contribute to the final image as seen from the eye. Forward ray tracing is also known as light ray tracing and photon tracing.
Backward Ray Tracing is used to make ray tracing more efficient, the method of backward ray tracing is introduced. In backward ray tracing, an eye ray is created at the eye; it passes through the view plane and on into the world. The first object the eye ray hits is the object that will be visible from that point of the view plane. After the ray tracer allows that light ray to bounce around, it figures out the exact coloring and shading of that point in the view plane and displays it on the corresponding pixel on the computer monitor screen. Backward ray tracing is also known as eye ray tracing. The downfall of backward ray tracing is that it assumes only the light rays that come through the view plane and on into the eye contribute to the final image of the scene. In certain cases, this assumption is flawed. For example, if a lens is held at a distance on top of a table, and is illuminated by a light source directly above, there will exist a focal point beneath the lens with a large concentration of light. If backward ray tracing tries to re-create this image, it will miscalculate because shooting light rays backward only confirms that rays traveled through the lens; backward rays have no way of recognizing that forward rays are bent when they go through the lens. Therefore, if only backward ray tracing is performed, there will only be an even patch of light beneath the lens, just as if the lens were a normal piece of glass and light is transmitted straight through it.
Hybrid Ray Tracing is used since both forward ray tracing and backward ray tracing have their drawbacks, recent research tries to develop hybrid solutions that will compromise speed and accuracy. In these hybrid solutions, only certain levels of forward ray tracing is performed. The algorithm records the data, then goes on to perform backward ray tracing. The final coloring of the scene takes both the backward ray tracing and the forward ray tracing calculations into account. Three major hybrid solutions have been proposed over the years.
Operators in C language
Operators One of the most important features of C is that it has a very rich set of built in operators including arithmetic, relational, logical, and bitwise operators. An operator can be any symbol like + - * / that specifies what operation need to be performed on the data. For ex: + indicates addition operation * indicates multiplication operation Operand VS Operator • An operand can be a constant or a variable. • An expression is a combination of operands and operators that reduces to a single value. For example: Consider the following expression: a+ b Here 'a' and 'b' are operand while 't' is an operator Operators & Expression are 1) Arithmetic Operators and Expressions 2) Assignment and Compound Assignment Operators 3) Increment and Decrement Operators 4) Relational Operators and Expressions 5) Logical Operators and Expressions 6) Bitwise Operators and Expressions Arithmetic Operators An arithmetic operator performs mathematical operators such
Comments
Post a Comment