POV-Ray : Newsgroups : povray.animations : Rotate object Server Time
23 Nov 2024 20:00:26 EST (-0500)
  Rotate object (Message 1 to 3 of 3)  
From: Oleguer Vilella
Subject: Rotate object
Date: 27 Dec 2004 12:11:29
Message: <41d04241@news.povray.org>
Hi all,

I'm traying to rotate this code on this way:
======================================
#declare MKK1_MKK2 = union {
union {
superellipsoid {
<0.4444, 0.66666667>
pigment { color Brown } finish { ambient 0.2 diffuse 0.8 }
scale <0.5, 0.56, 0.6>
scale 5.5
rotate x*-80
rotate y*60
translate <162.9, -46.3, 0> }
sphere { <0, -1, -1>, 0.4 pigment { color Brown} finish { ambient 0.2 
diffuse 0.8 phong 1 } translate <0, 2, 0.5> scale <0.6667,1,1> }
sphere { <0, -1, -1>, 0.4 pigment { color Brown} finish { ambient 0.2 
diffuse 0.8 phong 1 } translate <0.8, 2, 0.5> scale <0.6667,1,1> }
no_shadow
}

union {
superellipsoid {
<0.4444, 0.66666667>
pigment { color Brown } finish { ambient 0.2 diffuse 0.8 }
scale <0.5, 0.56, 0.6>
scale 5.5
rotate x*-80
rotate y*60
translate <175.9, -44.8, 0>
}
sphere { <0, -1, -1>, 0.4 pigment { color Brown } finish { ambient 0.2 
diffuse 0.8 phong 1 } translate <0, 2, 0.5> scale <0.6667,1,1> }
sphere { <0, -1, -1>, 0.4 pigment { color Brown } finish { ambient 0.2 
diffuse 0.8 phong 1 } translate <0.8, 2, 0.5> scale <0.6667,1,1> }
no_shadow
}}

#declare xvibrate_2=cos(clock*2*pi*(20/20)*1.5)*pow(2.817, 
clock*(20/20)*1.5);

object { MKK1_MKK2 translate <0, 0, 0> translate <-xvibrate_2, 0, 0> }
======================================
A part of this movement I want to rotate both of them like a ball. Maybe 
something like this?:
======================================
rotate <0, 0, -clock*360>
======================================

All helps will be welcome.

Best regards,
Oleguer


Post a reply to this message

From: Alain
Subject: Re: Rotate object
Date: 10 Jan 2005 05:54:47
Message: <41e25ef7$1@news.povray.org>
Oleguer Vilella wrote:
> Hi all,
> 
> I'm traying to rotate this code on this way:
> ======================================
> #declare MKK1_MKK2 = union {
> union {
> superellipsoid {
> <0.4444, 0.66666667>
> pigment { color Brown } finish { ambient 0.2 diffuse 0.8 }
> scale <0.5, 0.56, 0.6>
> scale 5.5
> rotate x*-80
> rotate y*60
> translate <162.9, -46.3, 0> }
> sphere { <0, -1, -1>, 0.4 pigment { color Brown} finish { ambient 0.2 
> diffuse 0.8 phong 1 } translate <0, 2, 0.5> scale <0.6667,1,1> }
> sphere { <0, -1, -1>, 0.4 pigment { color Brown} finish { ambient 0.2 
> diffuse 0.8 phong 1 } translate <0.8, 2, 0.5> scale <0.6667,1,1> }
> no_shadow
> }
> 
> union {
> superellipsoid {
> <0.4444, 0.66666667>
> pigment { color Brown } finish { ambient 0.2 diffuse 0.8 }
> scale <0.5, 0.56, 0.6>
> scale 5.5
> rotate x*-80
> rotate y*60
> translate <175.9, -44.8, 0>
> }
> sphere { <0, -1, -1>, 0.4 pigment { color Brown } finish { ambient 0.2 
> diffuse 0.8 phong 1 } translate <0, 2, 0.5> scale <0.6667,1,1> }
> sphere { <0, -1, -1>, 0.4 pigment { color Brown } finish { ambient 0.2 
> diffuse 0.8 phong 1 } translate <0.8, 2, 0.5> scale <0.6667,1,1> }
> no_shadow
> }}
> 
> #declare xvibrate_2=cos(clock*2*pi*(20/20)*1.5)*pow(2.817, 
> clock*(20/20)*1.5);
> 
> object { MKK1_MKK2 translate <0, 0, 0> translate <-xvibrate_2, 0, 0> }
> ======================================
> A part of this movement I want to rotate both of them like a ball. Maybe 
> something like this?:
> ======================================
> rotate <0, 0, -clock*360>
> ======================================
> 
> All helps will be welcome.
> 
> Best regards,
> Oleguer 
> 
> 
Just add that rotation to your unions. Or combine the two unions and 
rotate the big union as a whole.

Alain


Post a reply to this message

From: Oleguer Vilella
Subject: Re: Rotate object
Date: 10 Jan 2005 11:38:57
Message: <41e2afa1$1@news.povray.org>
Thanks.

Oleguer
http://www.infonegocio.com/oleguervm





news:41e25ef7$1@news.povray.org...
> Oleguer Vilella wrote:
>> Hi all,
>>
>> I'm traying to rotate this code on this way:
>> ======================================
>> #declare MKK1_MKK2 = union {
>> union {
>> superellipsoid {
>> <0.4444, 0.66666667>
>> pigment { color Brown } finish { ambient 0.2 diffuse 0.8 }
>> scale <0.5, 0.56, 0.6>
>> scale 5.5
>> rotate x*-80
>> rotate y*60
>> translate <162.9, -46.3, 0> }
>> sphere { <0, -1, -1>, 0.4 pigment { color Brown} finish { ambient 0.2 
>> diffuse 0.8 phong 1 } translate <0, 2, 0.5> scale <0.6667,1,1> }
>> sphere { <0, -1, -1>, 0.4 pigment { color Brown} finish { ambient 0.2 
>> diffuse 0.8 phong 1 } translate <0.8, 2, 0.5> scale <0.6667,1,1> }
>> no_shadow
>> }
>>
>> union {
>> superellipsoid {
>> <0.4444, 0.66666667>
>> pigment { color Brown } finish { ambient 0.2 diffuse 0.8 }
>> scale <0.5, 0.56, 0.6>
>> scale 5.5
>> rotate x*-80
>> rotate y*60
>> translate <175.9, -44.8, 0>
>> }
>> sphere { <0, -1, -1>, 0.4 pigment { color Brown } finish { ambient 0.2 
>> diffuse 0.8 phong 1 } translate <0, 2, 0.5> scale <0.6667,1,1> }
>> sphere { <0, -1, -1>, 0.4 pigment { color Brown } finish { ambient 0.2 
>> diffuse 0.8 phong 1 } translate <0.8, 2, 0.5> scale <0.6667,1,1> }
>> no_shadow
>> }}
>>
>> #declare xvibrate_2=cos(clock*2*pi*(20/20)*1.5)*pow(2.817, 
>> clock*(20/20)*1.5);
>>
>> object { MKK1_MKK2 translate <0, 0, 0> translate <-xvibrate_2, 0, 0> }
>> ======================================
>> A part of this movement I want to rotate both of them like a ball. Maybe 
>> something like this?:
>> ======================================
>> rotate <0, 0, -clock*360>
>> ======================================
>>
>> All helps will be welcome.
>>
>> Best regards,
>> Oleguer
> Just add that rotation to your unions. Or combine the two unions and 
> rotate the big union as a whole.
>
> Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.