POV-Ray : Newsgroups : povray.advanced-users : Animating path vertices with other paths? Server Time
28 Jul 2024 08:22:26 EDT (-0400)
  Animating path vertices with other paths? (Message 1 to 4 of 4)  
From: Mike
Subject: Animating path vertices with other paths?
Date: 20 Mar 2006 07:20:00
Message: <web.441e9d4cf98a97c149a12b420@news.povray.org>
Is there a way to take a given path in povray and animate each of its
individual vertices according to seperate paths? For example pathA has
vertice 1, 2 & 3 - have vertice 1 follow pathB, vertice 2 follow pathC and
vertice 3 follow pathD.

I'm trying to visualize a maze/pathfinding algorithm and I would like to be
able to continiously animate each point. (example here:
http://www.mydis.org/wp-uploads/growths.mpg)

input greatly appreciated,

mike


Post a reply to this message

From: Mike
Subject: Re: Animating path vertices with other paths?
Date: 20 Mar 2006 07:40:00
Message: <web.441ea1ac86410b2949a12b420@news.povray.org>
I also should ask, is there a way to instantiate/insert path verticies at
certain times of the clock (if clock > something and < something else)
insert new point in path. My animation below is simply inserting cubes at
specific times of the clock and not yet using paths.

thanks,

-m

"Mike" <inf### [at] mydisorg> wrote:
> Is there a way to take a given path in povray and animate each of its
> individual vertices according to seperate paths? For example pathA has
> vertice 1, 2 & 3 - have vertice 1 follow pathB, vertice 2 follow pathC and
> vertice 3 follow pathD.
>
> I'm trying to visualize a maze/pathfinding algorithm and I would like to be
> able to continiously animate each point. (example here:
> http://www.mydis.org/wp-uploads/growths.mpg)
>
> input greatly appreciated,
>
> mike


Post a reply to this message

From: Chris B
Subject: Re: Animating path vertices with other paths?
Date: 20 Mar 2006 08:30:16
Message: <441eae68$1@news.povray.org>
"Mike" <inf### [at] mydisorg> wrote in message 
news:web.441ea1ac86410b2949a12b420@news.povray.org...
>I also should ask, is there a way to instantiate/insert path verticies at
> certain times of the clock (if clock > something and < something else)
> insert new point in path. My animation below is simply inserting cubes at
> specific times of the clock and not yet using paths.
>
> thanks,
>
> -m
>
> "Mike" <inf### [at] mydisorg> wrote:
>> Is there a way to take a given path in povray and animate each of its
>> individual vertices according to seperate paths? For example pathA has
>> vertice 1, 2 & 3 - have vertice 1 follow pathB, vertice 2 follow pathC 
>> and
>> vertice 3 follow pathD.
>>
>> I'm trying to visualize a maze/pathfinding algorithm and I would like to 
>> be
>> able to continiously animate each point. (example here:
>> http://www.mydis.org/wp-uploads/growths.mpg)
>>
>> input greatly appreciated,
>>
>> mike
>

Hello Mike,

If you are talking about splines (though I'm not at all sure from your 
description that you are), then yes there is.
You can declare a number of splines then use them to build another spline 
and you can add in spline positions based upon the clock setting.
The following (slightly messy) example illustrates both.

Regards,
Chris B.


camera { location <0,2,-2> look_at 0 }
light_source { <-5,30,-10> 1 }
#declare MySplineA =
  spline {
    cubic_spline
    -.25, < 0,0.3,-1>
    0.00, < 1,0.3,0>
    0.25, < 0,0.3,1>
    0.50, <-1,0.3,0>
    0.75, < 0,0.3,-1>
    1.00, < 1,0.3,0>
    1.25, < 0,0.3,1>
  }

#declare MySplineB =
  spline {
    cubic_spline
    -.25, <0,0,-1>
    0.00, <1,0,0>
    0.25, <0,0,1>
    0.50, MySplineA(clock)
#if (clock > 0.5)  0.60, MySplineA(clock-0.5)  #end
    0.75, <0,0,-1>
    1.00, <1,0,0>
    1.25, <0,0,1>
  }

#declare ctr = 0;
#while (ctr < 1)
  sphere {
    MySplineB(ctr),.25
    pigment { rgb <1-ctr,ctr,0> }
  }
  #declare ctr = ctr + 0.01;
#end


Post a reply to this message

From: Mike
Subject: Re: Animating path vertices with other paths?
Date: 20 Mar 2006 13:00:01
Message: <web.441eec7f86410b291f3f15720@news.povray.org>
Chris, you answered my question(wrt "splines") perfectly!

Thanks soo much,

-m

"Chris B" <c_b### [at] btconnectcomnospam> wrote:
> "Mike" <inf### [at] mydisorg> wrote in message
> news:web.441ea1ac86410b2949a12b420@news.povray.org...
> >I also should ask, is there a way to instantiate/insert path verticies at
> > certain times of the clock (if clock > something and < something else)
> > insert new point in path. My animation below is simply inserting cubes at
> > specific times of the clock and not yet using paths.
> >
> > thanks,
> >
> > -m
> >
> > "Mike" <inf### [at] mydisorg> wrote:
> >> Is there a way to take a given path in povray and animate each of its
> >> individual vertices according to seperate paths? For example pathA has
> >> vertice 1, 2 & 3 - have vertice 1 follow pathB, vertice 2 follow pathC
> >> and
> >> vertice 3 follow pathD.
> >>
> >> I'm trying to visualize a maze/pathfinding algorithm and I would like to
> >> be
> >> able to continiously animate each point. (example here:
> >> http://www.mydis.org/wp-uploads/growths.mpg)
> >>
> >> input greatly appreciated,
> >>
> >> mike
> >
>
> Hello Mike,
>
> If you are talking about splines (though I'm not at all sure from your
> description that you are), then yes there is.
> You can declare a number of splines then use them to build another spline
> and you can add in spline positions based upon the clock setting.
> The following (slightly messy) example illustrates both.
>
> Regards,
> Chris B.
>
>
> camera { location <0,2,-2> look_at 0 }
> light_source { <-5,30,-10> 1 }
> #declare MySplineA =
>   spline {
>     cubic_spline
>     -.25, < 0,0.3,-1>
>     0.00, < 1,0.3,0>
>     0.25, < 0,0.3,1>
>     0.50, <-1,0.3,0>
>     0.75, < 0,0.3,-1>
>     1.00, < 1,0.3,0>
>     1.25, < 0,0.3,1>
>   }
>
> #declare MySplineB =
>   spline {
>     cubic_spline
>     -.25, <0,0,-1>
>     0.00, <1,0,0>
>     0.25, <0,0,1>
>     0.50, MySplineA(clock)
> #if (clock > 0.5)  0.60, MySplineA(clock-0.5)  #end
>     0.75, <0,0,-1>
>     1.00, <1,0,0>
>     1.25, <0,0,1>
>   }
>
> #declare ctr = 0;
> #while (ctr < 1)
>   sphere {
>     MySplineB(ctr),.25
>     pigment { rgb <1-ctr,ctr,0> }
>   }
>   #declare ctr = ctr + 0.01;
> #end


Post a reply to this message

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