.. _channel_surfaces: ----------------------------------- Channel Surfaces and Focal Surfaces ----------------------------------- .. image:: channel_surface.jpg :width: 70% :align: center In this example we construct channel surfaces and focal surfaces. We start with a discrete one-parameter family of spheres. The channel surface can be obtained by choosing a circle on the first, or any, sphere and iteratively applying sphere inversions in the mid-spheres of anti-similitude. This will construct a discrete surface with planar, even circular faces. The circles can be used to define normal lines for the faces, the normal lines being orthogonal to the face and passing through the circles center. From the obtained normal line congruence we construct the two discrete focal surfaces by intersecting successive normal lines for each parameter direction. One of the focal surfaces degenerates to a discrete curve, which always is the case for channel surfaces. The main part of the example consists of a function taking as an argument a name for an example (`smooth` or `discrete`). We will go through the discrete example in this guide. Download the full script here: :download:`channel_surfaces.py <../../../../examples/blender/geometry/channel_surfaces.py>`. Very similar methods for sphere inversions and envelopes (in 2 dimensions) were introduced in the example :ref:`envelope_orth_trajectory_circles`. In some cases we will just refer to this example and refrain from detailed explanations here. .. contents:: :local: :backlinks: none Setup ===== We start off by importing the necessary libraries, clearing the scene and initializing the projective and the Moebius geometric model of three dimensional Euclidean space. .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [setup-1] :end-before: [setup-1] The One-Parameter Family of Spheres =================================== The main script starts by defining a lot of helper functions. In the end the examples will be generated only by suitable composition of these functions. A lot of the functions are straight forward, and we will not explicitly include all of them here. Furthermore, a lot of them have already been defined in the example on :ref:`envelope_orth_trajectory_circles`. Now lets get started by defining a discrete curve in :math:`\mathbb{R}^3`, radii of spheres associated to the vertices and some initial values. .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [example-1] :end-before: [example-1] We can define the one-parameter family of spheres as a discrete function and further, define their lift to homogeneous coordinates in :math:`\mathbb{R}^{4, 1}` of the form :math:`\frac{1}{r}(c, \frac{1}{2}(||c||^2 - r^2 + 1) , \frac{1}{2}(||c||^2 - r^2 - 1))`. .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [example-2] :end-before: [example-2] .. image:: 01_sphere_family_combined.jpg :width: 100% :align: center | The Channel Surface =================== We can use the homogeneous coordinates to find the mid-spheres, in particular the spheres of anti-similitude (see :ref:`envelope_orth_trajectory_circles`). .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [example-3] :end-before: [example-3] .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [example-4] :end-before: [example-4] .. image:: 02_channel_surface_combined.jpg :width: 100% :align: center The visualization is also done by using helper functions and can be found as the last section of this guide. | Circumcircles and Normal Lines ============================== .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [example-5] :end-before: [example-5] .. image:: 03_circular_faces_combined.jpg :width: 100% :align: center | .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [example-6] :end-before: [example-6] For each parameter line in the first parameter direction the corresponding circles lie on a sphere, the curvature sphere (nicely to see in the right picture below). All the normal lines corresponding to this family in the first parameter direction pass through the spheres center. .. image:: 04_normal_line_congruence_combined.jpg :width: 100% :align: center | The Focal Surfaces ================== .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [example-7] :end-before: [example-7] .. image:: 05_focal_surface_combined.jpg :width: 100% :align: center | Visualization ============= With all this setup done, we can now visualize this in Blender. We start by defining some colors and helper functions. For some functions the discrete domain may be clipped at the start or at the end. For this we also use a helper function. .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [visualization-1] :end-before: [visualization-1] For each example ("smooth"/"discrete") we add a set of collections ... .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [visualization-2] :end-before: [visualization-2] ... and visualize all the objects. .. literalinclude:: ../../../../examples/blender/geometry/channel_surfaces.py :language: python :start-after: [visualization-3] :end-before: [visualization-3] The script further includes adding lights and cameras and setting up the scene for rendering.