|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I would like to join spheres into a single object for easier manipulation
(rotation for example):
OBJECT {BALLS =
{
#declare Count=0;
#while (Count < 5)
sphere { <(-2+Count), Count, Count>, 1
pigment { color rgb <0.4 0.8 0.8>}
}
#declare Count=Count+1;
#end
}
}; ROTATE BALLS <0 90 45>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Andrej wrote:
> I would like to join spheres into a single object for easier manipulation
> (rotation for example):
>
>
> OBJECT {BALLS =
> {
> #declare Count=0;
> #while (Count < 5)
> sphere { <(-2+Count), Count, Count>, 1
> pigment { color rgb <0.4 0.8 0.8>}
> }
> #declare Count=Count+1;
> #end
> }
> }; ROTATE BALLS <0 90 45>
>
>
#declare BALLS = union
{
#declare Count=0;
#while (Count < 5)
sphere { <(-2+Count), Count, Count>, 1
pigment { color rgb <0.4 0.8 0.8>}
}
#declare Count=Count+1;
#end
}
object { BALLS rotate <0 90 45> }
--
~Mike
Things! Billions of them!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> object { BALLS rotate <0 90 45> }
Can you then multiply this object and position them into different places
(translation, repositioning)?
Like:
BALLS Bplanes[5];
#declare Count=0;
#while (Count < 5)
Bplanes[Count]
{
NEWPOSITION <Count 0 0>
rotate <0 20*Count 45>
}
#declare Count=Count+1;
#end
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Can you then multiply this object and position them into different places
> (translation, repositioning)?
OK, i've found this one: object { BALLS translate x*20 }.
Still searching for multiplication, like:
> BALLS Bplanes[5];
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Andrej wrote:
>>object { BALLS rotate <0 90 45> }
>
>
> Can you then multiply this object and position them into different places
> (translation, repositioning)?
>
> Like:
>
> BALLS Bplanes[5];
>
> #declare Count=0;
> #while (Count < 5)
> Bplanes[Count]
> {
> NEWPOSITION <Count 0 0>
> rotate <0 20*Count 45>
> }
> #declare Count=Count+1;
> #end
>
>
Just:
#declare Count=0;
#while (Count < 5)
object { BALLS rotate <0 20*Count 45> }
#declare Count=Count+1;
#end
--
~Mike
Things! Billions of them!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thank you.
Can you move the reference point (coordinate system) for the rotation?
I translate the object <0 0 10>. From there I would like to rotate <0 90 0>.
Right now, I still rotate from <0 0 0> so the object is also translated.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Andrej who wrote:
>Thank you.
>
>Can you move the reference point (coordinate system) for the rotation?
>I translate the object <0 0 10>. From there I would like to rotate <0 90 0>.
>Right now, I still rotate from <0 0 0> so the object is also translated.
You have to translate the object to the origin, rotate it there and
translate it back. Or you could use Rotate_Around_Trans() which does
exactly those operations.
#include "transforms.inc"
object {BALLS
transform { Rotate_Around_Trans(<0,90,0>, <0,0,10>) }
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Williams <nos### [at] econymdemoncouk> wrote:
> object {BALLS
> transform { Rotate_Around_Trans(<0,90,0>, <0,0,10>) }
I don't think the 'transform' is strictly necessary there.
And by the way, you can also do it like this (which is actually how
that macro does it):
translate -LocalOrigo
rotate whatever
translate LocalOrigo
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |