3 Pages

tcu11_16_06ex

Course: MATH 1240, Spring 2010
School: Westminster UT
Rating:
 
 
 
 
 

Word Count: 1938

Document Preview

AWL/Thomas_ch16p1143-1228 8/27/04 7:26 4100 AM Page 1199 16.6 Parametrized Surfaces 1199 EXERCISES 16.6 Finding Parametrizations for Surfaces In Exercises 116, find a parametrization of the surface. (There are many correct ways to do these, so your answers may not be the same as those in the back of the book.) 4. Cone frustum The portion of the cone z = 2 2x 2 + y 2 between the planes z = 2 and z = 4 2. The...

Register Now

Unformatted Document Excerpt

Coursehero >> Utah >> Westminster UT >> MATH 1240

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
AWL/Thomas_ch16p1143-1228 8/27/04 7:26 4100 AM Page 1199 16.6 Parametrized Surfaces 1199 EXERCISES 16.6 Finding Parametrizations for Surfaces In Exercises 116, find a parametrization of the surface. (There are many correct ways to do these, so your answers may not be the same as those in the back of the book.) 4. Cone frustum The portion of the cone z = 2 2x 2 + y 2 between the planes z = 2 and z = 4 2. The paraboloid z = 9 - x 2 - y 2, z 0 6. Spherical cap The portion of the sphere x 2 + y 2 + z 2 = 4 in the first octant between the xy-plane and the cone z = 2x 2 + y 2 7. Spherical band between the planes z = 23> 2 and z = - 23> 2 The portion of the sphere x 2 + y 2 + z 2 = 3 3. Cone frustum The first-octant portion of the cone z = 2x 2 + y 2> 2 between the planes z = 0 and z = 3 1. The paraboloid z = x + y , z 4 2 2 many correct ways to set up the integrals, so your integrals may not be the same as those in the back of the book. They should have the same values, however.) 17. Titled plane inside cylinder The portion of the plane y + 2z = 2 inside the cylinder x 2 + y 2 = 1 18. Plane inside cylinder The portion of the plane z = - x inside the cylinder x 2 + y 2 = 4 19. Cone frustum The portion of the cone z = 2 2x 2 + y 2 between the planes z = 2 and z = 6 5. Spherical cap The cap cut from the sphere x 2 + y 2 + z 2 = 9 by the cone z = 2x 2 + y 2 20. Cone frustum The portion of the cone z = 2x 2 + y 2> 3 between the planes z = 1 and z = 4> 3 21. Circular cylinder band The portion of the cylinder x 2 + y 2 = 1 between the planes z = 1 and z = 4 by the cone z = 2x 2 + y 2 22. Circular cylinder band The portion of the cylinder x 2 + z 2 = 10 between the planes y = - 1 and y = 1 23. Parabolic cap The cap cut from the paraboloid z = 2 - x 2 - y 2 25. Sawed-off sphere The lower portion cut from the sphere x 2 + y 2 + z 2 = 2 by the cone z = 2x 2 + y 2 between the planes z = - 1 and z = 23 24. Parabolic band The portion of the paraboloid z = x 2 + y 2 between the planes z = 1 and z = 4 8. Spherical cap The upper portion cut from the sphere x 2 + y 2 + z 2 = 8 by the plane z = - 2 9. Parabolic cylinder between planes The surface cut from the parabolic cylinder z = 4 - y 2 by the planes x = 0, x = 2 , and z=0 10. Parabolic cylinder between planes The surface cut from the parabolic cylinder y = x 2 by the planes z = 0, z = 3 and y = 2 11. Circular cylinder band The portion of the cylinder y 2 + z 2 = 9 between the planes x = 0 and x = 3 12. Circular cylinder band The portion of the cylinder x 2 + z 2 = 4 above the xy-plane between the planes y = - 2 and y = 2 13. Tilted plane inside cylinder The portion of the plane x + y + z=1 a. Inside the cylinder x 2 + y 2 = 9 b. Inside the cylinder y 2 + z 2 = 9 14. Tilted plane inside cylinder x - y + 2z = 2 a. Inside the cylinder x 2 + z 2 = 3 b. Inside the cylinder y 2 + z 2 = 2 15. Circular cylinder band The portion of the cylinder s x - 2 d2 + z 2 = 4 between the planes y = 0 and y = 3 16. Circular cylinder band The portion of the cylinder y 2 + s z - 5 d2 = 25 between the planes x = 0 and x = 10 The portion of the plane 26. Spherical band The portion of the sphere x 2 + y 2 + z 2 = 4 Integrals Over Parametrized Surfaces In Exercises 2734, integrate the given function over the given surface. 27. Parabolic cylinder Gs x, y, z d = x, over the parabolic cylinder y = x 2, 0 x 2, 0 z 3 28. Circular cylinder Gs x, y, z d = z, over the cylindrical surface y 2 + z 2 = 4, z 0, 1 x 4 29. Sphere Gs x, y, z d = x 2, over the unit sphere x 2 + y 2 + z 2 = 1 30. Hemisphere Gs x, y, z d = z 2, over the hemisphere x 2 + y 2 + z 2 = a 2, z 0 31. Portion of plane Fs x, y, z d = z, over the portion of the plane x + y + z = 4 that lies above the square 0 x 1, 0 y 1, in the xy-plane 33. Parabolic dome Hs x, y, z d = x 2 25 - 4z, over the parabolic dome z = 1 - x 2 - y 2, z 0 32. Cone Fs x, y, z d = z - x, over the cone 0z1 z = 2x 2 + y 2, Areas of Parametrized Surfaces In Exercises 1726, use a parametrization to express the area of the surface as a double integral. Then evaluate the integral. (There are 34. Spherical cap Hs x, y, z d = yz, over the part of the sphere x 2 + y 2 + z 2 = 4 that lies above the cone z = 2x 2 + y 2 Copyright 2005 Pearson Education, Inc., publishing as Pearson Addison-Wesley 4100 AWL/Thomas_ch16p1143-1228 8/27/04 7:27 AM Page 1200 1200 Chapter 16: Integration in Vector Fields Flux Across Parametrized Surfaces In Exercises 3544, use a parametrization to find the flux 4S F # n ds across the surface in the given direction. 35. Parabolic cylinder F = z 2i + xj - 3zk outward (normal away from the x-axis) through the surface cut from the parabolic cylinder z = 4 - y 2 by the planes x = 0, x = 1 , and z = 0 36. Parabolic cylinder F = x 2j - xzk outward (normal away from the yz-plane) through the surface cut from the parabolic cylinder y = x 2, - 1 x 1 , by the planes z = 0 and z = 2 37. Sphere F = zk across the portion of the sphere x 2 + y 2 + z 2 = a 2 in the first octant in the direction away from the origin 38. Sphere F = xi + yj + zk across the sphere x + y + z = a in the direction away from the origin 2 2 2 2 49. Cone The cone rs r, u d = s r cos u di + r s sin u dj + rk, r 0, 0 u 2p at the point P0 A 22, 22, 2 B corresponding to s r, u d = s 2, p> 4 d 51. Circular cylinder The circular cylinder rs u, z d = s 3 sin 2u di + s 6 sin2 u dj + zk, 0 u p, at the point P0 A 3 23> 2, 9> 2, 0 B corresponding to s u, z d = s p> 3, 0 d (See Example 3.) 50. Hemisphere The hemisphere surface rs f, u d = s 4 sin f cos u di + s 4 sin f sin u dj + s 4 cos f dk, 0 f p> 2, 0 u 2p, at the point P0 A 22, 22, 2 23 B corresponding to s f, u d = s p> 6, p> 4 d 52. Parabolic cylinder The parabolic cylinder surface rs x, y d = xi + yj - x 2k, - q 6 x 6 q , - q 6 y 6 q , at the point P0s 1, 2, - 1 d corresponding to s x, y d = s 1, 2 d 39. Plane F = 2xyi + 2yzj + 2xzk upward across the portion of the plane x + y + z = 2a that lies above the square 0 x a, 0 y a , in the xy-plane 40. Cylinder F = xi + yj + zk outward through the portion of the cylinder x 2 + y 2 = 1 cut by the planes z = 0 and z = a 41. Cone F = xyi - zk outward (normal away from the z-axis) through the cone z = 2x 2 + y 2, 0 z 1 2 Further Examples of Parametrizations 53. a. A torus of revolution (doughnut) is obtained by rotating a circle C in the xz-plane about the z-axis in space. (See the accompanying figure.) If C has radius r 7 0 and center (R, 0, 0), show that a parametrization of the torus is rs u, y d = ss R + r cos u dcos y di + ss R + r cos u dsin y dj + s r sin u dk, where 0 u 2p and 0 y 2p are the angles in the figure. b. Show that the surface area of the torus is A = 4p2Rr. 43. Cone frustum F = - xi - yj + z 2k outward (normal away from the z-axis) through the portion of the cone z = 2x 2 + y 2 between the planes z = 1 and z = 2 44. Paraboloid F = 4xi + 4yj + 2k outward (normal way from the z-axis) through the surface cut from the bottom of the paraboloid z = x 2 + y 2 by the plane z = 1 42. Cone F = y i + xzj - k outward (normal away from the zaxis) through the cone z = 2 2x 2 + y 2, 0 z 2 z C Moments and Masses 45. Find the centroid of the portion of the sphere x 2 + y 2 + z 2 = a 2 that lies in the first octant. 46. Find the center of mass and the moment of inertia and radius of gyration about the z-axis of a thin shell of constant density d cut from the cone x 2 + y 2 - z 2 = 0 by the planes z = 1 and z = 2. 47. Find the moment of inertia about the z-axis of a thin spherical shell x 2 + y 2 + z 2 = a 2 of constant density d. 0 R r u x 48. Find the moment of inertia about the z-axis of a thin conical shell z = 2x 2 + y 2, 0 z 1, of constant density d. z Planes Tangent to Parametrized Surfaces The tangent plane at a point P0s s u0 , y0 d, gs u0 , y0 d, hs u0 , y0 dd on a parametrized surface rs u, y d = s u, y di + gs u, y dj + hs u, y dk is the plane through P0 normal to the vector rus u0 , y0 d * rys u0 , y0 d, the cross product of the tangent vectors rus u0 , y0 d and rys u0 , y0 d at P0. In Exercises 4952, find an equation for the plane tangent to the surface at P0. Then find a Cartesian equation for the surface and sketch the surface and tangent plane together. y r(u, y) x u y Copyright 2005 Pearson Education, Inc., publishing as Pearson Addison-Wesley 4100 AWL/Thomas_ch16p1143-1228 8/27/04 7:27 AM Page 1201 16.6 Parametrized Surfaces 54. Parametrization of a surface of revolution Suppose that the parametrized curve C: ((u), g(u)) is revolved about the x-axis, where gs u d 7 0 for a u b . a. Show that rs u, y d = s u di + s gs u dcos y dj + s gs u dsin y dk is a parametrization of the resulting surface of revolution, where 0 y 2p is the angle from the xy-plane to the point r(u, y) on the surface. (See the accompanying figure.) Notice that (u) measures distance along the axis of revolution and g(u) measures distance from the axis of revolution. y 1201 b. Find a parametrization for the surface obtained by revolving the curve x = y 2, y 0 , about the x-axis. 55. a. Parametrization of an ellipsoid Recall the parametrization x = a cos u, y = b sin u, 0 u 2p for the ellipse s x2> a2 d + s y2> b2 d = 1 (Section 3.5, Example 13). Using the angles u and f in spherical coordinates, show that rs u, f d = s a cos u cos f di + s b sin u cos f dj + s c sin f dk is a parametrization of the ellipsoid s x 2> a 2 d + s y 2> b 2 d + s z 2> c 2 d = 1. b. Write an integral for the surface area of the ellipsoid, but do not evaluate the integral. 56. Hyperboloid of one sheet a. Find a parametrization for the hyperboloid of one sheet x 2 + y 2 - z 2 = 1 in terms of the angle u associated with the circle x 2 + y 2 = r 2 and the hyperbolic parameter u associated with the hyperbolic function r 2 - z 2 = 1. (See Section 7.8, Exercise 84.) b. Generalize the result in part (a) to the hyperboloid s x2> a2 d + s y2> b2 d - s z2> c2 d = 1. ( f (u), g(u), 0) r (u, y) C y g(u) z f (u) x 57. (Continuation of Exercise 56.) Find a Cartesian equation for the plane tangent to the hyperboloid x 2 + y 2 - z 2 = 25 at the point s x0 , y0 , 0 d, where x02 + y02 = 25. 58. Hyperboloid of two sheets Find a parametrization of the hyperboloid of two sheets s z2> c2 d - s x2> a2 d - s y2> b2 d = 1. Copyright 2005 Pearson Education, Inc., publishing as Pearson Addison-Wesley
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Westminster UT - MATH - 1240
4100 AWL/Thomas_ch16p1143-12288/27/047:27 AMPage 120116.7 Stokes Theorem120116.7Curl FStokes TheoremAs we saw in Section 16.4, the circulation density or curl component of a two-dimensional field F = Mi + Nj at a point (x, y) is described by the
Westminster UT - MATH - 1240
4100 AWL/Thomas_ch16p1143-1228 9/17/04 1:50 PM Page 120916.7 Stokes Theorem1209EXERCISES 16.7Using Stokes Theorem to Calculate CirculationIn Exercises 16, use the surface integral in Stokes Theorem to calculate the circulation of the field F around t
Westminster UT - MATH - 1240
4100 AWL/Thomas_ch16p1143-12288/27/047:27 AMPage 121116.8 The Divergence Theorem and a Unified Theory121116.8The Divergence Theorem and a Unified TheoryThe divergence form of Greens Theorem in the plane states that the net outward flux of a vector
Westminster UT - MATH - 1240
4100 AWL/Thomas_ch16p1143-12288/27/047:27 AMPage 12201220Chapter 16: Integration in Vector FieldsEXERCISES 16.8Calculating DivergenceIn Exercises 14, find the divergence of the field. 1. The spin field in Figure 16.14. 2. The radial field in Figur
Westminster UT - MATH - 1240
4100 AWL/Thomas_ch16p1143-12288/27/047:27 AMPage 12261226Chapter 16: Integration in Vector FieldsChapter 16Additional and Advanced Exercises3. The eight curve x = s 1> 2 d sin 2t, y = sin t, 0 t p (one loop)y 1Finding Areas with Greens TheoremU
Westminster UT - MATH - 1240
4100 AWL/Thomas_ch16p1143-12288/27/047:27 AMPage 1223Chapter 16 Practice Exercises1223Chapter 16Practice ExercisesEvaluating Line Integrals1. The accompanying figure shows two polygonal paths in space joining the origin to the point (1, 1, 1). In
Westminster UT - MATH - 1240
4100 AWL/Thomas_ch16p1143-12288/27/047:27 AMPage 12221222Chapter 16: Integration in Vector FieldsChapter 16Questions to Guide Your Review8. What is a potential function? Show by example how to find a potential function for a conservative field. 9.
Westminster UT - MATH - 1240
4100 AWL/Thomas_ch16p1143-12288/27/047:27 AMPage 12281228Chapter 16: Integration in Vector FieldsChapter 16Technology Application ProjectsMathematica / Maple ModuleWork in Conservative and Nonconservative Force Fields Explore integration over vec
Westminster UT - MATH - 1240
Chapter1515.1FIRST-ORDER DIFFERENTIAL EQUATIONSOVERVIEW In Section 4.8 we introduced differential equations of the form dy>dx = (x), where is given and y is an unknown function of x. When is continuous over some interval, we found the general solution
Westminster UT - MATH - 1240
4100AWL/Thomas_APPp001-0348/27/046:49 AMPage 1APPENDICESA.1Mathematical InductionMany formulas, like ns n + 1 d 1+2+n= , 2 can be shown to hold for every positive integer n by applying an axiom called the mathematical induction principle. A proof t
Westminster UT - MATH - 1240
4100AWL/Thomas_APPp001-0348/27/046:49 AMPage 4AP-4AppendicesA.2Proofs of Limit TheoremsThis appendix proves Theorem 1, Parts 25, and Theorem 4 from Section 2.2.THEOREM 1 Limit Laws If L, M, c, and k are real numbers andx:clim s x d = Landx:c
Westminster UT - MATH - 1240
4100AWL/Thomas_APPp001-0348/27/046:49 AMPage 7A.3 Commonly Occurring LimitsAP-7A.3Commonly Occurring LimitsThis appendix verifies limits (4)(6) in Theorem 5 of Section 11.1. Limit 4: If x 6 1, lim x n = 0 We need to show that to each P 7 0 there c
Westminster UT - MATH - 1240
4100AWL/Thomas_APPp001-0348/27/046:50 AMPage 9A.4 Theory of the Real NumbersAP-9A.4Theory of the Real NumbersA rigorous development of calculus is based on properties of the real numbers. Many results about functions, derivatives, and integrals wo
Westminster UT - MATH - 1240
4100AWL/Thomas_APPp001-0348/27/046:50 AMPage 12AP-12AppendicesA.5Complex NumbersComplex numbers are expressions of the form a + ib , where a and b are real numbers and i is a symbol for 1 - 1 . Unfortunately, the words real and imaginary have conn
Westminster UT - MATH - 1240
4100AWL/Thomas_APPp001-0348/27/046:50 AMPage 22AP-22AppendicesA.6The Distributive Law for Vector Cross ProductsIn this appendix, we prove the Distributive Law u * sv + wd = u * v + u * w which is Property 2 in Section 12.4. Proof To derive the Dis
Westminster UT - MATH - 1240
4100AWL/Thomas_APPp001-0348/27/046:50 AMPage 23A.7 The Mixed Derivative Theorem and the Increment TheoremAP-23A.7The Mixed Derivative Theorem and the Increment TheoremThis appendix derives the Mixed Derivative Theorem (Theorem 2, Section 14.3) and
Westminster UT - MATH - 1240
4100AWL/Thomas_APPp001-0348/27/046:50 AMPage 28AP-28AppendicesA.8P u QThe Area of a Parallelograms Projection on a PlaneThis appendix proves the result needed in Section 16.5 that s u * v d # p is the area of the projection of the parallelogram w
Westminster UT - MATH - 1240
4100AWL/Thomas_APPp001-0348/27/046:50 AMPage 29A.9 Basic Algebra, Geometry, and Trigonometry FormulasAP-29A.9Basic Algebra, Geometry, and Trigonometry FormulasAlgebraArithmetic Operations as b + c d = ab + ac, a c ad + bc += , b d bd Laws of Sign
Westminster UT - CS - 390
/ / / /import import import import import import importjavax.swing.*; java.awt.*; javax.imageio.ImageIO; java.awt.image.*; java.awt.event.*; java.io.*; raytracer.world.World;public class RayTracerGUI extends JPanel implements Runnable cfw_ private priv
Westminster UT - CS - 390
package raytracer.cameras; import raytracer.utility.Point2D; import raytracer.utility.Point3D; import raytracer.utility.RGBColor; import raytracer.utility.Ray; import raytracer.utility.Vector3D; import raytracer.world.ViewPlane; import raytracer.world.Wor
Westminster UT - CS - 390
package raytracer.cameras; import raytracer.utility.*; import raytracer.world.*; public class Pinhole extends Camera cfw_ private float private float d; / view plane distance zoom; / zoom factor/ -default constructor public Pinhole()cfw_ super(); d = 500
Westminster UT - CS - 390
package raytracer.geometricObjects; import raytracer.utility.*; import import import import import import java.util.Vector; java.io.BufferedReader; java.io.FileNotFoundException; java.io.FileReader; java.util.Scanner; java.util.Random;public class Compou
Westminster UT - CS - 390
package raytracer.geometricObjects; import raytracer.utility.*; public class FlatMeshTriangle extends MeshTriangle cfw_ / -constructor public FlatMeshTriangle() cfw_ super(); / -constructor public FlatMeshTriangle (Mesh mesh_ptr, int i0, int i1, int i2)
Westminster UT - CS - 390
package raytracer.geometricObjects; import raytracer.utility.RGBColor; import raytracer.utility.Ray; import raytracer.utility.ShadeRec; /* this file contains the definition of the class GeometricObject * */ public abstract class GeometricObject cfw_ prote
Westminster UT - CS - 390
package raytracer.geometricObjects; import raytracer.utility.*; / / / / Copyright (C) Kevin Suffern 2000-2007. This C+ code is for non-commercial purposes only. This C+ code is licensed under the GNU General Public License Version 2. See the file COPYING.
Westminster UT - CS - 390
package raytracer.geometricObjects; import raytracer.utility.*; public class Plane extends GeometricObject cfw_ private Point3D a; private Normal n; rays / point through which plane passes / normal to the plane / for shadows and secondaryprivate static f
Westminster UT - CS - 390
package raytracer.geometricObjects; import raytracer.utility.*; public class Sphere extends GeometricObject cfw_ private Point3D center; / center coordinates as a point private double radius; / the radius private static final double kEpsilon = 0.001; / fo
Westminster UT - CS - 390
package raytracer.geometricObjects; import raytracer.utility.*; /this is the triangle discussed in Section 19.3 public class Triangle extends GeometricObject cfw_ private Point3D v0, v1, v2; private Normal normal; / -constructor public Triangle()cfw_ supe
Westminster UT - CS - 390
package raytracer.tracers; import raytracer.utility.*; import raytracer.world.World; public class MultipleObjects extends Tracer cfw_ / -default constructor public MultipleObjects() cfw_ super(); / -constructor public MultipleObjects(World world) cfw_ su
Westminster UT - CS - 390
package raytracer.tracers; import raytracer.utility.*; import raytracer.world.World; public class SingleSphere extends Tracer cfw_ / -default constructor public SingleSphere() cfw_ super(); / -constructor public SingleSphere(World world)cfw_ super(world)
Westminster UT - CS - 390
package raytracer.tracers; import raytracer.utility.Ray; import raytracer.utility.RGBColor; import raytracer.world.World; /This is the declaration of the base class Tracer /The tracer classes have no copy constructor, assignment operator. or clone functio
Westminster UT - CS - 390
package raytracer.utility; public class public public public public Constants cfw_ static final static final static final static final double double double double TWO_PI PI_ON_180 invPI invTWO_PI = = = = Math.PI*2.; Math.PI/180.; 1./Math.PI; 0.5*Math.PI;
Westminster UT - CS - 390
package raytracer.utility; /* * this file contains the declaration of the class Matrix * Matrix is a 4 x 4 square matrix that is used to represent affine transformations * we don't need a general m x n matrix * */ public class Matrix cfw_ public double[][
Westminster UT - CS - 390
package raytracer.utility; import java.util.Vector; import raytracer.geometricObjects.MeshTriangle; /* * / / / /Copyright (C) Kevin Suffern 2000-2007. This C+ code is for non-commercial purposes only. This C+ code is licensed under the GNU General Public
Westminster UT - CS - 390
package raytracer.utility; public class Normal cfw_ public double x, y, z;/ - default constructor public Normal() cfw_ x = y = z = 0; / - constructor public Normal(double a) cfw_ x = y = z = a; / - constructor public Normal(double a, double b, double c
Westminster UT - CS - 390
package raytracer.utility; /2D points are used to store sample points public class Point2D cfw_ public float x, y; / - default constructor public Point2D() cfw_ x = 0.f; y = 0.f; / - constructor public Point2D(float arg)cfw_ x = arg; y = arg; / - constr
Westminster UT - CS - 390
package raytracer.utility; public class Point3D cfw_ public double x, y, z; / - default constructor public Point3D()cfw_ x = y = z = 0; / - constructor public Point3D(double a)cfw_ x = y = z = a; / - constructor public Point3D(double a, double b, double
Westminster UT - CS - 390
package raytracer.utility; public class Ray cfw_ public Point3D public Vector3D o; d; / origin / direction/ - default constructor public Ray () cfw_ o = new Point3D(0.0); d = new Vector3D(0.0, 0.0, 1.0); / -constructor public Ray (Point3D origin, Vector
Westminster UT - CS - 390
package raytracer.utility; public class public public public public RGBColor cfw_ float r, g, b; static final RGBColor black = new RGBColor(0f); static final RGBColor white = new RGBColor(1f); static final RGBColor red = new RGBColor(1.0f, 0.0f, 0.0f);/
Westminster UT - CS - 390
package raytracer.utility; import raytracer.world.World; /There is no default constructor as the World reference has to be initialised /There is also no assignment operator as we don't want to assign the world anywhere /The copy constructor only copies th
Westminster UT - CS - 390
package raytracer.utility; public class Vector3D cfw_ public double x, y, z; / - default constructor public Vector3D() cfw_ x = y = z = 0.0; / - constructor public Vector3D(double a) cfw_ x = y = z = a; / - constructor public Vector3D(double a, double b
Westminster UT - CS - 390
package raytracer.world; /import raytracer.utility.Normal; public class ViewPlane cfw_ public int image resolution public int resolution public float size public int samples per pixel public float correction factor public float the gamma correction factor
Westminster UT - CS - 390
package raytracer.world; import raytracer.utility.*; import raytracer.geometricObjects.*; import raytracer.tracers.*; import raytracer.cameras.Camera; import raytracer.cameras.Pinhole; import java.util.Vector; import java.awt.*; /This file contains the de
Westminster UT - CS - 390
/ This file contains the definition the ViewPlane class # #include "ViewPlane.h" / - default constructor V ViewPlane:ViewPlane(void) : hres(400), vres(400), s(1.0), gamma(1.0), inv_gamma(1.0), show_out_of_gamut(false) cfw_ cfw_ / - copy constructor ViewPl
Westminster UT - CS - 390
#ifndef _VIEW_PLANE_ # #define _VIEW_PLANE_ /- class ViewPlane class ViewPlane cfw_ public: int image resolution int resolution float size float correction factor float the gamma correction factor bool RGBColor out of gamuthres; vres; s; gamma; inv_gamma
Westminster UT - CS - 390
/ this file contains the definition of the World class # #include "wxraytracer.h" #include "World.h" # #include "Constants.h" / / geometric objects #include "Plane.h" # #include "Sphere.h" / / tracers #include "SingleSphere.h" # #include "MultipleObjects.
Westminster UT - CS - 390
#ifndef _WORLD_ # #define _WORLD_ / This file contains the declaration of the class World / The World class does not have a copy constructor or an assignment operator, for the followign reasons: / 1 There's no need to copy construct or assign the World /
Westminster UT - CS - 390
#ifndef _CONSTANTS_ # #define _CONSTANTS_ #include <stdlib.h> # #include "RGBColor.h" const const const const const double double double double double PI TWO_PI PI_ON_180 invPI invTWO_PI kEpsilon kHugeValue = 3.1415926535897932384; = 6.2831853071795864769
Westminster UT - CS - 390
#ifndef _MATHS_ # #define _MATHS_ inline double m max(double x0, double x1); inline double max(double x0, double x1) cfw_ return(x0 > x1) ? x0 : x1); #endif
Westminster UT - CS - 390
/ This file contains the definition of the class Matrix # #include "Matrix.h" / - default constructor / / a default matrix is an identity matrix M Matrix:Matrix(void) cfw_ for (int x = 0; x < 4; x+) for (int y = 0; y < 4; y+) cfw_ if (x = y) m[x][y] = 1.0
Westminster UT - CS - 390
#ifndef _MATRIX_ # #define _MATRIX_ / this file contains the declaration of the class Matrix / Matrix is a 4 x 4 square matrix that is used to represent affine transformations / / we don't need a general m x n matrix / /- class Matrix c class Matrix cfw_
Westminster UT - CS - 390
/ This file contains the defintion of the class Normal # #include <math.h> # #include "Normal.h" / / - default constructor Normal:Normal(void) : x(0.0), y(0.0), z(0.0) cfw_ / / - constructor Normal:Normal(double a) : x(a), y(a), z(a) cfw_ / / - constructo
Westminster UT - CS - 390
#ifndef _NORMAL_ # #define _NORMAL_ / / This file contains the declaration of the class Normal #include "Matrix.h" #include "Vector3D.h" # #include "Point3D.h" class Normal cfw_ p public: double p public: Normal(void); / default constructor Normal(double
Westminster UT - CS - 390
/ this file contains the definition of the class Point3D #include <math.h> # #include "Point3D.h" / / - default constructor Point3D:Point3D() :x(0), y(0), z(0) cfw_ cfw_ / / - constructor Point3D:Point3D(const double a) :x(a), y(a), z(a) cfw_ cfw_ / / - c
Westminster UT - CS - 390
#ifndef _POINT3D_ # #define _POINT3D_ / / This file contains the defintion of the class Point3D #include "Matrix.h" # #include "Vector3D.h" class Point3D cfw_ p public: d double x, y, z; Point3D(); / default constructor Point3D(const double a); / construc
Westminster UT - CS - 390
#include "Ray.h" / - default constructor Ray:Ray (void) : o(0.0), d(0.0, 0.0, 1.0) cfw_ / / - constructor Ray:Ray (const Point3D& origin, const Vector3D& dir) : o(origin), d(dir) cfw_ / - copy constructor Ray:Ray (const Ray& ray) : o(ray.o), d(ray.d) cfw_
Westminster UT - CS - 390
#ifndef _RAY_ # #define _RAY_ #include "Point3D.h" # #include "Vector3D.h" class Ray cfw_ p public: Point3D Vector3D R Ray(void); R Ray(const Point3D& origin, const Vector3D& dir); R Ray(const Ray& ray); R Ray& operator= (const Ray& rhs); ~Ray(void); ; #
Westminster UT - CS - 390
/ This file contains the definition of the class RGBColor # #include <math.h> # #include "RGBColor.h" / / - default constructor RGBColor:RGBColor(void) : r(0.0), g(0.0), b(0.0) cfw_ cfw_ / / - constructor RGBColor:RGBColor(float c) : r(c), g(c), b(c) cfw_
Westminster UT - CS - 390
#ifndef _RGB_COLOR_ # #define _RGB_COLOR_ / / This file contains the declaration of the class RGBColor / /- class RGBColor c class RGBColor cfw_ p public: float r, g, b; r p public: RGBColor(void); / default constructor RGBColor(float c); / constructor RG
Westminster UT - CS - 390
/ this file contains the definition of the class ShadeRec / there is no default constructor as the World reference always has to be initialised / there is also no assignment operator as we don't want to assign the world / the copy constructor only copies
Westminster UT - CS - 390
#ifndef _SHADE_REC_ # #define _SHADE_REC_ / / this file contains the declaration of the class ShadeRec class World; is a reference / only need a forward class declaration as the World data member#include "Point3D.h" #include "Normal.h" # #include "RGBCol