POV-Ray : Newsgroups : povray.advanced-users : Calculating curvature of a surface? : Re: Calculating curvature of a surface? Server Time
30 Jul 2024 08:24:31 EDT (-0400)
  Re: Calculating curvature of a surface?  
From: Fabian Brau
Date: 3 Dec 1999 03:30:41
Message: <38478039.91C3DEE1@umh.ac.be>
> My question is: what is a good way of calculating the curvature of a
> surface given several points on a surface and normals at those
> points(and of course, the number of samples)?

Hello Chris,

first suppose that you have only a 2d curve (any kind of curve, of
line). 
Knowing the normals of some points means that you know the derivative of
the 
curve at these points (the normal will be perpendicular to the
derivative). 
So knowing some point and the derivative of the curve at this point, 
the best you can do is an interpolation (with polynomials for example). 
This also call "spline interpolation". But you cannot be sure that the 
curve you obtain by interpolation is the "real" curve! This is easy to 
understand:

draw some points on a sheet of paper and define the normal of the curve 
at these points, it is easy to see that there are an infinity of curve 
which will pass by these point with the correct normals!

The problem is well defined only if you know what curve it is. For 
example if this is a straight line so knowing two point (without knowing
the derivative) is enough to calculate the equation of the curve. 
if this is a second degree curve (parabola for example). Three point are
needed.
Generally, if this is a polynomial with a degre n you need n+1 point.
But now if the curve is not a polynomial and/or you don't know the kind
of curve,
you can only do an interpolation! If you believe that the curve is quite
smooth,
a quadratic or a cubic spline is good. If not, there are two solution:
take a higher 
degree for the polynomial or take more points.
Povray already do this kind of thing with lathe and bicubic patch.

Now for a 3D surfaces, the problem is technically more difficult. 
I will not explain in detail here but the answer is the same:
if you know some points (even a important number!) and the normal,
in general you cannot know the curve, you must do some interpolation!

I hope this help you.

I have read your proposition to do a .math news group.
If some need help with math (and IF THE ANSWER DON'T TAKE 10 PAGES!!),
you can post with a title like "math question" or e-mail me, I will do 
my best to answer (I am doing a thesis in theoretical physics, and 
there are plenty mathematician at the university :)). I know 
that there many other users of povray that can also give 
a good (or a better) answer. I just propose this to help :). 

Fabian.



Chris Huff wrote:
> 
> I am working on a curvature pattern, inspired by the patina thread,
> which would be for textures only(it would return a constant value if
> used in media density). It would return a value depending on the amount
> the surface the evaluation point is on is curving.
> 
> I am doing this by getting the normal at the evaluation point, using
> that normal to find a point directly "up" at that point, and firing
> several sample rays at the surface. I can either fire the rays in a ring
> at an equal angle to the normal at the evaluation point, or randomly
> inside a cone.
> My question is: what is a good way of calculating the curvature of a
> surface given several points on a surface and normals at those
> points(and of course, the number of samples)?
> I am thinking the pattern should work return a value between 0 for
> maximum curvature away from the normal of the evaluation point and 1 for
> maximum curvature toward the normal. But I am not even really sure what
> "maximum curvature" is. :-)
> 
> I have considered using the average vdot of the sample normals with the
> normal of the evaluation point, the average distance of the sample
> points from the point the samples are shot from, using parallel sample
> rays instead of rays originating from a point...
> 
> --
> Chris Huff
> e-mail: chr### [at] yahoocom
> Web page: http://chrishuff.dhs.org/


Post a reply to this message

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