How do I use POV-Ray

Thanks Aaglo, that's exactly what I was looking for! Okay, I'll make the edits that I can, and it should be what I want.

EDIT: Um, it pulls out the

Code:
rotate y*yrot     // Equivalent to "rotate <0,20,0>"

line. What is wrong with this:

Code:
  #include "colors.inc" 
  #include "stones.inc"
  background { color Magenta }
  camera {orthographic location <0,66,-124>*0.1
angle 27
look_at <0,4,0>*0.1 }
#declare yrot = -130  ;            //0,-48,-90,-132,180,132,90,48
sphere {<0,0,0> //location of the center
1 //radius
scale <1,0.5,1> //scaling in x, y and z-direction
clipped_by{
box{<-2,-2,-2> //first corner
<2,0,2> //the other corner
}//end of box
}//end of clipped_by
pigment {Yellow}
}//end of sphere
    rotate y*yrot     // Equivalent to "rotate <0,20,0>" 
    }                                   
  light_source { <2, 4, -3> color White}
 
1#
That [rotate y*yrot] should be before the }//end of sphere -line

2#
you have one } too many (the one before the light_source)

3#
rotating a sphere (scaled and clipped in that manner) around the y-axis (when the centre of the spere is in the y-axis) results no change, no matter what rotation factor [#declare yrot= -130;] you give. A sphere is a sphere, no matter from what direction you look at it.

4#
If you change the scaling factorst to [scale <1,0.5,0.5>], then you'll notice some changes ;)
 
I got povray and I have a few questions I would like to ask:
1) I can't find out how to make an animation output, all I get are bmp files. I understand the clock and how it works, but is there anyway to change tht output file type?

2) I can't find a way to make a long thin sharp object such as the blade of a sword.

3) Is there a way I can rotate an object around an axis but not at the center of it?
 
1#
You can output different file types (there are only a few image format options: compressed (+fc) & uncompressed (+ft) targa-24, png (+fn), ppm (+fp) (the text in parenthesis goes to the command line box), but flicster uses bmp-files.

2#
you can use either:
- prism (prism height being very low)
- scaled cylinder (like scale <1,1,0.01> would give a very thin tube in z-direction), or
- mesh (i wouldn't use that)

3#
do you mean you want the object to rotate around a certain point, which is not on the axis?
well:
lets assume you want the object to be rotated in the x-z-plane ('around' the y-axis).
- first you make the object you want to rotate
- then you decide what is the radius of the circle that object rotates along
- then you move the object exactly that radius distance away from the y-axis (like [translate <0,0,1>], where the 1 is the radius of the circle)
- after that you add the rotation angle [translate <0,0,1> rotate y*30], where 30 is the angle around the y-axis
- then you move the object to the desired location [translate <0,0,1> rotate y*30 translate <20,20,555>], where <20,20,555> is the centre of the rotation point of that object.

does that help at all :lol:
 
aaglo and gogf:
#1 know ficster and SSB use bmp, but isn't there a way I can run the animation to see how it works?

#2 What if I want the flat object bent in an angle, not straight?

#3 I'll look into it.

Thanks guys!
 
2#
If you want to do - let's just say: A sword - you would propably want to rotate the blade around the center of the handle (yeah, that sounds convinient).
- first you'll make the sword, and make it so, that the centre of the handle is at coordinates <0,0,0> - It makes things possible to rotate around the centre then
- then you rotate the sword (the centre of the handle should stay in place, if you did things correctly).
- then you translate the unit to the desired location (like a hand that is located in <1,1,4>, you just add [translate <1,1,4>] in the end of the object you created).

Just remember the order of modifications to objects (order is 1. Scale, 2. Rotate, 3. Translate), otherwise you might get very surprising results.
Example, lets assume you have scale factor 2, rotate factor B and translate factor C
- if you put the scale factor in the last position, it scales everything before that (rotate factor becomes 2xB and translate factor becomes 2xC), and I cannot figure out any situation where this would be desireable :lol:
 
Thanks, aaglo. I figured out how to rotate an object but I an still confused about animations:
Is there anyway I can "play" the animation? I want to "see" it before cutting and pasting the bmps into flicster/SSB.
 
Back
Top Bottom