Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently trying to figure out the insane marching cube algorithm (a.k.a. "3D contouring" or "Surface reconstruction"). According to Paul Bourke,

The position that it [the isosurface] cuts the edge will be linearly interpolated, the ratio of the length between the two vertices will be the same as the ratio of the isosurface value to the values at the vertices of the grid cell.

I can't seem to wrap my head around this statement. Does he mean something like: $$\frac{L_1}{L_2}=\frac{I}{I_1+I_2}$$

Where $L_1$ is the distance between the cut and vertex 1, $L_2$ is the distance between the cut and vertex 2, $I$ is the isosurface level, $I_1$ is the isosurface value of vertex 1, and $I_2$ is the isosurface value of vertex 2.

Is this equation correct?

share|cite|improve this question
up vote 1 down vote accepted

It's not surprising that you can't seem to wrap your head around it; all the better for your head; it's terribly worded. No, that equation can't be correct, because you're forming the ratio of one value to the sum of two on the right-hand side, which yields $1/2$ for constant values whereas the left-hand side is not always $1/2$.

What he means is probably something like

$$ \frac{L_1}{L_2}=\frac{I-I_1}{I_2-I}\;, $$

but a more convenient form of that relationship is

$$ I=\frac{I_1L_2+I_2L_1}{L_1+L_2}\;. $$

share|cite|improve this answer
Must be. Thanks. – Daniel Pendergast Oct 27 '12 at 15:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.