POV-Ray : Newsgroups : povray.animations : Train Server Time
28 Apr 2024 02:31:16 EDT (-0400)
  Train (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Chris B
Subject: Re: Train
Date: 19 Jul 2008 06:50:31
Message: <4881c6f7@news.povray.org>
"HelveticaFanatic" <nomail@nomail> wrote in message 
news:web.4881a898729c10115f60ef1e0@news.povray.org...
> "HelveticaFanatic" <nomail@nomail> wrote:
>> How can I make an animation of a train that follows curves and elevation? 
>> Is
>> there anyway to lay track on it, either?
>>
> I coded this and got a tunnel:
> ....
> #declare Train_Path = spline {
> cubic_spline
> -2, <0, 0, -10>,
> -1, <0, 0, -5>,
> 0, <0, 0, 0>,
> 250, <0, 0, 250>,
> 300, <30, 0, 290>,
> 350, <60, 0, 330>,
> 600, <60, 0, 580>,
> 601, <60, 0, 590>,
> 602, <60, 0, 600>
> }
>
> But it's a very sad tunnel:
>
> http://www.flickr.com/photos/helveticafanatic/2681282339/
>
> What is wrong? Do I need more keypoints or something?
>

I suspect you wanted a shape a bit more like in the example below. I think 
the problem was mainly that you were using very small increments at the 
start and end of your spline and large increments in the middle. I find it 
best to use a more uniform distribution of points along the curve.

>
> In tunnel planning, though, I should draw it on graph paper and find the 
> key
> points, right?
>

It's easier to use a spline editor or a vector graphics program than doing 
it on paper.


camera{location 2000*y look_at 0}
light_source{<1,100,-30> rgb 1}

#declare Train_Path = spline {
 cubic_spline
 -20, <0, 0, -10>,
 -10, <0, 0, -5>,
 0, <0, 0, 0>,
 250, <0, 0, 250>,
 300, <30, 0, 290>,
 350, <60, 0, 330>,
 600, <60, 0, 580>,
 610, <60, 0, 590>,
 620, <60, 0, 600>
}

sphere_sweep {
  cubic_spline
  605,
  #local I = -2;
  #while (I<603)
    Train_Path(I),10
    #local I = I + 1;
  #end
  texture {pigment {rgb <1,0,0>} finish {ambient 1}}
}


Post a reply to this message

From: HelveticaFanatic
Subject: Re: Train
Date: 7 Aug 2008 23:55:00
Message: <web.489bc30f729c10116cb6cc0b0@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:
> "HelveticaFanatic" <nomail@nomail> wrote in message
> news:web.4881a898729c10115f60ef1e0@news.povray.org...
> > "HelveticaFanatic" <nomail@nomail> wrote:
> >> How can I make an animation of a train that follows curves and elevation?
> >> Is
> >> there anyway to lay track on it, either?
> >>
> > I coded this and got a tunnel:
> > ....
> > #declare Train_Path = spline {
> > cubic_spline
> > -2, <0, 0, -10>,
> > -1, <0, 0, -5>,
> > 0, <0, 0, 0>,
> > 250, <0, 0, 250>,
> > 300, <30, 0, 290>,
> > 350, <60, 0, 330>,
> > 600, <60, 0, 580>,
> > 601, <60, 0, 590>,
> > 602, <60, 0, 600>
> > }
> >
> > But it's a very sad tunnel:
> >
> > http://www.flickr.com/photos/helveticafanatic/2681282339/
> >
> > What is wrong? Do I need more keypoints or something?
> >
>
> I suspect you wanted a shape a bit more like in the example below. I think
> the problem was mainly that you were using very small increments at the
> start and end of your spline and large increments in the middle. I find it
> best to use a more uniform distribution of points along the curve.
>
> >
> > In tunnel planning, though, I should draw it on graph paper and find the
> > key
> > points, right?
> >
>
> It's easier to use a spline editor or a vector graphics program than doing
> it on paper.
>
>
> camera{location 2000*y look_at 0}
> light_source{<1,100,-30> rgb 1}
>
> #declare Train_Path = spline {
>  cubic_spline
>  -20, <0, 0, -10>,
>  -10, <0, 0, -5>,
>  0, <0, 0, 0>,
>  250, <0, 0, 250>,
>  300, <30, 0, 290>,
>  350, <60, 0, 330>,
>  600, <60, 0, 580>,
>  610, <60, 0, 590>,
>  620, <60, 0, 600>
> }
>
> sphere_sweep {
>   cubic_spline
>   605,
>   #local I = -2;
>   #while (I<603)
>     Train_Path(I),10
>     #local I = I + 1;
>   #end
>   texture {pigment {rgb <1,0,0>} finish {ambient 1}}
> }

What should I use for making the splines on a Mac?


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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