|
|
In order to graduate, everyone at my university must take a basic comp class.
Well, we just got to the pov ray section for the computer class and I am
completely lost. I've managed to finish most of the assignment. But totally
trippin at the end. Any help would be greatly appreciated! I'll post down my
assignment and then the pov ray stuff I've done, and hopefully somebody can tell
me what I'm doing wrong. Thanks!
8. Click the New button, and then save the Untitled file as
Firstname_Lastname_3_spheres.pov in your Intro_to_3D_Computer_Graphics Folder.
9. Insert the Checkered Floor object by selecting Insert Scene
Templates Checkered Floor. This povray code illustrates many new
ideas, such as a camera.
10. Verify that the picture size is [1024x768, AA 0.3], and press the Run
button. A picture of a sphere on a checkered floor appears.
11. The camera is the viewpoint of the scene. Change the camera location by
changing the associated location text in the angle brackets (< >) and press the
Run button again. If you can no longer see the ball and the checkered floor,
change the location again until you can.
12. The plane object text is used to describe the checkered floor. The wavy
appearance towards the top of the floor, sometimes called aliasing, is caused by
the repeated checkerboard pattern. Anti-aliasing is the removal of jagged edges
by coloring the neighborhood of each pixel. Increase the scale of the plane to
a number larger than 0.5 and run the file. This will increase the size of the
squares on the floor and somewhat reduce the wavy appearance.
13. The sphere object text (not sky_sphere) is located at the bottom of the text
file. The number 0.0 just underneath the word sphere is short hand for <0, 0,
0> and indicates the position of the sphere. Change the 0.0 text to <0, 0, 0>
and run the file to verify that you did not make a mistake in your typing. The
same picture should display.
14. Select all the text from the word sphere (not sky_sphere) upto and including
bottom of the file. There are now 3 areas of text labeled sphere in your file.
15. Change the position of each sphere from <0,0,0> to a different position, and
run the file again. If there are less than 3 spheres in the picture, make
smaller number adjustments until all 3 spheres are visible when you press the
Run button. You should have a picture somewhat similar to the one below.
16. Press the New button on the Povray toolbar to create a new document. Save
this new document as Firstname_Lastname_interesting.pov. Using the skills you
have learned, create an interesting image of your own composition. You can
change color, insert shapes from some of the other povray files that came with
this assignment, change size, etc.
17. Everytime you press the Run button, the picture that displays is
automatically saved in bmp (picture) format with the same name as the .pov file.
For example, the picture for Firstname_Lastname_3_spheres.pov has been saved as
Firstname_Lastname_3_spheres.bmp in the Povray folder. Submit the following
files through eLearning for grading.
a. Firstname_Lastname_3_spheres.bmp
b. Firstname_Lastname_interesting.bmp
I get all the way to step fifteen. But I can't get the spheres in different
spots. The professor wants one sphere in front of the other two. The two in back
are side by side with about and inch or so between them. But most of the time
all I get is one sphere and the other two jut out of it. I've tried many
variations. Guess I'm just not getting it.
Here's the stuff I've got on my pov ray.
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3.6
// Desc: Checkered Floor Example
// Date: mm/dd/yy
// Auth: ?
//
#version 3.6;
#include "colors.inc"
global_settings {
assumed_gamma 1.0
max_trace_level 5
}
// ----------------------------------------
camera {
location <1.00, 0.00, -4.0>
direction 1.5*z
right x*image_width/image_height
look_at <0.0, 0.0, 0.0>
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.7 rgb <0.0,0.1,0.8>]
}
}
}
light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
plane { // checkered floor
y, -1
texture
{
pigment {
checker
color rgb 1
color blue 1
scale 1.5
}
finish{
diffuse 0.8
ambient 0.1
}
}
}
sphere { // reflective sphere
<3.0,3.0,3.02> 1
texture {
pigment {
color rgb <0.8,0.8,1.0>
}
finish{
diffuse 0.3
ambient 0.0
specular 0.6
reflection {
0.8
metallic
}
conserve_energy
}
}
}
sphere { // reflective sphere
<0,0,0> 1
texture {
pigment {
color rgb <0.8,0.8,1.0>
}
finish{
diffuse 0.3
ambient 0.0
specular 0.6
reflection {
0.8
metallic
}
conserve_energy
}
}
}
sphere { // reflective sphere
<2.0,2.0,2.0> 1
texture {
pigment {
color rgb <0.8,0.8,1.0>
}
finish{
diffuse 0.3
ambient 0.0
specular 0.6
reflection {
0.8
metallic
}
conserve_energy
}
}
}
Can someone please tell me what to change the sphere numbers to?
Post a reply to this message
|
|
|
|
"Holly" <hol### [at] msncom> wrote:
....
> 15. Change the position of each sphere from <0,0,0> to a different position,
....
> sphere { // reflective sphere
> <3.0,3.0,3.02> 1
....
The numbers for the sphere do not need to be the same.
You can use:
sphere { // reflective sphere
<-2,0,3> 1
for example. This should still be visable in the picture.
Stephen S
Post a reply to this message
|
|