POV-Ray : Newsgroups : povray.newusers : Light Cycle animation questions... Server Time
11 Oct 2026 17:57:05 EDT (-0400)
  Light Cycle animation questions... (Message 1 to 16 of 16)  
From: Carl Hoff
Subject: Light Cycle animation questions...
Date: 16 Feb 2004 10:34:15
Message: <4030e2f7@news.povray.org>
I'm now playing with the animation features built into POV-Ray and I wanted
to share the idea of what I'm trying to do.  I'm sure this basic idea has
been done by others and shouldn't be too hard to do but I'm not seeing an
easy solution at the moment.  So here are a few questions:

(1)  In the movie TRON the effect of the rotation of the wheels of the Light
Cycle was achieved by putting a spoke in the wheel that was present in one
frame and gone in the next.  Since the values that 'clock' takes on is
dependant on the number of frames what is the best way to do this as I might
want to play with the number of frames I generate for a given scene.  I'm
also thinking about having blinking lights that follow some pattern.
Something like on for 2 frames, off for 1, back on for 2, then off for 10
before repeating. At the moment I'm not sure how to pull off these effects.

(2)  The light trail...  Lets say I have a game grid that's 100 units by 100
units.  I want to be able to set a path for my bike to follow.  Something
like:

<50,0>, <50,50>, <75,50>, <75,75>, <25,75>....

I think I can move the bike by itself easy enough but I'm but sure about the
best way to draw the light trail.  It should have a rectangular
cross-section and I'm thinking about the idea of generating the whole shape
for the path with a prism then putting a 'clock' dependant texture on it
that's totally invisible in front of the bike position and visible behind
it.  It'd also need a texture map to put a vertical white line on the trail
for something like every 5 units of its length.  Any tips on how best to do
that?

I'm still very green when it comes to POV-Ray and my programming is a little
rusty but its getting better.  I'm sure I'll solve the above two problems on
my own eventually but I think I'm making this problem harder then it is and
I think the easy solution is eluding me. I'm open to any tips you guys can
share or any small pieces of code that I could play with and learn something
from.  With some help I might be able to make some cool light cycle
animations soon.

Thank you so much for your time,
Carl


Post a reply to this message

From: Hughes, B 
Subject: Re: Light Cycle animation questions...
Date: 16 Feb 2004 12:45:38
Message: <403101c2$1@news.povray.org>
"Carl Hoff" <hof### [at] wtnet> wrote in message news:4030e2f7@news.povray.org...
>
> (1) --- also thinking about having blinking lights that follow some
pattern.
> Something like on for 2 frames, off for 1, back on for 2, then off for 10
> before repeating.
>
> (2)  The light trail...  Lets say I have a game grid that's 100 units by
100
> units.  I want to be able to set a path for my bike to follow.  Something
> like:
>
> <50,0>, <50,50>, <75,50>, <75,75>, <25,75>....
>
> I think I can move the bike by itself easy enough but I'm but sure about
the
> best way to draw the light trail.  It should have a rectangular
> cross-section and I'm thinking about the idea of generating the whole
shape
> for the path with a prism then putting a 'clock' dependant texture on it
> that's totally invisible in front of the bike position and visible behind
> it.  It'd also need a texture map to put a vertical white line on the
trail
> for something like every 5 units of its length.  Any tips on how best to
do
> that?

In answer to question 1... I'd say have a look at the Clock Modifier macro
by Chris Colefax, if you haven't already. It's at:
http://www.geocities.com/SiliconValley/Lakes/1434/index.html
Can create repeat events in various ways, and using
'frame_number/final_frame' as a parameter should work.

For question 2... use a clocked linear 'spline' path for the bike, and
perhaps apply the trail line in the same way (with a object for the line).
I'm not sure about the prism idea. It would certainly need to be done in
such a way which doesn't have the texture intersecting with other points. If
you use a single already-completed object, that could be a problem. Best
thing might be an object which forms as it moves along, and a 'sphere_sweep'
might be good for that. Just need the values given to it to change with
time.

-- 
Bob H.
http://www.3digitaleyes.com


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 17 Feb 2004 00:20:22
Message: <4031a496@news.povray.org>
> In answer to question 1... I'd say have a look at the Clock Modifier
> macro by Chris Colefax, if you haven't already. It's at:
> http://www.geocities.com/SiliconValley/Lakes/1434/index.html
> Can create repeat events in various ways, and using
> 'frame_number/final_frame' as a parameter should work.

Thanks... I've just downloaded it.  I'll take a peak and see what
I can get it to do.

> For question 2... use a clocked linear 'spline' path for the bike,
> and perhaps apply the trail line in the same way (with a object
> for the line). I'm not sure about the prism idea. It would certainly
> need to be done in such a way which doesn't have the texture
> intersecting with other points.

Why?  I just ran this little test...

  #include "colors.inc"
  camera {location  <30,-30,-10> look_at <2,2,2> angle 20}
  light_source {<500, -700, -150> 0.7*White}
  light_source {<150, 1000, -800> 0.6*White}
  light_source {<1000, 100, -200> 0.7*White}
  light_source {<-500, 1000, -1500> 0.5*White}

  box {<1,1,1>, <5,5,5> pigment {Red}}
  sphere {<0,0,0>, 3 pigment {color transmit 1.0}}

and the sphere doesn't seem to cause any negative effects on
the cube.  So I was thinking as long as the tail had this texture
ahead of the bike it'd be ok.  It would just become visible after
the bike at passed over it.

> If you use a single already-completed object, that could be a
> problem. Best thing might be an object which forms as it moves
> along, and a 'sphere_sweep' might be good for that. Just need
> the values given to it to change with time.

Having the object form as it moves might be as easy as having
a texture that changes as it moves.  I like the sphere_sweep
idea but the trail isn't a series of cones and its a little more then
just changing the values passed to the sphere_sweep.  You'd
also have to be able to change the number of values.  Only the
last one is moving. Given a few days I'm sure I'll figure something
out but I'm not sure it'll be the most efficient solution.

Thanks,
Carl


Post a reply to this message

From: Hughes, B 
Subject: Re: Light Cycle animation questions...
Date: 17 Feb 2004 12:22:46
Message: <40324de6$1@news.povray.org>
"Carl Hoff" <hof### [at] wtnet> wrote in message news:4031a496@news.povray.org...
>
> > For question 2... use a clocked linear 'spline' path for the bike,
> > and perhaps apply the trail line in the same way (with a object
> > for the line). I'm not sure about the prism idea. It would certainly
> > need to be done in such a way which doesn't have the texture
> > intersecting with other points.
>
> Why?  I just ran this little test...
>
>   #include "colors.inc"
>   camera {location  <30,-30,-10> look_at <2,2,2> angle 20}
>   light_source {<500, -700, -150> 0.7*White}
>   light_source {<150, 1000, -800> 0.6*White}
>   light_source {<1000, 100, -200> 0.7*White}
>   light_source {<-500, 1000, -1500> 0.5*White}
>
>   box {<1,1,1>, <5,5,5> pigment {Red}}
>   sphere {<0,0,0>, 3 pigment {color transmit 1.0}}
>
> and the sphere doesn't seem to cause any negative effects on
> the cube.  So I was thinking as long as the trail had this texture
> ahead of the bike it'd be ok.  It would just become visible after
> the bike at passed over it.

I'm not exactly sure what you are saying with that bit of script but what I
was trying to warn of has to do with how a texture pattern will interact
with corners/turns as it moves along the path line.

It might be easier to show an example of what I'm thinking about rather than
just describe it, so I've posted a sample script at povray.text.scene-files
which will animate.

I think the idea must be to prevent interaction with a perpendicular section
of the path. Probably solvable, but I haven't gone into that.

Bob H.


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 17 Feb 2004 12:58:39
Message: <4032564f$1@news.povray.org>
> I'm not exactly sure what you are saying with that bit of script

I'm thinking I misunderstood you.  I took what you said to imply
I'd have a problem with the light trail if it already existed even
though it had no texture because it would be intersecting my bike.
So my test was to see what a textureless sphere would do to the
box.  Think of the sphere as a simple trail and the box as my bike.

> but what I was trying to warn of has to do with how a texture
> pattern will interact with corners/turns as it moves along the path
> line.
>
> It might be easier to show an example of what I'm thinking about
> rather than just describe it, so I've posted a sample script at
> povray.text.scene-files which will animate.
>
> I think the idea must be to prevent interaction with a perpendicular
> section of the path. Probably solvable, but I haven't gone into that.
>
> Bob H.

Thank you so much for the code.  I need to digest the code to see
what you are doing but I like it.

Thanks,
Carl


Post a reply to this message

From: Hughes, B 
Subject: Re: Light Cycle animation questions...
Date: 17 Feb 2004 17:00:30
Message: <40328efe$1@news.povray.org>
Carl Hoff e-mailed this to me:
> Ok... I see what you are doing now I think.  To be honest I want the
> effect to continue around corners a little so I can work with that.  The
> main problem I'm having isn't with the effect at the head of the trail.
> That will be moving with the bike.  Where I'm having the hardest time
> with is simply how to draw the trail.  Its fixed in position and growing.
> I can of course break each line segment into its own little animation
> and deal with it that way but say I wanted to animate your sphere
> sweep having it start with zero length till it covered the whole path at
> the end.  I can animate a sphere moving along a linear_spline but
> at present I'm not sure how to animate a sphere moving along a
> linear_spline leaving the bent cylinder behind it.  The other issue I
> see coming (I'm not to this point yet) but lets say the object I'm
> animating along the linear_spline isn't a sphere but it has a defined
> front and back.  At a given point along the linear spline how do I
> define forward?  And to take this one dimension farther if the cycle
> can drive up walls how do I define up?
And I'm posting it here so I don't get backed into a corner (pun intended)
alone while trying to help him.

Hi Carl.

Well, glad you explained that this is about tacking a trail start down and
stretching it along from there. I wasn't catching onto that idea at all,
before now. I was only thinking of a blur left behind the bike. Looking at
TRON DVD on shelf and it doesn't even show any of that, must see movie
again.

Growing the trail along as the bike moves... guess that could be done...
maybe by giving the sphere_sweep the number of points as 'frame_number'. Or
at least some integer based on it. Then the points could be gathered from an
'array', previously set up, invoking them via a 'while' loop which uses the
point count to pull them out of the array.

Make sense? Gee, I hope somebody else out there knows what we're talking
about and has some ideas too. I never became a wizard at using arrays in
POV. Thinking it over, I'm not so sure it could be done this way.

What you asked about the front/back or leading/trailing sides is simply a
matter of pulling a vector from out of the spline by its time (or t) value.
Such as I did to place the light_source ahead of center. It's just any
amount +/- of the clock, in that example. And then the question about going
up walls would be done by adding y values to the sphere_sweep and spline
vectors.

-- 
Bob H.
http://www.3digitaleyes.com


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 17 Feb 2004 17:54:00
Message: <40329b88@news.povray.org>
> And I'm posting it here so I don't get backed into a corner
> (pun intended) alone while trying to help him.

Arg!!! Arg!!! Arg!!! I'm so sorry about that.  Darn Outlook
Express has the "Reply Group" button right next to the "Reply"
button. You aren't the first I've made that mistake with.  I didn't
even know I'd done that this time till I saw your reply here.

> Hi Carl.

Hello Bob,

> Well, glad you explained that this is about tacking a trail start
> down and stretching it along from there. I wasn't catching onto
> that idea at all, before now.

I was initially trying to find out what the best way to do that
was.  I.e. stretch the shape or put the shape in place first with
a texture like this "color transmit 1.0" and stretch a visable
texture over it from the start.  At the moment I'm not sure how
to do either though.

> I was only thinking of a blur left behind the bike. Looking at
> TRON DVD on shelf and it doesn't even show any of that,
> must see movie again.

The bike only leaves a permanent trail when its on the game
grid.  With a little digging I'm sure I could find a nice screen
grab from the movie. But here is a picture I've already made
with POV-Ray.  Check it out:

http://www.tron-sector.com/gallery/show.aspx?ID=1037

I can make just about any still image I want and now I'm
trying to to take a stab at animation.

> Growing the trail along as the bike moves... guess that
> could be done... maybe by giving the sphere_sweep the
> number of points as 'frame_number'. Or at least some
> integer based on it. Then the points could be gathered
> from an 'array', previously set up, invoking them via a
> 'while' loop which uses the point count to pull them out
> of the array.
>
> Make sense?

Yes... I think so.  But I'm not sure I can pull that off.

> Gee, I hope somebody else out there knows what we're
> talking about and has some ideas too. I never became a
> wizard at using arrays in POV. Thinking it over, I'm not
> so sure it could be done this way.

Well the simple way is to make once scene file for each
strait segment but I think I can do better then that.  Plus
once I start put in more then one bike it would be nice
to have a macro that I could put 2 or 3 paths into and
sit back and watch the bikes go.

> What you asked about the front/back or leading/trailing
> sides is simply a matter of pulling a vector from out of the
> spline by its time (or t) value. Such as I did to place the
> light_source ahead of center. It's just any amount +/- of
> the clock, in that example. And then the question about
> going up walls would be done by adding y values to the
> sphere_sweep and spline vectors.

Thanks... that sounds simple enough.

Carl


Post a reply to this message

From: Hughes, B 
Subject: Re: Light Cycle animation questions...
Date: 17 Feb 2004 19:37:15
Message: <4032b3bb$1@news.povray.org>
"Carl Hoff" <hof### [at] wtnet> wrote in message news:40329b88@news.povray.org...
> > And I'm posting it here so I don't get backed into a corner
> > (pun intended) alone while trying to help him.
>
> Arg!!! Arg!!! Arg!!! I'm so sorry about that.  Darn Outlook
> Express has the "Reply Group" button right next to the "Reply"

You're not the only one. Maybe we can blame this button-pushing world.

> The bike only leaves a permanent trail when its on the game
> grid.  With a little digging I'm sure I could find a nice screen
> grab from the movie. But here is a picture I've already made
> with POV-Ray.  Check it out:
>
> http://www.tron-sector.com/gallery/show.aspx?ID=1037
>
> I can make just about any still image I want and now I'm
> trying to to take a stab at animation.

You do stills very well. I've seen some of this from you already.

> > Growing the trail along as the bike moves... guess that
> > could be done... maybe by giving the sphere_sweep the
> > number of points as 'frame_number'. Or at least some
> > integer based on it. Then the points could be gathered
> > from an 'array', previously set up, invoking them via a
> > 'while' loop which uses the point count to pull them out
> > of the array.
> >
> > Make sense?
>
> Yes... I think so.  But I'm not sure I can pull that off.

Now I have tried while-looping the spline into the sphere_sweep. The thing
drew out a line alright, except it apparently only used the first and last
points. Nothing inbetween. As you might have a look at yourself using the
previous script and this in place of its sphere_sweep:


#local Frame=frame_number;
#local Points=0;

sphere_sweep {
 linear_spline
 Frame+1, // must have at least two points
 SpaceTime(0),1 // starting point
 #while (Points<Frame)
 SpaceTime(clock),1 // only last recognized?
 #local Points=Points+1;
 #end
pigment {color red 1}
}


If this were capable of storing each and every vector given it from the
spline and loop I think it'd work fine.

Bob H.


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 17 Feb 2004 20:05:47
Message: <4032ba6b@news.povray.org>
> > What you asked about the front/back or leading/trailing
> > sides is simply a matter of pulling a vector from out of the
> > spline by its time (or t) value. Such as I did to place the
> > light_source ahead of center. It's just any amount +/- of
> > the clock, in that example. And then the question about
> > going up walls would be done by adding y values to the
> > sphere_sweep and spline vectors.
>
> Thanks... that sounds simple enough.

Ummm... it just hit me that only takes care of forward and
back.  In 2D that's fine but if my bike climbs walls, I can
point it forward but how do I know the wheels will be on
the floor (or wall in this case)?  Think of unit vectors pointing
in the x/forward direction, y/upward direction, and z/left
direction coming from the point that's traveling along the
spline.  The above tells me how to define x but if I can climb
walls or fly I need to know how to find y or z.  One will
give me the other but at the moment I'm not sure how to
find either.

Carl


Post a reply to this message

From: Hughes, B 
Subject: Re: Light Cycle animation questions...
Date: 17 Feb 2004 21:21:28
Message: <4032cc28$1@news.povray.org>
"Carl Hoff" <hof### [at] wtnet> wrote in message news:4032ba6b@news.povray.org...
> > > What you asked about the front/back or leading/trailing
> > > sides is simply a matter of pulling a vector from out of the
> > > spline by its time (or t) value. Such as I did to place the
> > > light_source ahead of center. It's just any amount +/- of
> > > the clock, in that example. And then the question about
> > > going up walls would be done by adding y values to the
> > > sphere_sweep and spline vectors.
> >
> > Thanks... that sounds simple enough.
>
> Ummm... it just hit me that only takes care of forward and
> back.  In 2D that's fine but if my bike climbs walls, I can
> point it forward but how do I know the wheels will be on
> the floor (or wall in this case)?  Think of unit vectors pointing
> in the x/forward direction, y/upward direction, and z/left
> direction coming from the point that's traveling along the
> spline.  The above tells me how to define x but if I can climb
> walls or fly I need to know how to find y or z.  One will
> give me the other but at the moment I'm not sure how to
> find either.

You might be thinking too hard and overlooking the simplicity of it. The
splines have all three axes. Or I'm not thinking hard enough. Maybe you're
needing a way to create the path based on what the room shape is and
obstacles in it? If so, then 'trace' is probably the answer. That could be
applied to sense surroundings, but it can slow up animations.

I had figured you would be plotting out the path yourself though, in
advance. If that were the case, all you'd do is set the vectors to include
each value, i.e. <0,0,0> to <1,0,0> to <1,1,0> moves forward (+x) then stays
at x*1 but moves up y*1.

Hopefully I'm still shedding some light.


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 18 Feb 2004 11:29:39
Message: <403392f3@news.povray.org>
> You might be thinking too hard and overlooking the simplicity of it.

Probably...

> The splines have all three axes. Or I'm not thinking hard enough.
> Maybe you're needing a way to create the path based on what
> the room shape is and obstacles in it? If so, then 'trace' is
> probably the answer. That could be applied to sense surroundings,
> but it can slow up animations.

No... I'm more thinking along the lines of having no room, no floors,
no walls.  Do you have the "3D Pipes" screen saver that comes with
Windows.  Run that with the settings of
Pipes: Multiple
Pipe Style: Traditional
Joint Type: Elbow
Surface Style: Solid
And it will show you the effect I'm trying to get.  Now stick a
"Light Flyer" in front of each Pipe that's creating the trail behind
it much like the Light Cycles do.

If one follows this path:
<0,0,0> to <1,0,0> to <1,1,0>   the "Light Flyer" is going up
                                                  into the y-direction

And have another follow this path:
<0,0,0> to <0,0,1> to <0,1,1>  this "Light Flyer" is now also
                                                 hearded up into the
y-direction.

If the observer is standing at <0,0,-10> he'll see the side of
the first "Light Flyer" and the top of the second.  So I need to
know more then just which direction they are headed in.  At
the start of each path I want each "Light Flyer" parked with
its top pointed in the y-direction but after it makes a few turns
I'm not sure how to tell POV-Ray where up is any longer.

For the above two examples:
At the end of path 1 I need to know: forward = y up = -x
At the end of path 2 I need to know: forward = y up = -z

However all this at the moment is overshadowed by the
problem that I can't even animate the trails forming.

> I had figured you would be plotting out the path yourself
> though, in advance.

Yes... I will be.

> If that were the case, all you'd do is set the vectors to
> include each value, i.e. <0,0,0> to <1,0,0> to <1,1,0>
> moves forward (+x) then stays at x*1 but moves up y*1.

I follow that... and as long as I'm just flying a sphere around
the screen that will work.  Now I want the sphere to leave a
trail and I want to give the sphere a shape that will need to
be properly positioned at the head of the trail.

Am I defining the problem clearly?

Carl


Post a reply to this message

From: Hughes, B 
Subject: Re: Light Cycle animation questions...
Date: 19 Feb 2004 01:22:37
Message: <4034562d@news.povray.org>
"Carl Hoff" <hof### [at] wtnet> wrote in message news:403392f3@news.povray.org...
> >
> > Maybe you're needing a way to create the path based on what
> > the room shape is and obstacles in it?
>
> No... I'm more thinking along the lines of having no room, no floors,
> no walls.  Do you have the "3D Pipes" screen saver that comes with
> Windows.

Yep. I understand. With trails being only a segment of a pipe, longer or
shorter based on speed I presume.

> the start of each path I want each "Light Flyer" parked with
> its top pointed in the y-direction but after it makes a few turns
> I'm not sure how to tell POV-Ray where up is any longer.
>
> At the end of path 1 I need to know: forward = y up = -x
> At the end of path 2 I need to know: forward = y up = -z
>
> However all this at the moment is overshadowed by the
> problem that I can't even animate the trails forming.
>
> Am I defining the problem clearly?

As a bell... I'm just not thinking good this time of night. And I'm
beginning to think this thread ought to move on to the general or
advanced-users group.

A motion spline and sphere_sweep can definitely be done, unchanging in
number of points but changing vectors so that it moves away from its last
position and stretching in a manner consistent with speed. What I hadn't
considered before is that you're intending to orient the objects in more
than one plane so that the objects will have varying ups. But that shouldn't
matter really. Hmmmm, before I forget what I'm saying I'll write it out in
SDL form to make more sense of it.

spline {
    linear_spline
    5,
    t1,<x1,y1,z1>,
    t2,<x2,y2,z2>,
    t3,<x3,y3,z3>,
    t4,<x4,y4,z4>,
    t5,<x5,y5,z5>
}

So the variables would need to range farther apart as time goes by. Say all
start at zero, next the 1's remain at zero but each of the others increase,
with other t's always being of higher value than the previous. The xyz 2's
through 5's would need to increase toward their intended paths while
shifting from the 5's back toward the 1's as time goes along.

Just wish I were thinking more clearly to figure what would be the best way
to do that.

Bob H.


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 19 Feb 2004 09:29:18
Message: <4034c83e@news.povray.org>
> Yep. I understand. With trails being only a segment of a pipe,
> longer or shorter based on speed I presume.

Each trail will be a linear spline if that's what you mean by
segment of pipe.  Its more then just the last cylinder on the
spline.  For now I'm assuming all the 'flyers' have a fixed
constant speed.  So if all started at the same time they would
all have the same total length.  The number of bends would
depend on the path they took.  The length of the individual
cylinders (what I think you may mean by segment) only
depends on the path chosen, not speed.  At some point I'll
play with giving the 'flyers' variable speed but I don't expect
that to be too hard once I've got the constant speed problem
fixed.

> As a bell... I'm just not thinking good this time of night. And
> I'm beginning to think this thread ought to move on to the
> general or advanced-users group.

Ok... Let me think of the best way to state this problem and
I'll make a post in the general group.  Its just that I consider
myself very new to this and I didn't think this problem was
as hard as I was making it.  Maybe it is.

> A motion spline and sphere_sweep can definitely be done,
> unchanging in number of points but changing vectors so that
> it moves away from its last position and stretching in a
> manner consistent with speed.

Yes... that's what I want.

> What I hadn't considered before is that you're intending to
> orient the objects in more than one plane so that the objects
> will have varying ups.

I'll be doing both.  I want to do some clasic Light Cycle
animations where they will be leaving trails on a 2D grid.
In those cases up will always be +y.  But I also want to
play with light flyers on a 3D game grid.  So I want to
solve the more general problem.

> But that shouldn't matter really. Hmmmm, before I forget
> what I'm saying I'll write it out in SDL form to make more
> sense of it.
>
> spline {
>     linear_spline
>     5,
>     t1,<x1,y1,z1>,
>     t2,<x2,y2,z2>,
>     t3,<x3,y3,z3>,
>     t4,<x4,y4,z4>,
>     t5,<x5,y5,z5>
> }

Yes... something like this:

spline {
  linear_spline
  5,
  0.0, <0,0,0>
  0.1, <0,0,1>
  0.3, <2,0,1>
  0.6, <2,3,1>
  1.0, <2,3,5>
}

Note:  its easy enough to choose the times and the segment
lengths such that the flyer will have a constant speed.

> So the variables would need to range farther apart as time
> goes by. Say all start at zero, next the 1's remain at zero but
> each of the others increase, with other t's always being of
> higher value than the previous. The xyz 2's through 5's
> would need to increase toward their intended paths while
> shifting from the 5's back toward the 1's as time goes along.

Ok... you lost me.  The path doesn't need to stop where it
started.  And the location of the bends is fixed.  And I assume
its ok to assume they'll all start at zero.  When I animate more
then one 'light flyer' though the paths should never cross so
they will be starting at different points.  The paths can be
chosen manually to assure they don't cross though.  To somehow
automate the process of path generation is more work then
I wanted to put into this.  It would be nice to be able to pull a
few paths out of the "3D Pipes" screen saver as that is the
effect I'm trying to copy but I can make my own.

> Just wish I were thinking more clearly to figure what would be
> the best way to do that.

Oh I've got some of my own ideas.  For the above 5 segment
path I could have 5 different sphere sweeps.  The first could look
like this:

sphere_sweep {
  linear_spline
  2,
  <0,0,0>
  <0,0,clock*10>

And have alot of If statements such the the above was only
used between 0 and 0.1 clock values.

But I want a macro that I can feed a series of points to and
have it do all that for me.  The above way would be a very
manual process that would have to be redone for each
different path.  I'm thinking surely there has to be a better
way.  Say I define the spline as path_1.  I'd like to be able
to do:

sphere_sweep {
   clock/1 of path_1

So when the clock has a value of 0.5 I'll get just the first
half of path_1.  After that's solved I need to be able to define
up as a function of clock.  Forward I see how to do.

Thanks,
Carl


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 19 Feb 2004 09:54:18
Message: <4034ce1a@news.povray.org>
> As a bell... I'm just not thinking good this time of night. And I'm
> beginning to think this thread ought to move on to the general or
> advanced-users group.

See the thread I just started called "Spline animation question..."
in the general group.  I hope I've defined the problem concisely
and clearly over there.  I think I fell a little short of that goal here.

Thanks again for all the help,
Carl


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 22 Feb 2004 00:42:12
Message: <40384134$1@news.povray.org>
> > Am I defining the problem clearly?
>
> As a bell...

Ok... I've found a solution to both of my problems.  I've posted code that
does what I want it to over in povray.binaries.scene-files.  Please feel
free to take a look.  Two other problems that I came across in this
situation were:

(1) The same issue bongotastic had with splines of variable length.  In my
code if I change the number of points in my spline I have to change
path1_num, the array path1, and edit my path1_spline declaration.  It really
seems I should be able to do this in a general way and not have to change
the path1_spline declaration but I couldn't find a way to do it.

(2) It proved to be harder then I thought to position an object that's
defined with forward in the x-direction and up in the y-direction to a new
set of forward and up vectors.  I got something that works but I think I did
it in a very ugly way.  Surely there is a more general way of doing this.

Anyways please feel to play with the code I posted and I welcome any
constructive feedback anyone wants to share.

Thanks,
Carl


Post a reply to this message

From: Carl Hoff
Subject: Re: Light Cycle animation questions...
Date: 22 Feb 2004 09:14:22
Message: <4038b93e$1@news.povray.org>
> (1) The same issue bongotastic had with splines of variable length.
> In my code if I change the number of points in my spline I have to
> change path1_num, the array path1, and edit my path1_spline
> declaration.  It really seems I should be able to do this in a general
> way and not have to change the path1_spline declaration but I
> couldn't find a way to do it.

This problem is fixed with the help of bongotastic's thread in
povray.newusers.

#declare path1_spline = spline {
  linear_spline
  #declare ctr = 0;
  #while (ctr < path1_num - 0.5)
    path1_seg_time[ctr], path1[ctr][0],
    #declare ctr = ctr + 1;
  #end
}

> (2) It proved to be harder then I thought to position an object that's
> defined with forward in the x-direction and up in the y-direction to a
> new set of forward and up vectors.  I got something that works but
> I think I did it in a very ugly way.  Surely there is a more general
> way of doing this.

Still thinking about this one.

Carl


Post a reply to this message

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