BuildBBCoverPic

BuildBBCoverPic - / This builds the cover image for Chapter...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
// This builds the cover image for Chapter 3: Bare Bones Ray Tracing / void v World::build(void) { vp.set_hres(400); vp.set_vres(400); vp.set_pixel_size(0.5); v background_color = RGBColor(0.0); tracer_ptr = new MultipleObjects(this); t // colours / RGBColor yellow(1, 1, 0); // yellow RGBColor brown(0.71, 0.40, 0.16); // brown RGBColor dark_green(0.0, 0.41, 0.41); // dark_green RGBColor orange(1, 0.75, 0); // orange RGBColor green(0, 0.6, 0.3); // green RGBColor light_green(0.65, 1, 0.30); // light green RGBColor dark_yellow(0.61, 0.61, 0); // dark yellow RGBColor light_purple(0.65, 0.3, 1); // light purple RGBColor dark_purple(0.5, 0, 1); // dark purple / // spheres / Sphere* sphere_ptr1 = new Sphere(Point3D(5, 3, 0), 30); sphere_ptr1->set_color(yellow); // yellow add_object(sphere_ptr1); a Sphere* sphere_ptr2 = new Sphere(Point3D(45, -7, -60), 20); sphere_ptr2->set_color(brown); // brown add_object(sphere_ptr2); a Sphere* sphere_ptr3 = new Sphere(Point3D(40, 43, -100), 17); sphere_ptr3->set_color(dark_green); // dark green add_object(sphere_ptr3); a Sphere* sphere_ptr4 = new Sphere(Point3D(-20, 28, -15), 20); sphere_ptr4->set_color(orange); // orange add_object(sphere_ptr4); a Sphere* sphere_ptr5 = new Sphere(Point3D(-25, -7, -35), 27); s sphere_ptr5->set_color(green); // green add_object(sphere_ptr5); a
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sphere* sphere_ptr6 = new Sphere(Point3D(20, -27, -35), 25);
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2010 for the course CS 390 taught by Professor Hu during the Spring '10 term at Westminster UT.

Page1 / 4

BuildBBCoverPic - / This builds the cover image for Chapter...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online