Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
ANU - College of Engineering and Computer Science - SoCS - COMP4610
| |
ANU College of Engineering and Computer Science School of Computer Science

. Make a new directory and copy the code into is directory. Compile and run it (java *.java; java RayTracer). The frames are ray caste into a sequence of images, once this is done the sequence is animated.

Read over all the code and attempt to understand what each line does (don't worry too much about 'ballpos' or 'makeScene' in 'RayTracer.java'). You may be asked questions about this when your lab is marked.

Modify the 'raytrace' method in 'Scene.java' such that it's illumination model includes both diffuse and specular reflection. This may be from a single light source. You should adjust lighting parameters such that both the diffuse and specular effects are viewable. Make a note of the formula you used for your illumination model.

Note, you do not need to trace rays to the light sources in this part of the lab. Hence you should not see shadows.

Step 2 (1 mark)

Trace the rays to the light source, this should effect your illumination model and create shadows.

Add two large mirror spheres to the scene. Let these mirrors act as perfect reflectors. Enable rays to reflect off these mirrors a number of times.

Step 3 (1 mark)

Complete one aspect from the following:
  • add a checkerboard pattern floor and a blue sky. You should be able to see shadows on the floor. Also the blue of the sky should change as the angle from the horizon changes.
  • add anti-aliasing - make some comments about the difference this makes.
  • add photon mapping and turn the juggling balls into glass. Set up the scene such that caustics and diffuse inter-reflection are evident.
| | |

本站部分内容来自互联网,仅供学习和参考