|
|
Wasn't it scorpmetal who wrote:
>I want to make a mouvement of 2 objects different. And the camera look at
>the center point in this mouvement. In this case, my 2 object is the cone
>and the difference(cylinder and quadric). How I can make this? I hope you
>understand my question!!! Thanks a lots
>
>camera{
> location < 0 , -2 , 0.0 >
> look_at < 0 , 1.0 , 0.0 >
> }
>difference{
> cylinder{
> < 0, -0.4, 0 > , < 0, 2.5, 0 >, 4
> }
> quadric{
> < -1 , 1 , -1 > // A x^2 + B y^2 + Cz^2
> < 0 , 0 , 0 > // D xy + E xz + F yz +
> < 0 , 2.83 , 0 > // G x + H y + I z +
> 1 // J
> }
> texture {Mirror}
> translate <2,0,0>}
>cone{
> <0,-1.5,0>,0,<0,-0.4,0>,0.2
> pigment {Black}
> translate <2,0 ,0>
> }
>
I'd suggest declaring the whole thing as a single union. The centre of
that pair of objects is approximately the centre of the bounding slab of
the union.
#declare THING = union {
difference { ...
cone {...
}
#declare CENTRE = (min_extent(THING)+max_extent(THING)) / 2;
camera {
...
look_at CENTRE
}
Alternatively you could calculate the centres of the two parts in a
similar way and take the average of those two values.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|