Several implementations of calculating mean, gaussian, and normal surface curvature along with principal curvature and respective directions.
The functions allow the surface to be defined either symbolically (with sympy) or discretely. You can of course take a discrete surface and fit a polynomial to the data to create a symbolic expression of the surface. Or vice-vera, by taking a symbolic function and picking out a set of data points along the surface to use for discrete evaluation.
The data can be either explicit z = f(x,y) or parametric (u,v) --> < x(u,v), y(u,v), z(u,v) >
There is yet another way to define a surface, implicitly F(x,y,z) = 0, but I have not created the functions for it yet.
These are most likely not the fastest or optimized ways to do the calculations, instead, they are meant to be a medium to learn differential geometry and how the formulas are implemented into computer code.
- Symbolic
- Explicit
- Mean
- Gaussian
- Principal
- Principal vectors
- Parametric
- Mean
- Gaussian
- Principal
- Principal vectors
- Explicit
- Discrete
- Explicit orthogonal (monge patch)
- Mean
- Gaussian
- Principal
- Principal vectors
- Parametric
- Mean
- Gaussian
- Principal
- Principal vectors
- Arbitrary Mesh
- Mark Meyer, Mathieu Desbrun, Peter Schröder and Alan H. Barr. Discrete Differential-Geometry Operators for Triangulated 2-Manifolds. Caltech, USC, 2002.
- see
example/DiffGeoOps.ipynb
- see
- Rusinkiewicz, Szymon. Estimating Curvatures and Their Derivatives on Triangle Meshes. Princeton University, 2004.
- D. Panozzo, E. Puppo, L. Rocca. Efficient Multi-scale Curvature and Crease Estimation. DISI - Universita di Genova, 2010. (Using a localized fitting of surface to each vertex normal for computing curvature. polynomial regression, quadratic fitting or quadratic interpolation on the nearby vertices around the point to calculate principal curvatures.)
- Mark Meyer, Mathieu Desbrun, Peter Schröder and Alan H. Barr. Discrete Differential-Geometry Operators for Triangulated 2-Manifolds. Caltech, USC, 2002.
- Explicit orthogonal (monge patch)
This project is managed by uv.
uv run python -m unittest discover .\tests\
uv version --bump minor
uv build
uv publish
- https://en.wikipedia.org/wiki/Differential_geometry_of_surfaces
- https://en.wikipedia.org/wiki/Curvature
- https://en.wikipedia.org/wiki/Principal_curvature
- https://en.wikipedia.org/wiki/Mean_curvature
- https://en.wikipedia.org/wiki/Gaussian_curvature
- https://en.wikipedia.org/wiki/Parametric_surface#Curvature
- https://e.math.cornell.edu/people/belk/differentialgeometry/Outline%20-%20The%20Gauss%20Map.pdf
- Keenan Crane (see KeenanCraneLect15.ipynb)
- https://brickisland.net/DDGFall2017/wp-content/uploads/2017/10/CMU_DDG_Fall2017_08_Surfaces.pdf
- https://www.youtube.com/watch?v=e-erMrqBd1w
- http://wordpress.discretization.de/geometryprocessingandapplicationsws19/a-quick-and-dirty-introduction-to-the-curvature-of-surfaces/
- https://brickisland.net/DDGSpring2021/wp-content/uploads/2020/04/DDG_458_SP20_Lecture18_LaplaceOperator.pdf
- https://mathworld.wolfram.com/MeanCurvature.html
- https://liavas.net/courses/math430/files/Surfaces.pdf
- https://jhavaldar.github.io/assets/2017-07-16-diffgeo-notes5.pdf
- https://github.com/sujithTSR/surface-curvature/blob/master/surface.py
- https://www.mathworks.com/matlabcentral/fileexchange/11168-surface-curvature
Curvedness = sqrt((k1**2 + k2**2)/2)- Laplacian (Laplace-Beltrami operator)
- https://www.appstate.edu/~greenwaldsj/class/4140/shapeoperator.pdf
- https://youtu.be/UYiAlYlSwBo?si=t2bkEyCyQkWdh4f-
-
2004 Caltech Paper over Discrete Surface Curvature approach
-
2004 Princeton Paper for "Estimating Curvatures and Their Derivatives on Triangle Meshes"
-
Keenan Crane
-
2010 Panozzo - Quadratic Fitting
-
2021
-
https://github.com/alecjacobson/geometry-processing-curvature (See 2010 Panozzo)
-
https://github.com/cuge1995/curvature-calculation-python/blob/main/plcurvature.py
-
https://jhavaldar.github.io/assets/2017-07-16-diffgeo-notes5.pdf
-
https://github.com/pmp-library/pmp-library/blob/main/src/pmp/algorithms/curvature.cpp
-
https://booksite.elsevier.com/samplechapters/9780120887354/9780120887354.PDF

