------------------------------- Conics from Circles (Animation) ------------------------------- .. image:: render.gif :width: 500px :align: center This example demonstrates an animation illustrating the construction of an ellipse using circles in the Euclidean plane. You can see the full code at :download:`conics_from_circles.py <../../../../../examples/blender/geometry/conics_from_circles.py>`. .. contents:: :local: :backlinks: none Setup ===== We start off by importing the necessary libraries. .. literalinclude:: ../../../../../examples/blender/geometry/conics_from_circles.py :language: python :start-after: [setup-1] :end-before: [setup-1] We are also going to clear the whole scene and create the geometry we will be working in. .. literalinclude:: ../../../../../examples/blender/geometry/conics_from_circles.py :language: python :start-after: [setup-2] :end-before: [setup-2] Calculations ============ Now we are going to define the calculations necessary for this visualization. First we define a function calculates a smaller circle centered on the constructed ellipse and tangent to the larger circle. .. literalinclude:: ../../../../../examples/blender/geometry/conics_from_circles.py :language: python :start-after: [calculations-1] :end-before: [calculations-1] Then we are going to define the larger circle with a specified center (F2) and radius, as well as a point F1. .. literalinclude:: ../../../../../examples/blender/geometry/conics_from_circles.py :language: python :start-after: [calculations-2] :end-before: [calculations-2] Visualization ============= Now we can begin with the visualization process. We start off by setting up the camera and configuring some render settings. .. literalinclude:: ../../../../../examples/blender/geometry/conics_from_circles.py :language: python :start-after: [visualization-1] :end-before: [visualization-1] Next we create materials and colors. .. literalinclude:: ../../../../../examples/blender/geometry/conics_from_circles.py :language: python :start-after: [visualization-2] :end-before: [visualization-2] And now we can visualze the objects in Blender. .. literalinclude:: ../../../../../examples/blender/geometry/conics_from_circles.py :language: python :start-after: [visualization-3] :end-before: [visualization-3] Animation --------- Finally, to get the animations we first define the following function. .. literalinclude:: ../../../../../examples/blender/geometry/conics_from_circles.py :language: python :start-after: [animation-1] :end-before: [animation-1] And then set some animation settings. .. literalinclude:: ../../../../../examples/blender/geometry/conics_from_circles.py :language: python :start-after: [animation-2] :end-before: [animation-2]