Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-02-06 05:54:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-06 05:55:20 +0300
commit4cbf2ebdc924db94681bb154e58385f32d1ba9a3 (patch)
treec2ce303a2671c6a2fbce6d900d45447d7eeada1b /source/blender/modifiers/intern/MOD_normal_edit.c
parentced4c5fe2260489f44a38498c3adfd3333215a26 (diff)
Cleanup: style
Diffstat (limited to 'source/blender/modifiers/intern/MOD_normal_edit.c')
-rw-r--r--source/blender/modifiers/intern/MOD_normal_edit.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c
index 39881f474b0..3bf60519530 100644
--- a/source/blender/modifiers/intern/MOD_normal_edit.c
+++ b/source/blender/modifiers/intern/MOD_normal_edit.c
@@ -164,14 +164,19 @@ static void normalEditModifier_do_radial(
generate_vert_coordinates(dm, ob, smd->target, smd->offset, num_verts, cos, size);
- /* size gives us our spheroid coefficients (A, B, C).
+ /**
+ * size gives us our spheroid coefficients ``(A, B, C)``.
* Then, we want to find out for each vert its (a, b, c) triple (proportional to (A, B, C) one).
*
- * Ellipsoid basic equation: (x^2/a^2) + (y^2/b^2) + (z^2/c^2) = 1.
+ * Ellipsoid basic equation: ``(x^2/a^2) + (y^2/b^2) + (z^2/c^2) = 1.``
* Since we want to find (a, b, c) matching this equation and proportional to (A, B, C), we can do:
+ * <pre>
* m = B / A
* n = C / A
+ * </pre>
+ *
* hence:
+ * <pre>
* (x^2/a^2) + (y^2/b^2) + (z^2/c^2) = 1
* -> b^2*c^2*x^2 + a^2*c^2*y^2 + a^2*b^2*z^2 = a^2*b^2*c^2
* b = ma
@@ -181,9 +186,12 @@ static void normalEditModifier_do_radial(
* -> a^2 = (m^2*n^2*x^2 + n^2y^2 + m^2z^2) / (m^2*n^2) = x^2 + (y^2 / m^2) + (z^2 / n^2)
* -> b^2 = (m^2*n^2*x^2 + n^2y^2 + m^2z^2) / (n^2) = (m^2 * x^2) + y^2 + (m^2 * z^2 / n^2)
* -> c^2 = (m^2*n^2*x^2 + n^2y^2 + m^2z^2) / (m^2) = (n^2 * x^2) + (n^2 * y^2 / m^2) + z^2
+ * </pre>
*
* All we have to do now is compute normal of the spheroid at that point:
+ * <pre>
* n = (x / a^2, y / b^2, z / c^2)
+ * </pre>
* And we are done!
*/
{