|
 |
On 31 May 2001 12:02:24 -0400, Warp wrote:
>Ron Parker <ron### [at] povray org> wrote:
>: how should it scale when the container is scaled nonuniformly?
>
> It should scale so that if you, for example, scale the object to be
>twice as wide on screen, render and then squeeze the image to half-size
>in width (eg. just drop out every other column of pixels), the image should
>be the same (perhaps not 100% identical, but by all practical means the same,
>that is, minor differences in individual pixels not noticeable).
Well, that's not strictly true unless you use an orthographic camera, so let's
assume that you meant to say "with an orthographic camera."
Even assuming that, we have a problem: if we take a sphere and scale it
nonuniformly, perhaps by stretching it by a factor of 2 along the Y axis,
now we have to make the density factor depend on the direction of the
ray we're measuring: a ray traveling parallel to the X axis should use
the same density factor it would have without scaling, but a ray traveling
parallel to the Y axis should use half the density factor.
Interestingly enough, that turns into an argument for the notion that POV
should scale the density factor with the object whenever it would scale
the density pattern with the object, because while you could get the
current behavior by scaling the object before the interior statement in
a world where scale affected the factor, you can't get the behavior you
described at all in the current model.
I think the change could be implemented, but I also think it would require
some pretty big changes in the media code.
--
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}
Post a reply to this message
|
 |