POV-Ray : Newsgroups : povray.animations : How to animate 4-step bend? Server Time
5 Jul 2024 12:23:10 EDT (-0400)
  How to animate 4-step bend? (Message 1 to 3 of 3)  
From: Steve Shelby
Subject: How to animate 4-step bend?
Date: 29 Jan 2003 08:05:13
Message: <3e37d189$1@news.povray.org>
Hi,
I've been experimenting with Chris Colefax's object bender and have run into
a problem I can't figure out, with my limited experience. I need to have
four stages to the bend:
1. from zero to 40,-y
2. back to zero
3. from zero to 40, +y
4. back to zero
Here is what I have so far (creates the first stage):

 rotate
  From (0, <0, 0, 0>)
  Using ( "", 1, 1, "")
  To (1, <0, 0, 20> )
 scale
  From (0,<1,1,1>)
  Using ( "", 1, 1, "")
  To (1, <0.9,1,1>)
}
#declare object_axis1 = <1,0,0>;
   #declare object_axis2 = <3,0,0>;
   #declare bend_smoothness = 200;
   #declare bend_direction = -y;
   #declare bend_angle = 0+clock*40;
#include "bend.inc"

It can't go directly from -y to +y, so it can't be done in 2 stages. I know
there must be a way to accomplish this using autoClk or ClockMod, but the
bend is set up so much differently from other types of transformations that
I can't make sense out of any of the documentation as it would relate to
"bend".
Any help or suggestions on this will be appreciated.
Thank you,
Steve Shelby


Post a reply to this message

From: Chris Colefax
Subject: Re: How to animate 4-step bend?
Date: 29 Jan 2003 20:05:59
Message: <3e387a77@news.povray.org>
Steve Shelby <ssh### [at] rexnetnet> wrote:
> I've been experimenting with Chris Colefax's object bender and have run
into
> a problem I can't figure out, with my limited experience. I need to have
> four stages to the bend:
> 1. from zero to 40,-y
> 2. back to zero
> 3. from zero to 40, +y
> 4. back to zero
> Here is what I have so far (creates the first stage):
[snipped code]
> It can't go directly from -y to +y, so it can't be done in 2 stages. I
know
> there must be a way to accomplish this using autoClk or ClockMod, but the
> bend is set up so much differently from other types of transformations
that
> I can't make sense out of any of the documentation as it would relate to
> "bend".

The bend_angle can be a negative value, so you can animate an oscillating
bend using something like this:

#declare bend_direction = -y;
#declare bend_angle = (From (0, 0) To_Using (1, 40, "Osc"));

This will bend down 40 degrees (at clock=.25) back up to 0 (at clock = .5)
up to 40 degrees (at clock = .75) and back to 0 (at clock = 1).  You can
similarly use the Oscillating clock type to apply other transformations to
the object to align it as you wish.


Post a reply to this message

From: Steve Shelby
Subject: Re: How to animate 4-step bend?
Date: 30 Jan 2003 09:23:46
Message: <3e393572@news.povray.org>
Chris,
Thank you for your reply. Your suggestion seems to work. It still needs a
little tweaking. In this line that you gave me:  (From (0, 0) To_Using (1,
40, "Osc")); how can I specify Clock_Type, Clock_Strength, Clock_Repeat?
Also, the scale change, which is necessary to counteract the elongation that
the bend causes, only works for the first half of the cycle, and it appears
that the rotate doesn't behave quite right in the second half either. Any
suggestions?
Steve

Chris Colefax <chr### [at] tagpovrayorg> wrote in message
news:3e387a77@news.povray.org...
> Steve Shelby <ssh### [at] rexnetnet> wrote:
> > I've been experimenting with Chris Colefax's object bender and have run
> into
> > a problem I can't figure out, with my limited experience. I need to have
> > four stages to the bend:
> > 1. from zero to 40,-y
> > 2. back to zero
> > 3. from zero to 40, +y
> > 4. back to zero
> > Here is what I have so far (creates the first stage):
> [snipped code]
> > It can't go directly from -y to +y, so it can't be done in 2 stages. I
> know
> > there must be a way to accomplish this using autoClk or ClockMod, but
the
> > bend is set up so much differently from other types of transformations
> that
> > I can't make sense out of any of the documentation as it would relate to
> > "bend".
>
> The bend_angle can be a negative value, so you can animate an oscillating
> bend using something like this:
>
> #declare bend_direction = -y;
> #declare bend_angle = (From (0, 0) To_Using (1, 40, "Osc"));
>
> This will bend down 40 degrees (at clock=.25) back up to 0 (at clock = .5)
> up to 40 degrees (at clock = .75) and back to 0 (at clock = 1).  You can
> similarly use the Oscillating clock type to apply other transformations to
> the object to align it as you wish.
>
>


Post a reply to this message

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