POV-Ray : Newsgroups : povray.animations : Rotate object : Re: Rotate object Server Time
18 Jun 2024 08:42:32 EDT (-0400)
  Re: Rotate object  
From: Oleguer Vilella
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.