POV-Ray : Newsgroups : povray.binaries.animations : Tentacle Ball : Re: Tentacle Ball Server Time
18 Jul 2024 18:24:34 EDT (-0400)
  Re: Tentacle Ball  
From: Rune
Date: 7 Mar 2004 07:55:05
Message: <404b1ba9@news.povray.org>
Zeger Knaepen wrote:
> "Fernando G. del Cueto" wrote:
>> It looks as if it is in sync with the music.
>> If it is, how do you do it? It mustn't be trivial, I think.
>
> As far as I can see, only the flashes are in sync, which
> *is* more or less trivial to do :)

Nope, the movement of the thingy is in sync with the rythm too.
Here's the code that calculates the transform:

#declare Time = (frame_number-1)/25;
#declare Spline =
spline {
   linear_spline
   #declare Seed = seed(123);
   #declare C = -1;
   #while (C<=101)
      C, <rand(Seed),rand(Seed),rand(Seed)>,
      #declare C = C+1;
   #end
}
// Create the movement
#declare MoveTimeTranslate = Time+0.3;
#declare MoveTimeRotate = Time+0.3;
#declare PulseTimeRotate =
MoveTimeRotate-sin(MoveTimeRotate*2*pi)*0.15;
#declare PulseTimeTranslate =
(MoveTimeTranslate-sin(MoveTimeTranslate*2*2*pi)*0.15)*2;
#declare Trans =
transform {
   rotate <3,2,1>/12*360*PulseTimeRotate
   translate (Spline(PulseTimeTranslate)*2-1)
}

You can see the movement clearer in this animation which features a ball
with no tentacles:
http://runevision.com/3d/anims/tentacleball_test.mpg

> nice animation btw!

Thanks! :)

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Jan 29**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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