In earnings reports these days, there has been plenty of talk of high energy prices. For many companies, the fuel-cost spike has dampened profitability. Even so, energy prices haven't been able to stall aggregate economic growth. Trinity Industries (NYSE:TRN) appears to be a major beneficiary of this dynamic of higher energy prices and ongoing economic growth.

Trinity had a glowing third quarter, with revenue up 31%, year over year, to $742.5 million, and operating profit rocketing to $58.9 million. Earnings per share (EPS) increased to $0.65 from breakeven, although this year's third quarter was helped by a one-time gain, and 2004's third-quarter EPS was weighed down by some one-time charges.

The "trinity" in Trinity's name may refer to three major businesses: construction products, railcars (manufacturing and leasing), and inland barges. All three performed well, but railcar manufacturing and the barge unit made the major difference. Railcar manufacturing brought in $36 million in profits from operations, compared to $14.5 million loss, and the barge unit scored $4.7 million in operating profits versus a $1.7 million deficit.

Trinity, though, is increasingly looking more like a quartet, since a fourth major area, recently created by combining two smaller units, also played a significant role in growing profitability. Operating profit in the energy equipment segment, which among other things makes equipment for windmills, more than doubled to $8.4 million.

The factors driving Trinity's growth are easy to trace. Railroads (as well as barges) are low-cost shipping options in an environment of high energy prices and ongoing economic growth. Hence, Burlington Northern Santa Fe (NYSE:BNI) and Genesee & Wyoming (NYSE:GWR) are enjoying robust demand. Naturally, railroads need cars to ship their goods, and that's where Trinity comes in. In addition, the rising cost of natural gas is prompting greater demand for coal, as reflected in improving results at Arch Coal (NYSE:ACI) and Foundation Coal (NYSE:FCL). Since coal is typically transported via rail, again, Trinity wins through burgeoning demand for coal cars.

As for its energy unit, higher natural gas prices are making wind power more competitive in terms of price. And, of course, Congress' renewal of tax credits for wind power is likely to keep demand in that area solid.

For now, everything seems to be working in Trinity's favor. While the current dynamic won't last forever, solid backlog suggests that the company has plenty of time left in its current sweet spot.

Can you dig it? Read these:

Are you looking for help finding great stocks at great prices? Let Fool co-founders Tom and David Gardner and their Motley Fool Stock Advisor analysts do it for you. Get your free trial to the service today.

The Motley Fool has kicked off its ninth annual Foolanthropy campaign! Nominate your favorite charities on our Foolanthropy discussion board through Nov. 6. For guidelines on what makes a charity Foolish, visit www.foolanthropy.com .

Fool contributor Brian Gorman is a freelance writer in Chicago. He does not own shares of any companies mentioned in this article.