Starting from:

$30

COEN148 - HW3 - Solved

Ray Casting 



In this assignment, you will implement ray casting algorithm.


Follow the lecture content,  write a program to generate the ray casting result.  

The objects in the scene are spheres.  You need to define in your program:


the light source intensity (R, G, B), 
light source location (Lx, Ly, Lz), 
eye location (Ex, Ey, Ez), 
at least 2 spheres, 
location/radius of spheres, 


surface property (K value in the lighting model),  view plane size/location/orientation (perpendicular to  one axis) 

Your result should be showing 2 shaded spheres (or more),  with one sphere casting a shadow on the other

( after your program works, just change the sphere location or light location to get shadow)  

  

ground plane is optional.  Reflection and refraction are optional.   

  

A diagram image is provided for your reference.

  

Write comment to explain your code.

  


 

 

More products