POV-Ray : Newsgroups : povray.newusers : Re: Vibrate objects in animation : Re: Vibrate objects in animation Server Time
30 Jul 2024 02:29:09 EDT (-0400)
  Re: Vibrate objects in animation  
From: Bathurstfreak
Date: 24 Nov 2004 17:30:01
Message: <web.41a509ecfa0d3b25fce34a90@news.povray.org>
The primary way to vibrate an object is to translate or rotate using sin and
cos. depending on your model you could even damp the function over time.

#include "transforms.inc"

#declare damping = 5;
// no.s greater than 0 damp the vibration
// no.s less than zero excite the vibration

#declare frequency = 5;
#declare framerate = 25;
#declare frames = 100

#declare xvibrate =
distance*cosd(clock*360*(frames/framerate)*frequency)*pow(2.817,-clock*(frames/framerate)*damping);


Post a reply to this message

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