diff --git a/docs/examples/plane-cutting-cylinder.html b/docs/examples/plane-cutting-cylinder.html new file mode 100644 index 0000000..6a61134 --- /dev/null +++ b/docs/examples/plane-cutting-cylinder.html @@ -0,0 +1,87 @@ + + +Plane Cutting a Cylinder + + + + + + + + + + +

A plane cutting a cylinder always produces an ellipse:

+ +
+ +
+ +

A cylinder along the x-axis has the equation of a circle, independent of this variable:

+ +\[ y^2 + z^2 = 1 \] + +

A vertical plane through the origin has no z-dependence:

+ +\[ n_x x + n_y y = x \cos\phi + y \sin\phi = 0 \] + +

Taking y as the independent variable, a parametrization of the intersection is

+ +\[ \left[ -y \tan\phi, y, z \right] = \left[ -y \tan\phi, y, \sqrt{1-y^2} \right] \] + +

Squaring and summing the first two coordinates on the left-hand side gives

+ +\[ y^2 (\tan^2\phi + 1) = y^2 \sec^2\phi \] + +

so that the parametrization represents the ellipse

+ +\[ \frac{ x^2 + y^2 }{ \sec^2\phi } + z^2 = 1 \] + +

For numerical efficiency the variable y is replaced by a circular function in the code.

+ +

Complete code for this example:

+ +

+
+
+
+

Examples Page

+ + +