How do I use POV-Ray

Originally posted by vbraun
Try this:
Code:
#declare insidet = difference{ box {
  <0, 0, 0>  // one corner position <X1 Y1 Z1>
  < 10,  2,  2>  // other corner position <X2 Y2 Z2>
}
// Capped Cylinder, closed [or open ended]
// cylinder { <END1>, <END2>, RADIUS [open] }
//  END1 = coord of one end of cylinder
//  END2 = coord of other end
// RADIUS = size of cylinder
// open = if present, cylinder is hollow, else capped
cylinder {
  <1,1,-0.1>,  <1,1,2.1>,  .9
  // open
}cylinder {
  <9,1,-0.1>,  <9,1,2.1>,  .9
  // open
}box {<1,.05,-1> <9,1.95, 3>}   }

#declare outsidet = union{cylinder {
  <1,1,-0.1>,  <1,1,2.1>,  1
  // open
}cylinder {
  <9,1,-0.1>,  <9,1,2.1>,  1
  // open
}box {<1,0,-1> <9,2, 3>} }

#declare tread =  
intersection{
object {outsidet}
object{insidet} 
}

What is it? It seems like some sort of box cylander mix. Is it your tank?

@the mormegil: I can't see your image.
 
Here it is:

TM_povray_test_tank.JPG


vbraun - I apologise for shamelessly copying your idea and thanks for the help with the tracks. I ended up using a slightly different method:
Code:
#declare insidet = union { box { <-9,-3,-10> <-5,1,10> }
cylinder { <-9,-1,-10> <-5,-1,-10> 2 }
cylinder { <-9,-1,10> <-5,-1,10> 2 } }

#declare outsidet = union { box { <-10,-2.8,-10> <-4,0.8,10> }
cylinder { <-10,-1,-10> <-4,-1,-10> 1.8 }
cylinder { <-10,-1,10> <-4,-1,10> 1.8 } }

#declare tread = difference { object { insidet } object { outsidet } pigment { rgb <0.2,0.2,0.2> } }
 
Originally posted by the mormegil


Nice, did you do it with a box with sphere cut outs?

Yea, does anyone know the camera angles and lighting to use so it looks normal compared to civ units?
 
Originally posted by the mormegil
Here it is:

TM_povray_test_tank.JPG


vbraun - I apologise for shamelessly copying your idea and thanks for the help with the tracks. I ended up using a slightly different method:
Code:
#declare insidet = union { box { <-9,-3,-10> <-5,1,10> }
cylinder { <-9,-1,-10> <-5,-1,-10> 2 }
cylinder { <-9,-1,10> <-5,-1,10> 2 } }

#declare outsidet = union { box { <-10,-2.8,-10> <-4,0.8,10> }
cylinder { <-10,-1,-10> <-4,-1,-10> 1.8 }
cylinder { <-10,-1,10> <-4,-1,10> 1.8 } }

#declare tread = difference { object { insidet } object { outsidet } pigment { rgb <0.2,0.2,0.2> } }

I've got to laern how to do this, everyone else is so much faster!
 
I'm not.... Still struggling with the hull of my fighter, can't get the shape right. As with most things anyway, all it takes I guess is training, training, training.... And struggling...
 
Fine...

BTW, I was going to make a canoe next :p

Image is really bad due to the fact its a gif and not a bmp
 

Attachments

  • test.gif
    test.gif
    4.3 KB · Views: 113
1. Nice, you added a wheel!
2. C'mon, you can do better than a canoe (see tank), while that is the best I can do :p.

VB, the tank look amazing. I just wonder how the attack is made. Do you just keep a shell in the tank, and then animate it coming out, through where the gun is?
 
Okay, so 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
  cone {
    <0, 1, 0>, 0.3    // Center and radius of one end
    <1, 2, 3>, 1.0    // Center and radius of other end
    open              // Removes end caps
    texture { T_Stone25 scale 4 }
    }
    rotate y*yrot     // Equivalent to "rotate <0,20,0>" 
    }                                   
  light_source { <2, 4, -3> color White}

It lights up the

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

line. Sorry for not getting this. I've tried many different things, and can't get it to work.
 
Isn't it because you haven't specified what to rotate?
The rotate y*yrot is after the ending '}' of the cone.

Or, have I totally missed the point here?
 
Try 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
  cone {
    <0, 1, 0>, 0.3    // Center and radius of one end
    <1, 2, 3>, 1.0    // Center and radius of other end
    open              // Removes end caps
    texture { T_Stone25 scale 4 }
    rotate y*yrot     // Equivalent to "rotate <0,20,0>"
    } 
    }                                   
  light_source { <2, 4, -3> color White}

:)
 
Thanks VB.

A couple more questions (yes, I looked in the help file):

1. How do I make a cylander enlongated?
2. How do I chop off the top, and do it in a manner so that you can see the inside of the buttom? Use a clipped_by? How exactly do I do that? Thanks.

I'm getting this sort of now, but I was need to know a few more things...
 
1. How do I make a cylander enlongated?

What do you mean? Ithink you mean make it longer in certain directions.

use scale <x,y,z>

taht will increase the size of that dimmension by multipliny what you put times the original dimensions.

2. How do I chop off the top, and do it in a manner so that you can see the inside of the buttom? Use a clipped_by? How exactly do I do that? Thanks.

Try using open in this manner:
Code:
   cylinder {<5, 2.25, 3.5>,     <16, 3, 3.5>,     0.4     open}
 
how about:

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
 
Back
Top Bottom