POV-Ray : Newsgroups : povray.binaries.images : Wooden Trains : Re: Wooden Trains Server Time
1 Aug 2024 16:30:10 EDT (-0400)
  Re: Wooden Trains  
From: Warp
Date: 20 May 2008 12:16:21
Message: <4832f955$1@news.povray.org>
Blue Herring wrote:
> Thanks.  No, not yet, that's probably the biggest todo I have for this.  Haven't
> really come up with a good way to do this yet, so I've largely concentrated on
> the modeling so far.  The track pieces aren't hard to place manually, the
> trains are a little trickier, but doing too many of either quickly gets
> tedious.  It would be much better to have some easier more scalable way of
> doing it.

  Ideally it could be, for example, a macro which takes an array as
parameter. This array would contain eg. ID (or index) values (perhaps
identifiers declared by the include file), each one denoting a piece of
track. The macro would then build the whole track from this array,
rotating and translating the pieces appropriately.

  Of course the problem becomes with bifurcating tracks: How to specify
how the track continues with the other bifurcation? Maybe the include
file could internally keep track of what it has constructed already, and
the macro above could take an index value which tells it "attach the
track defined by this array to the existing track, at the bifurcation at
place n", or something similar.

  Then another macro would be needed to create a train at a certain
position in the track. Again, bifurcations become difficult because the
user would have to be able to somehow specify which bifurcation is used.

  This can become programmatically quite difficult quite fast, but I
believe it's entirely possible to implement. IMO they key is to make it
as easy as physically possible for the user to create the tracks with
the least amount of effort. (This is usually my design principle when I
design libraries, regardless of the language used.)


Post a reply to this message

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