-------- Caustics -------- .. image:: caustics_theoretical.png :width: 100% .. image:: caustics_real.png :width: 100% This example visualizes mathematical and physical caustics. It shows how to construct and visualize a planar caustic with variable reflection curve and light source. We construct the mathematical caustics as the enveloppe of the reflection of light rays on a curve. The physical caustics are simulated using Blender's built-in raytracer Cycles. The curves in this example are discrete arcs of a circle. The example includes 2 mathematical constructions: - 1. Parallel incoming light rays reflected on an half circle result in a **nephroid** caustic. .. image:: cardioid.gif :width: 80% - 2. Radial incoming light rays orgiginated from a point on a circle result in a **cardioid** caustic. .. image:: nephroid.gif Furthermore this example includes a physical simulating of the first construction. You can download the full script :download:`caustics.py <../../../../../examples/blender/docs/tutorials_and_examples/caustics.py>`, or find it, separated in sections, below. Be aware that the example, at the end, contains settings for internal snapshot testing. Comment or remove these to apply the actual (rendering) settings of the example. .. contents:: :local: :backlinks: none Setup ===== .. literalinclude:: ../../../../../examples/blender/docs/tutorials_and_examples/caustics.py :language: python :start-after: [setup] :end-before: [setup] Helper Functions ================ Functions for creation of planar and spherical curvature circles and projections of objects (per index). .. literalinclude:: ../../../../../examples/blender/docs/tutorials_and_examples/caustics.py :language: python :start-after: [helper-functions] :end-before: [helper-functions] Parameters ========== .. literalinclude:: ../../../../../examples/blender/docs/tutorials_and_examples/caustics.py :language: python :start-after: [parameters] :end-before: [parameters] Visualization Setup =================== .. literalinclude:: ../../../../../examples/blender/docs/tutorials_and_examples/caustics.py :language: python :start-after: [visualization] :end-before: [visualization] Theoretical caustics ==================== .. literalinclude:: ../../../../../examples/blender/docs/tutorials_and_examples/caustics.py :language: python :start-after: [theoretical-construction] :end-before: [theoretical-construction] Physical caustics ================= .. literalinclude:: ../../../../../examples/blender/docs/tutorials_and_examples/caustics.py :language: python :start-after: [physical-construction] :end-before: [physical-construction]