POV-Ray : Newsgroups : povray.newusers : Problems declaring objects : Re: Problems declaring objects Server Time
30 Jul 2024 04:24:21 EDT (-0400)
  Re: Problems declaring objects  
From: Tom Melly
Date: 15 Sep 2004 06:26:31
Message: <414818d7$1@news.povray.org>
"Oleguer Vilella" <ole### [at] infonegociocom> wrote in message
news:41481108$1@news.povray.org...

> Some of the objects appear also moved.
> I'm thinking....

When you scale an object, the only point of the object that won't move is the
point that rests at <0,0,0> (assuming that you're scaling all axis).

To understand what is happening, try the following scene using different values
for myScale. Note that we divide the radius of the spheres by the value of
myScale. This means that the scale size doesn't affect the radius of the
spheres, only their positions.

camera {
  location  <0.0, 0.0, -10.0>
  look_at   <0.0, 0.0,  0.0>
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

#declare myScale = 1;

sphere{
  0,0.25/myScale
  scale myScale
  pigment{rgb<1,0,0>}
}

sphere{
  1,0.25/myScale
  scale myScale
  pigment{rgb<0,1,0>}
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.