5

This is my first foray outside of stack-overflow, so I hope this is an acceptable forum for this question.

I want to calculate a 'complexity' index based of 3D models. Currently I'm calculating the surface area and dividing it by the volume - but I'm pretty sure this isn't working correctly.

The goal would be an index where a cube might be a low value, while a sphere with lumps/bumps would be a much higher value.

Any help with this would be fantastic - I'm out of my depth!

An example of something that I would assume has a 'low', 'medium' and a 'higher' value of complexity are shown below:

enter image description here

enter image description here

enter image description here

Galaxy
  • 103
  • Would the variation in the gradient be closer to what you want? – Zach Stone Jun 18 '15 at 05:45
  • 1
    This is a Stack Exchange site, as a matter of fact. –  Jun 18 '15 at 05:48
  • @ZachStone I've updated the question with an image to provide some context. – Galaxy Jun 18 '15 at 06:08
  • 2
  • The "Quadratic type 1 surface" shown here looks connected to your example...BTW: when you put an extra "m" at the end of your image-link, e.g. http://i.stack.imgur.com/Is0gim.jpg they appear smaller. "s" makes them smallest... – draks ... Jun 24 '15 at 07:19
  • Thanks for your advice @dracks, I've looked at both fractal dimension and Hausdorff dimension and they seem to be what I'm looking for. I'm no maths wiz (I'm just making the 3D models). Is this something I can calculate with just surface area and volume? I 'm not sure if there's any other information I can take from the model... – Galaxy Jun 24 '15 at 10:09
  • Why is the scissor at medium level of complexity? – draks ... Jun 29 '15 at 13:30

2 Answers2

7

There are several good choices, depending on your needs.

The first thing that comes to mind is the Willmore energy

$$\int_S (H^2-K)\,dA$$ where $H$ is the mean curvature and $K$ the Gaussian curvature of the object at a point on the surface. By Gauss-Bonet you can write this energy as $$\int_S H^2\,dA - 4\pi(1-g)$$ where $g$ is the genus (number of holes) of the surface. The Willmore energy is always nonnegative, is zero for the sphere, and has a physical interpretations: it is the bending energy of a thin rubber sheet that is in the shape of your surface. The bumpier your shape, the higher this energy will be.

If you're interested in classifying the "smoothness" of polyhedra rather than smooth surfaces, there is a complication: how to discretize mean curvature? Commonly the following relationship is used: the gradient of the surface area of a surface is the mean curvature normal: $$\nabla A = 2H\hat{n}$$ this equation can be used to discretize mean curvature at a vertex $v_i$. Calculate the gradient of the polyhedron's surface area with respect to moving $v_i$ (note that this requires looking only at the neighboring faces to $v_i$) to get $$B_i^2H_i^2 = \frac{1}{4}\left\|\frac{\partial A}{\partial v_i}\right\|^2$$ where $B_i$ is the barycentric area of vertex $i$: one-third the sum of the surface areas of the faces neighboring $v_i$ (for triangular faces; divide the face area by four for quadrilaterals, etc). Then discretize the Willmore energy as $$\sum_i H_i^2 B_i - 4\pi(1-g)$$


Here's another possible measure, if your shape is star-shaped (every point on the boundary can be "seen" from the centroid of the object). Calculate the centroid $c$; you can now write every point on the surface in spherical coordinates $r(\theta,\phi)$ centered at $c$. To measure the bumpiness of the surface you can use the Dirichlet energy of $r$: $$\int_{S^2} \|\nabla r\|^2$$ which again is always nonnegative, is zero for the round sphere, and measures the "bumpiness" of the surface. One advantage of this definition is that the Dirichlet energy can be very easily computed from the discrete Fourier transform of $r$ (using spherical harmonics as the basis functions, since we are on the sphere).

user7530
  • 49,280
2

What you are asking is somewhat dependent on the scale of the protrusions you want to quantify.

On a large scale, you can measure to what extend the shape differs from the minimal surface enclosing the same volume, i.e. the sphere. A sphere would have the lowest complexity, an ellipsoid or a cube a little more and, say, a spring, much more. By the way, I would prefer to speak of ovality instead of complexity.

On a smaller scale, if you want to measure the local deviations from a flat surface, you need to have a smoother version of the shape with bumps and lumps more or less soften, and compare to the original shape. This is an uneasy task, also known as lowpass filtering, that requires to build a new facettized model. Instead of complexity, I would use the term roughness.

This said, a first and easy approach (that accounts for both ovality and roughness) is to relate the object area to the area of a sphere of the same volume, i.e.

$$A=\sqrt[3]{36\pi V^2}.$$

For a sphere, the ratio is $1$, for a cube $\sqrt[3]{\dfrac6\pi}=1.24$ and for a long rod of length $L$ and diameter $D$, $\sqrt[3]{\dfrac{4L}{9D}}$. For a sphere covered with small cubic bumps of side $C$, spaced by $C$, about $2$.

  • Does this mean that I need to use a 'base' shape to calculate complexity from? Could the the complexity of a 3D shape be based from a 2D plane? – Galaxy Jun 25 '15 at 02:05
  • Not at all to both. –  Jun 25 '15 at 06:48