Re: [Algorithms] Tangential Curvature of terrain
Brought to you by:
vexxed72
From: Klaus H. <k_h...@os...> - 2000-08-21 21:47:55
|
Thather, and Ron... Thanks a lot for your replies :) From: Ron Levine <ro...@do...> > Only if you can better explain what is meant by "tangential > curvature", not a standard mathematical term. It might be a standard > GIS term, but I could not find a real definition of the term on the > uiuc GIS site that you cite. The image you cite, at first sight, > suggests to me a couple of possible definitions, but on closer > examination of its coloring I can eliminate one, and am left with one > guess: I knew you would say that, and I cannot blame you :) It took me almost half a year to find the technical term for what I'm trying to do. Now that I know that it's called tangential curvature (which is an obsolete name for meridional curvature) I'm at least able to find some information on the net... but not too much. A hopefully good definition of tangential curvature (as used in GIS) can be found here: http://www.orbtek.com/glossary/definitions/tangentialcurvature.html I'm now trying to give you a brief overview of how those GIS people compute the tangential curvature, and after that I'll briefly explain why I'd like to implement this. [1] Tangential curvature Unfortunately, I'm not a mathematician, and I can only *try* to summarize what a certain GIS paper says. Basically, I'll just copy some parts of the paper. I hope that it's enough for you to understand. " Surface geometry can be analyzed efficiently when the surface is interpolated with a bivariate function z = f(x, y), that is continuous up to second order derivatives and when parameters characterizing surface geomoetry (topographic parameters) are expressed VIA derivates of this function. This approach is demonstrated on the computation of basic topographic parameters: slope, aspect, profile curvature, plan curvature, tangential curvature, and on the computation of flow path length. Before deriving mathematical expressions for these parameters, using the basic principles of differential geometry, the following simplifying notations are introduced: fx = Dz/Dx fy = Dz/Dy fxx = (D^2)z/Dx^2 fyy = (D^2)z/Dy^2 fxy = (D^2)z/(DxDy) and p = (f^2)x + (f^2)y q = p + 1 " (Note, that I'm using a capital 'D' here, where the paper uses the Greek letter delta). Unfortunately, we used a different notation in school. So I can only guess, that fx and fy are first derivatives, and fxx, fyy, fxy are second derivatives. But we never differentiated bivariate functions (which is my biggest problem). " For the study of flow divergence/convergence, it is more appropriate to introduce a curvature measured in the normal plane in the direction perpendicular to gradient. This curvature will be called here a tangential curvature because the direction perpendicular to gradient is, in fact, the direction of tangent to contour at a given point. Equations for these curvatures can be derived using the general equation for curvature K of a plane section through a point on a surface: K = (fxx * cos^2(B1) + 2*fxy*cos(B1)*cos(B2) + fyy*cos^2(B2)) / (sqrt(q) * cos L) where L (lamdba) is the angle between the normal to the surface at a given point and the section plane; B1 (beta 1), B2 (beta 2) are angles between the tangent of the given normal section at a point and axes x, y, respectively. " Whatever that means... And then, a bit later in the text, they give the formula for tangential curvature: "The equation for tangential curvature Kt at a given point is derived as the curvature of normal plane section in a direction perpendicular to gradient (direction of tangent to the contour line) after setting cos L = 1 cos B1 = fy / sqrt(p) cos B2 = -fx / sqrt(p) and Kt = (fxx*fy^2 - 2*fxy*fx*fy + fyy*fx^2) / (p * sqrt(q)) " I only understand fractions of the above, and that's why I'm not able to implement it. [2] What I want to do... Assume that you wanted to synthesize a texture for a height field. A simple approach is to make each texel's color depend on the elevation E of the corresponding data point P in the height field. For example, you could say "Use snow, if the elevation E falls above a lower elevation limit H (say 1000 meters). If E <= H, then just use rock.". If I now knew the tangantial curvature, T, (as a scalar) at the data point P, then I could modify the elevation H in the following fashion: H' = H - T * D, where D is some scaling factor that increases/decreses the effect (negative T means convex up, and positive T means concave down). My new classification would now become: "Use snow, if the elevation E falls above a lower elevation limit H' (say 1000 meters). If E <= H', then just use rock.". Using such an approach, I can make the flow of the snow care about the shape of the terrain. For example, I can make tongues of snow that flow from the peak of a mountain, through concave down areas, all the way into the valley. At the same time, the rock 'flows' from the valley, over convex up areas, towards the peak. No need to say, that this produces very realistic effects. In Questar Productions' World Construction Set 2, for example, they call this the 'relative elevation effect'. Also, thanks for the other pointers you gave. I'll not comment on them now, because I'd like think about them, before I say something stupid :) Thanks, Niki |