povray_tutorial1 - POV-Ray tutorial 20th June 2003 The...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
POV-Ray tutorial 20th June 2003 The beginning tutorial explains step by step how to use POV-Ray’s scene de- scription language to create your own scenes. The use of almost every feature of POV- Ray’s language is explained in detail. We will learn basic things like placing cameras and light sources. We will also learn how to create a large variety of objects and how to assign different textures to them. Here is presented only the beginning of the whole ”Beginning tutorial”. This should be well enought to make your computer graphics assignment. For full tutorial and also for other documentation please refer the official POV-Ray site at http://www.povray.org. 1 1 You know you have been raytracing too long when . . . You actually read all the documentation that comes with programs. – AmaltheaJ5 1
Image of page 1

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

View Full Document Right Arrow Icon
Contents 1 Our First Image 3 1.1 Understanding POV-Ray’s Coordinate System . . . . . . . . . . 3 1.2 Adding Standard Include Files . . . . . . . . . . . . . . . . . . . 4 1.3 Adding a Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Describing an Object . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.5 Adding Texture to an Object . . . . . . . . . . . . . . . . . . . . 6 1.6 Defining a Light Source . . . . . . . . . . . . . . . . . . . . . . . 7 2 Basic Shapes 8 2.1 Box Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 Cone Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Cylinder Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.4 Plane Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.5 Torus Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3 CSG objects 18 3.1 What is CSG? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.2 CSG Union . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.3 CSG Intersection . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.4 CSG Difference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.5 CSG Merge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.6 CSG Pitfalls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.6.1 Co-incident Surfaces . . . . . . . . . . . . . . . . . . . . . 23 2
Image of page 2
1 Our First Image We will create the scene file for a simple picture. Since ray-tracers thrive on spheres, that is what we will render first. 2 1.1 Understanding POV-Ray’s Coordinate System First, we have to tell POV-Ray where our camera is and where it is looking. To do this, we use 3D coordinates. The usual coordinate system for POV-Ray has the positive y -axis pointing up, the positive x -axis pointing to the right, and the positive z -axis pointing into the screen as shown in the figure 1 : Figure 1: The left-handed coordinate system This kind of coordinate system is called a left-handed coordinate system. If we use our left hand’s fingers we can easily see why it is called left-handed. We just point our thumb in the direction of the positive x -axis (to the right), the index finger in the direction of the positive y -axis (straight up) and the middle finger in the positive z -axis direction (forward). We can only do this with our left hand. If we had used our right hand we would not have been able to point the middle finger in the correct direction. The left hand can also be used to determine rotation directions. To do this we must perform the famous ” Computer Graphics Aerobics ” exercise. We hold 2 You know you have been raytracing too long when. . . You have gone full circle and find your self writing a scene that contains only a shiny sphere hovering over a green and yellow checkered plane ... – Ken Tyler 3
Image of page 3

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

View Full Document Right Arrow Icon
Figure 2: ”Computer graphics aerobics” up our left hand and point our thumb in the positive direction of the axis of rotation. Our fingers will curl in the positive direction of rotation. Similarly if we point our thumb in the negative direction of the axis our fingers will curl in the negative direction of rotation.
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern