|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Someone else has just been caught out by 'moving' objects when using
scale, I was wondering if adding a non-origin sphere to the example would
highlight this, perhaps:
Scale also alters the vector components of an object
For example
sphere { <1,1,1>, 1
scale 5> // Evaluates as <5,5,5> so uniformly scale
// by 5 in every direction.
// but also multiplies the vector location
// resulting in a translation to <5,5,5>
}
--
Phil Cook
--
All thoughts and comments are my own unless otherwise stated and I am
happy to be proven wrong.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Phil Cook wrote:
> Someone else has just been caught out by 'moving' objects when using
> scale, I was wondering if adding a non-origin sphere to the example
> would highlight this, perhaps:
>
> Scale also alters the vector components of an object
>
> For example
>
> sphere { <1,1,1>, 1
> scale 5> // Evaluates as <5,5,5> so uniformly scale
> // by 5 in every direction.
> // but also multiplies the vector location
> // resulting in a translation to <5,5,5>
> }
See "2.2.7.2 Transformation Order" - without such a complete example but
well explained IMO.
Apart from that your explanation is wrong. A transform does not
transform the radius and center of the sphere but the whole object. In
fact POV-Ray does not even transform the object but transforms the ray
with the inverse transform - otherwise a lot of shapes could not be
transformed arbitrarily at all.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 21 Mar. 2004 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christoph Hormann <chr### [at] gmxde> wrote:
> Apart from that your explanation is wrong. A transform does not
> transform the radius and center of the sphere but the whole object.
Actually that's not completely true. POV-Ray performs some optimizations
in transformations in order to avoid making a transformation matrix.
If you eg. create a sphere and translate it, POV-Ray will change its
center.
It's better to explain transformations in a more abstract level,
without going too deep into details. From the point of view of the
user it doesn't really matter which way transformations are applied
(ie. by modifying the object parameters, if possible, or by creating
a transformation matrix).
--
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Mon, 26 Apr 2004 18:53:48 +0200, Christoph Hormann
<chr### [at] gmxde> wrote:
> Phil Cook wrote:
>> Someone else has just been caught out by 'moving' objects when using
>> scale, I was wondering if adding a non-origin sphere to the example
>> would highlight this, perhaps:
>>
>> Scale also alters the vector components of an object
>>
>> For example
>>
>> sphere { <1,1,1>, 1
>> scale 5> // Evaluates as <5,5,5> so uniformly scale
>> // by 5 in every direction.
>> // but also multiplies the vector location
>> // resulting in a translation to <5,5,5>
>> }
>
> See "2.2.7.2 Transformation Order" - without such a complete example but
> well explained IMO.
>
> Apart from that your explanation is wrong. A transform does not
> transform the radius and center of the sphere but the whole object. In
> fact POV-Ray does not even transform the object but transforms the ray
> with the inverse transform - otherwise a lot of shapes could not be
> transformed arbitrarily at all.
>
The only transformation order I can see in the v3.5 help file is at 6.3.2
which states:
"Similarly scaling after translation also moves an object unexpectedly. If
you scale after you translate the scale will multiply the translate
amount.
For example
translate <5, 6, 7>
scale 4
will translate to <20,24,28> instead of <5,6,7>. Be careful when
transforming to get the order correct for your purposes."
But doesn't explicitly state what happens if you create an object at a
non-origin point, if you take the position that doing so is the equivalent
of creating an origin object then translating it then this makes sense,
but it's not obvious.
If someone translated an object and then rotated it and complained that
it's 'moved' you can tell them to look up rotate in the help file and read
what is there; but you can't look up scale and get a similar answer. I
just thought it would be better to keep this information together in an
easier-to-find place as is done with rotate.
As for my explanation, if you want to change it to 'apparent'
translation/transform or whatever, fine; but as Warp pointed out from the
users perspective who cares, to them the object has just arbitrarily moved
without an explanation under scale as to why.
--
Phil Cook
--
All thoughts and comments are my own unless otherwise stated and I am
happy to be proven wrong.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|