POV-Ray : Newsgroups : povray.newusers : Extruding Along a Curve : Re: Extruding Along a Curve Server Time
30 Jul 2024 10:20:30 EDT (-0400)
  Re: Extruding Along a Curve  
From: Tim Soderstrom
Date: 30 May 2004 15:01:26
Message: <20040530140117.60dc1187.tigerhawk@stic.net>
Actually I may have spoken too soon :) Digging out some good 'ole Trig I was able to
figure out how to make a very nice looking curve using splines. The problem is, I want
to basically extrude a spline, or complex CSG object (which serve as the rails on the
track) along a splined path assuring that it does not distort along the curve. The
examples from the link squashed the isosurface as it moved along.

The code I have thus far is this (modified from an example in the Pov-Ray docs):
camera { location <0,4,0> look_at 0 }
                                                                                
light_source { <-5,30,-10> 1 }
#declare MySpline =
  spline {
//    cubic_spline
//    quadratic_spline
    natural_spline
    #declare counter = 0;
    #while (counter < 2*pi/6)
        counter, <sin(counter), 0, cos(counter)>
        #declare counter = counter + pi/16;
    #end
  }
                                                                                
#declare ctr = 0;
#while (ctr < 10)
  sphere{
        MySpline(ctr),0.05
        pigment{ color<ctr, 1-ctr, 0> }
  }
  #declare ctr = ctr + 0.01;
#end
                                                                                

The sphere is of course the item I want to convert into a CSG object or a spline to
extrude along the path. The reason, by the way, that I want to use CSG or a spline for
the rails is that I can use that same definition for other track as well - of course
using the technique for the curves I want to use I could do the same for the straight
peices as well I suppose. In any case, I tried playing around with boxes and things
but that produced screwy results :) I'm not quite sure how the spline fits in with the
object definition, since you can just change 'sphere' to 'box' and it works.

Any ideas about how to do that?
Tim




On Sun, 30 May 2004 11:31:26 -0500
Tim Soderstrom <tig### [at] sticnet> wrote:

> Oh ok. Gotcha. Thanks for clearing that up!
> 
> Tim
> 
> 
> On Sun, 30 May 2004 09:50:39 GMT
> "Geezer" <gqu### [at] attnet> wrote:
> 
> > 
> > "Tim Soderstrom" <tig### [at] sticnet> wrote in message
> > news:200### [at] sticnet...
> > > *OH* ok. That cleared things up quite a bit, thanks! I hadn't expected
> > that much depth, but it certainly was quite interesting to read. I didn't
> > know model railroading was that varied, to be honest. So in a nutshell, On30
> > is HO but for narrow gauge railroad models?
> > 
> > No!
> > You must separate scale (the proportion to real full size) and gauge (space
> > between the rails).  HO, O, S, N etc. all refer to Scale.  HO scale is 3.5
> > mm = 1 foot, or 1:87.1 proportion.  HO with no following symbols means
> > standard gauge (56.5 real inches between the rails) for HO scale, which is
> > 16.5 mm gauge.  HO followed by an "n" and a number indicates HO proportion
> > but modeling a narrow gauge prototype.  "...HO for narrow gauge railroad
> > models" would be HOn3 or HOn30 or HOn2.
> > So your correct statement should have been:
> > "So in a nutshell, On30 is O scale but for 30" narrow gauge railroad models,
> > using HO track for convenience."
> > 
> > In your earlier post, you also asked, "As far as On30 itself; why is it
> > popular exactly? Are the trains themselves more to scale than HO trains?"
> > Bruce's very good reply addressed the first part.  The answer to the second
> > part is that On30 is actually less to scale than most HO.  First, most of
> > the prototypes used by Bachmann and others for On30 are of 3' gauge
> > equipment (since 30" narrow gauge was not very common in the US, but people
> > are familiar with the Durango & Silverton, Cumbres & Toltec, and East Broad
> > Top), so they are "less to scale" in that they have the wrong gauge trucks
> > to be accurate models.  Bachmann also slightly reduced the width of many of
> > their models, I believe so that the trains would clear each other side to
> > side on commercial HO track passing siding geometries.  And track made for
> > HO has incorrect tie size and tie spacing for 1:48 proportion (although Peco
> > makes 16.5 mm gauge track with 1:48 proportion ties).  But for all of that,
> > On30 looks good, runs very well, and has more of the "heft" that makes O
> > scale popular.  Gary Q
> > 
> > 
> 
> 
> -- 
> /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
> | Tim Soderstrom                                                       |
> | Mig### [at] mailutexasedu                                            |
> | http://www.moocowproductions.org                                     |
> |                                                                      | 
> | "Life is like a box of chocolates - never know what you gonna get"   |
> |                                                    -Forrest Gump     |
> \                                                                      /
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-- 
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Tim Soderstrom                                                       |
| Mig### [at] mailutexasedu                                            |
| http://www.moocowproductions.org                                     |
|                                                                      | 
| "Life is like a box of chocolates - never know what you gonna get"   |
|                                                    -Forrest Gump     |
\                                                                      /
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


On Sun, 30 May 2004 10:23:42 -0500
Tim Soderstrom <tig### [at] sticnet> wrote:

> Ah that'll work perfect! Thanks for the info!
> 
> Tim
> 
> 
> On 30 May 2004 03:52:10 -0400
> ingo <ing### [at] tagpovrayorg> wrote:
> 
> > in news:200### [at] sticnet Tim Soderstrom
> > wrote: 
> > 
> > > [...] but this time I was hoping to be able to do things like extrude
> > > a shape (say an I shaped rail) along a curve for a given
> > > circumference. Assuming I can do that, I also wanted to place the
> > > Railroad ties along the curve as well [...]
> > 
> > It's been done for you,
> > 
> > have a look at the end of this page plus download the zip.
> > http://www.econym.demon.co.uk/isotut/more.htm
> > 
> > or for an alternative:
> > 
> > Newsgroups: povray.binaries.utilities
> > Subject: Striscia, extruder/lofter
> > From: ingo <ing### [at] tagpovrayorg>
> > Message-ID: <Xns94D4AF6BE46A0seed7@news.povray.org>
> > Date: 23 Apr 2004 11:15:11 -0400
> > Xref: news.povray.org povray.binaries.utilities:3720
> > 
> > Ingo
> 
> 
> -- 
> /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
> | Tim Soderstrom                                                       |
> | Mig### [at] mailutexasedu                                            |
> | http://www.moocowproductions.org                                     |
> |                                                                      | 
> | "Life is like a box of chocolates - never know what you gonna get"   |
> |                                                    -Forrest Gump     |
> \                                                                      /
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-- 
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Tim Soderstrom                                                       |
| Mig### [at] mailutexasedu                                            |
| http://www.moocowproductions.org                                     |
|                                                                      | 
| "Life is like a box of chocolates - never know what you gonna get"   |
|                                                    -Forrest Gump     |
\                                                                      /
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Post a reply to this message

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