Elvas Tower: Procedural track shapes - Elvas Tower

Jump to content

  • 14 Pages +
  • « First
  • 11
  • 12
  • 13
  • 14
  • You cannot start a new topic
  • You cannot reply to this topic

Procedural track shapes Get rid of GLOBAL Rate Topic: -----

#121 User is offline   WaltN 

  • Open Rails Developer
  • Group: Status: R.I.P. or just Retired
  • Posts: 1,086
  • Joined: 28-February 10
  • Gender:Male
  • Location:Vestal, New York
  • Simulator:Open Rails, MSTS
  • Country:

Posted 12 September 2018 - 04:57 AM

View Postlongiron, on 12 September 2018 - 04:36 AM, said:

I don't know how other train sim programs solve the issue - but they "appear" to have.

How soon we forget! Think back to your Lionel or American Flyer days. Track was sectional -- rigid body. What happened when we tried to run it up-grade on piers? The curve section on the grade wasn't level at the far end. Only slightly off, we simply twisted the curve section -- ever so slightly -- and tacked it down.

#122 User is offline   jtr1962 

  • Fireman
  • Group: Status: Active Member
  • Posts: 178
  • Joined: 13-December 09
  • Gender:Male
  • Country:

Posted 12 September 2018 - 09:00 AM

View PostWaltN, on 12 September 2018 - 04:26 AM, said:

OR does procedural curves (DT) exactly the way that MSTS does, simply because of a desire for MSTS compatibility. If OR modified its current behavior, every route created for MSTS would have to be reworked so that DT sections match up with following sections. What would you do if you were in OR Development.

Yes and no. The traveler part of OR works exactly the same over procedural curves as MSTS. The train remains hozizontal in the y-axis. The shape generation part doesn't appear to be working the same. Look at my second screenshot in post #106. OR doesn't keep procedural track parallel to horizontal in the y-axis as MSTS does. Rather, it treats the curves as rigid sections. End result is that one end is tilted. Therefore, when the train goes over that portion of track, one set of wheels is well above the track, and the other set is well below the track. On most routes this wouldn't be apparent to the eye given the much lower gradients, plus the fact most routes use only very short pieces of dynamic track. In the Arollercoaster route, it's very apparent.

OR needs to modify its behavior with regard to shape generation only. Procedural track should always be parallel to horizontal in the y-axis unless of course it's superelevated.

#123 User is offline   jtr1962 

  • Fireman
  • Group: Status: Active Member
  • Posts: 178
  • Joined: 13-December 09
  • Gender:Male
  • Country:

Posted 12 September 2018 - 09:02 AM

View PostWaltN, on 12 September 2018 - 04:57 AM, said:

How soon we forget! Think back to your Lionel or American Flyer days. Track was sectional -- rigid body. What happened when we tried to run it up-grade on piers? The curve section on the grade wasn't level at the far end. Only slightly off, we simply twisted the curve section -- ever so slightly -- and tacked it down.

That's one reason sectional track generally isn't used as much these days. Flex track largely solves the problem. By definition it's flexible, and can twist, as well as bend, to follow the profile of the roadbed.

#124 User is offline   mopacfan 

  • Fireman
  • Group: Status: Active Member
  • Posts: 168
  • Joined: 27-September 14
  • Gender:Female
  • Simulator:Open Rails
  • Country:

Posted 12 September 2018 - 09:49 AM

Hi Goku,

Can you please provide an update on how a TSRE user might be able to eventually use your procedural track feature to replace long sections of existing track in a route? I hope that my question makes sense.

#125 User is offline   WaltN 

  • Open Rails Developer
  • Group: Status: R.I.P. or just Retired
  • Posts: 1,086
  • Joined: 28-February 10
  • Gender:Male
  • Location:Vestal, New York
  • Simulator:Open Rails, MSTS
  • Country:

Posted 15 September 2018 - 05:40 AM

This is the analysis that I promised.

In the drawing below are shown two views of a rigid-body curve (red), first in plan view (x, z), and second in a right-side view (y, z). The (x, y, z) axes of the coordinate system are shown. The circular arc is generated by a parameter, ϴ. ϴ is termed the generator of the curve. For compatibility with MSTS, the circular arc in plan view must be rotated to represent a track gradient. An arbitrary point on the curve is shown as P, P(x, z) in the plan view and P(y, z) in the right-side view. The curve is seen in the right-side view as a straight black line.

Attached File  Quadrant.gif (5.72K)
Number of downloads: 3

To develop formulas for the shape of the curve developed by MSTS, we refer to the two views in the drawing above. First, we develop expressions for x’, y’, and z’, which are coordinates in the unrotated plan view (x, z):

x’ = -R (1 - cos ϴ)
y’ = 0 (before the rotation to achieve a gradient, y’ is 0)
z’ = R sin ϴ

Then we rotate the plane of the curve by angle ϵ to achieve our grade expressions:

x = x’
y = z’ sin ϵ
z = z’ cos ϵ

Substituting expressions for x’ and z’,

x = -R (1 - cos ϴ)
y = R sin ϴ sin ϵ
z = R sin ϴ cos ϵ

The red curve in the plot below is the formula for y.

Attached File  Plywood.gif (4.32K)
Number of downloads: 0

Let’s spot-check the ends as a “sanity” check. First, for ϴ = 0:

x = y = z = 0 CHECK

Then, at ϴ = π/2 (90°) and for, say, ϵ = 3°:

x = -R = -100
y= R sin ϵ = 5.233595624 COMPUTED WITH DOUBLE-PRECISION
z = R cos ϵ = 99.86295348 COMPUTED WITH DOUBLE PRECISION

Note that neither y nor z is an expected value. The value y is way below the expected grade for a full quadrant of arc (shown by the green line), and z is 137 mm short, a consequence of the rigid body rotation.

With those unexpected results, let’s take a look at the slope of the curve.

Slope in a curve in three-space (3D space) is defined as the rate of change of vertical distance (y) with respect to the distance, call it s, travelled along the curve. Fortunately for us, the curve is a circular arc, and s = R ϴ.

Deriving an expression for the slope requires us of differential calculus. The slope is defined as:

dy/ds = (dy/dϴ) (dϴ/ds)
But y = R sin ϴ sin ϵ and s = R ϴ.
dy/ds = (R sin ϵ cos ϴ) (1 / R) = sin ϵ cos ϴ

And here’s the plot:

Attached File  Slope.gif (3.75K)
Number of downloads: 0

The initial slope is sin 3° = 0.05233595624.

Understand that this consequence is true for all MSTS track – not just dynamic track. For static sections, the same thing is true once arc lengths grow long. The effect is there; the only question is whether it’s noticeable.

Somewhere in this topic in recent weeks, I said something that was all wet. I said that grades are measured by rise over run. That’s fine – and correct, but which is which? Rise is rise, the change in elevation. I claimed that run is the distance along the grade – the hypotenuse. Wrong! Trains magazine corrected me:

"In North America, gradient is expressed in terms of the number of feet of rise per 100 feet of horizontal distance. Two examples: if a track rises 1 foot over a distance of 100 feet, the gradient is said to be "1 percent;" a rise of 2 and-a-half feet would be a grade of "2.5 percent." In other parts of the world, particularly Britain and places with heavy British influence, gradients are expressed in terms of the horizontal distance required to achieve a 1-foot rise. This system would term the above examples "1 in 100" and "1 in 40," respectively."


For a 3° grade, the grade slope ratio would be tan 3° = 0.05240777928.

Please let me know of any errors or misstatements in this. In the coming week, I’ll try to crank out a formula for what the space curve should be to produce a constant specified slope on a circular arc curve.

#126 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,359
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 15 September 2018 - 10:20 AM

Walt, this really means if someone set down 3 or 4 curves matching the specifications in your second image he'd have a rather bumpy grade, right?.

Do I infer correctly that we never noticed this thru the fortuitous combination of using relatively shorter lengths curved segments and lower grades?

I expect the facts you've reported here does have an impact on train performance in OR and MSTS... grades made easier to ascend.

#127 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 15 September 2018 - 10:36 AM

The effect is not noticeable for most of the track shapes. Curves up to 20d are safe.
The elevation error is corresponding to rail bump. If you don't see any gap between tracks, then the elevation/slope error not exist. If you see small gap, then the error is small.
If the slope error is relevant, then huge gap between rails of next track will be visible.

#128 User is offline   WaltN 

  • Open Rails Developer
  • Group: Status: R.I.P. or just Retired
  • Posts: 1,086
  • Joined: 28-February 10
  • Gender:Male
  • Location:Vestal, New York
  • Simulator:Open Rails, MSTS
  • Country:

Posted 16 September 2018 - 08:41 AM

View PostGenma Saotome, on 15 September 2018 - 10:20 AM, said:

Walt, this really means if someone set down 3 or 4 curves matching the specifications in your second image he'd have a rather bumpy grade, right?.

Do I infer correctly that we never noticed this thru the fortuitous combination of using relatively shorter lengths curved segments and lower grades?

I expect the facts you've reported here does have an impact on train performance in OR and MSTS... grades made easier to ascend.

  • I agree with your first statement. Shortly after I discovered (in 2010) that MSTS rotated sections as rigid bodies, I re-laid the curve that I discovered it on -- by dividing and conquering. The curve is DL&W's where the track does a big U-turn, turning almost a 180 to ascend South Hill in Ithaca, New York. The first DT section I replaced was a full 1.57 radians at R = 440 meters. I replaced that by 9 sections -- the first eight at .175 radians and a ninth with the remainder length. That, in order to meet my standards. I really think that the choice should be made by the route developer.

  • As I said above, the work-around occurred to me almost immediately, and I don't think I'm particularly creative. I'm much more likely to start working on a solution that was correct, which is what I did. Unfortunately, there was no alternative route editor in 2010.

  • I would expect it does -- for long DT curves. Like this one in three DT sections --

Attached File  Tehachapi Loop.jpg (161.35K)
Number of downloads: 2

#129 User is offline   WaltN 

  • Open Rails Developer
  • Group: Status: R.I.P. or just Retired
  • Posts: 1,086
  • Joined: 28-February 10
  • Gender:Male
  • Location:Vestal, New York
  • Simulator:Open Rails, MSTS
  • Country:

Posted 16 September 2018 - 09:13 AM

View PostGoku, on 15 September 2018 - 10:36 AM, said:

The effect is not noticeable for most of the track shapes. Curves up to 20d are safe.
The elevation error is corresponding to rail bump. If you don't see any gap between tracks, then the elevation/slope error not exist. If you see small gap, then the error is small.
If the slope error is relevant, then huge gap between rails of next track will be visible.

I agree with your first sentence, except that plot is for one radius -- 100 meters. The elevation discrepancy will grow proportionately with radius.

I think I had a language problem in your second -- with "gap." A rail gap is typically a longitudinal offset. I think you're talking about a vertical offset, that is, in height. Interpreted that way, I agree.

True.

Goku, I can't help but wonder why it is that you seem resistant to doing procedural curves on a grade properly -- that is as helixes. They're as easy to generate as circular arcs. You just add a vertical offset proportional to the distance along the arc.

#130 User is offline   WaltN 

  • Open Rails Developer
  • Group: Status: R.I.P. or just Retired
  • Posts: 1,086
  • Joined: 28-February 10
  • Gender:Male
  • Location:Vestal, New York
  • Simulator:Open Rails, MSTS
  • Country:

Posted 16 September 2018 - 09:32 AM

Attached File  x.gif (37.25K)
Number of downloads: 0

This plot regards a topic that I did not cover in my recent analysis. It shows the twist in the rails (red) corresponding to the centerline (green) of the curve. The blue line was the sought grade.


The plot dates to April 2010 when it was plotted based on values logged from OR. Dave and Chris will remember this well. The twist will exaggerate vertical discrepancies on one rail while reducing it on the other.

  • 14 Pages +
  • « First
  • 11
  • 12
  • 13
  • 14
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users