|
 |
On Wed, 19 Aug 1998 04:51:41 +1000, J.B Cattley <jbc### [at] mpx com au> wrote:
>Do I have to give everything absolute coordinates?
>As far as I can see, If I want to create a standard object for multiple use,
>like, say, a 1 by 3 unit box, I have to specify exactly where I want it. I
>don't seem to be able to just specify the dimensions, and then plonk it down
>at a given location.
This is true. If it were not, how would you specify which point on
the box was supposed to be at the given location?
>I suppose I could put everything at <0,0,0> and then translate as necessary,
>but this seems kludgy, somehow. I seem to be missing the point, but the help
>isn't very clear on this.
By doing this, you're telling POV-Ray that the part of the box that falls at
<0,0,0> should be at the given location, thus solving the problem above.
If you wanted to go to the extra work, you could create macros in POV 3.1
that would allow you to do what I think you want to do. For example, if you
want to create a box of given dimensions centered on the origin and ready to
be translated, you could do:
#macro my_box( size )
box { -.5*size, .5*size }
#end
And then you could do something like:
object { my_box(<3,5,7>) translate <15,20,30> texture {...}}
to create a box of size 3x5x7, centered on the point <15,20,30>.
Post a reply to this message
|
 |