How is the GroundPolylinePrimitive implemented

How is the texture coordinates of the GroundPolylinePrimitive calculated, or can someone tell me how it fits the terrain?

Hi there,

This blog post by Gary describes how this feature was implemented.