|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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>
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
scorpmetal <sco### [at] yahoocom> 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
Just calculate the positions of the two objects using 'clock'?
Something along the lines of:
#declare Object1Position = <clock*10, 0, 0>;
#declare Object2Position = <-clock*5, 0, 0>;
camera { location <0,-2,0> look_at (Object1Position+Object2Position)/2 }
difference
{ whatever
translate Object1Position
}
cone
{ whatever
translate Object2Position
}
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks. I will test your suggest.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|