|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I have made an object with two intersections: First, two planes and a sphere
in the origin. Second, this new portion and other two planes. Now I want to
translate and rotate this new object, but the result isn`t the expected. I
have tried rotation and translation and inverse but it doesn't work. Maybe
anyone can explain to me how rotation and translation work when are aplied
over a portion of an object which is the result of intersections.
The code is something like this:
#declare Portion =
intersection
{
plane
{
<0, 0, 1>
0
}
plane
{
<0, 0, -1>
0
rotate <0, -89.9543768408, 0>
}
intersection
{
plane
{
<0, -1, 0>
71.7356099205
}
plane
{
<0, 1, 0>
71.7356099205
}
sphere
{
<0, 0, 0>, 100.0
}
}
texture
{
pigment
{
color <0.0, 0.0, 1.0>
}
}
}
object
{
Portion
translate <0.0, 300.0, 0.0>
rotate <89.9999820139, -0.0, -0.0>
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> object
> {
> Portion
> translate <0.0, 300.0, 0.0>
> rotate <89.9999820139, -0.0, -0.0>
> }
Rotations are made about the origin <0,0,0> no matter where the object is
located. So translating then rotating does not equal rotating then
translating.
you probably want:
rotate <89.9999820139, -0.0, -0.0>
translate <0.0, 300.0, 0.0>
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
A (hopefully) helpful hint:
It's usually a good idea to design an object so that the
point around which it will most often rotate, usually the
center of gravity, is the origin.
This box: #declare EZRotBox = box{<-3,-2,-1>,<3,2,1>}
will rotate about its center as one would usually expect.
Whereas,
This box: #declare HardRotBox = box{<0,0,0>,<6,4,2>}
is the same size and shape as the one above, but will
rotate about its lower left front corner, which is
USUALLY not what one would want.
-Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|