|
|
Warp wrote:
>
> Tor Olav Kristensen <tor### [at] hotmailcom> wrote:
> :> light_source{0,1}#macro c(J,a)sphere{0,1scale a translate J+O}#end#macro B(R,
> :> V,O)c(0,4)intersection{c(V,R)difference{c(-z*4x+10)c(-z*4.1x+10)c(0<7.5,45,5>
> :> )}}#end union{B(12,0z*25)B(8y*4<0,12,50>)pigment{rgb z}scale.5}
>
> I got lost. How can this work?
> From what I see, the 'scale.5' at the end is now scaling *both* instances
> of B() instead of just the second one, as previously, so now also the first
> instance should be reduced to half size.
> But when I render this, I can't believe my eyes: It's identical.
>
> I don't get it. *shame*
Here's the explanation that I had prepared
for posting, before I noticed that Warp had
answered his question himself.
But I'm posting it anyway, in case that any-
one finds this informative. (And because it
took me while to write it =)
I think that with the default camera;
camera {
perspective
location <0,0,0>
direction <0,0,1>
right 1.33*x
up y
sky <0,1,0>
}
which is placed at origo and looking in the
positive z-direction, an object will be in the
same vertical/horizontal "screen position" and
have the same "screen size" as any other copy
of the same object scaled differently, but
uniformly with respect to all 3 axes; i.e.:
scale constant*<1, 1, 1>. (The distance from
origo is scaled by the same amount as the size
of the object.)
So even this should produce the same image:
> light_source{0,1}#macro c(J,a)sphere{0,1scale a pigment{rgb z}translate J+O}
> #end#macro B(R,V,O)c(0,4)intersection{c(V,R)difference{c(-z*4x+10)c(-z*4.1x+
> 10)c(0<7.5,45,5>)}}#end B(12,0z*25)B(8y*4<0,12,50>)
Tor Olav
Post a reply to this message
|
|