You are on page 1of 9

,,__ .

r- § 1t1u[ (dly (odf (C (Q, int1t (e: int1t


lB', (e:y(o, inudl § y ll1l,cilb11u[§

-presented by Shantik Bhalerao


KEY TOPICS DISCUSSED IN
THIS PRESENTATION

• Ray Casting Algorithm for


hidden surfaces
co,N TENTS • Rotation about an arbitrary axis
in plane
• Reflection through an arbitrary
plane
RAY CASTING ALGORITHM

R..ty t,i'>flrl~ 1\ ..t rt>nder1r1i,:: tt>(hrnque U\t>d ,n (umputt>' ►:r.-tl)t)1(\ Y'.d


lUr11µutJl1ur1JI geometr\l It 1> LJµJI.Jle of UeJ~rn~ J ~'Hee-d1111t:r'>1vnJ '
pcr~pcctive ,n .J two d1mc_,n~1on.1I rriJp Rdy Lht,ng m.1kes U'>C' o' the>
.;.,1mp g<'Omf'tr 1c ,1lgor1-:rim as r,1y tracing

R.1y c,1c;,t1ng 1•, thf' moc;,t b,1c;,1c of m.iny romps,tf'r gr.iph,c,, r,~..,cf'r1ng
.1 l gnrithm; th<lt \J'iP thf' el:'nrnPrr1r .1li:;orithm 0i rav t•.1c1np, Rel)
tr rte mv, -hrt\••rl rPndPr1np, dl~or1thm\ npPr11tf• in 1mar:•• t;rc1Pr to r~,,•d,r,•
three J1rt1l'fl',IUfl,1I '>ll'r1l''.. tu twu ll•tnl'fc',IUrlJI ,n:.i)-'.l")

AIJ.;:ur1thm

Crectte a Virtual screen

2. Generate a Ray from the eye point through each point 0"1 :~e
screen.

Cornµute .it wh.it µumt <..H ~.HJ.,,1t:un of tht• • ,rtu,11 ·,uet.•11. l'd1..t, 'd',
t11!', Ill tht· \lfl'l'fl

1
1 Color l he µ1:..t.'I with Jµµr,.Jµr1Jtt: LtJIO'
ROTATION ABOUT AN ARBITRARY AXIS IN PLANE

• When the obJect is rotated about an axis that is not

Yaxis Then add1 t 1onal transformations are required. First


of all, alignment is needed, and then the object is
being back to the original position. Following steps
are required

1. Translate the objec t to the origin

,o·gtion obl«i Y IIXls doc:kwiM 2. Rotate object so that axis of object coincide wit h
any of coordinate axis.

3. Perform rotation about co -ordinate axis wit h


whom coinciding is done.

4. Apply inverse rotat ion to bring rotation back to


the original position.

/Ill/
EXA.\lf.PLE OF ROTATION Of Al\J OBJECT ABOUT AN ARBITRARY
A)OS lN A PLANE
0 0
0 cos8 -sln8
0 slnB cose
0 0 0

-sin8 0
MATRIX FOR REPRESENTING
sin8 cose O 0
THREE=DIMENSIONAL ROTATIONS
ABOUT THE X A_XIS, Y A_XIS AND 0 0 1 0
0 0 0
Z AXIS
Example of reflection about an arbitrary axis in plane

• The basic idea is to make the


arbitrary reflection plane
coincide with one of the
coordinate planes. Assuming an
arbitrary plane in space is given
by three points PO (xO,yO,zO), ...
Translate the reflection plane to
the origin of the coordinate
system with the help of known
PO (xO, yO,zO) point.
• Different from "existing"
algorithms (ray casting) .
• More efficient (sometimes).

CONCLUSION • Easy to make parallel.


• Finding intersection points
between rays and objects.
• Pixel color computation:
Lambertian model reminder.

Ill//

You might also like