Create turntable cameras ======================== This script creates a series of cameras orbiting a fixed point. .. note:: This script could also be modified to create spotlights around a point. .. literalinclude:: CreateTurntableCameras.py :linenos: :download:`Download example ` .. rubric:: Parameters Target The central point around which the cameras will orbit. Radius The distance between the target point and the camera. Please note that this is not the radius of the circle of cameras as it depends on elevation (except for 0° elevation). Elevation Elevation of the cameras from the horizontal plane. Steps The number of cameras to create. The spacing between the cameras will be :math:`\frac{360°}{steps}`. .. rubric:: Spherical coordinates .. plot:: pyplots/turntable.py The script uses `spherical coordinates`_ to compute the camera positions. This coordinate system is defined using 3 parameters. Azimuth The rotation around the vertical axis (Y axis). :math:`\varphi` in physics notation. Elevation The angle between the horizontal plane and the desired point. :math:`\theta` in physics notation. Radius The distance of the point from the center (:math:`r`). It is possible to convert these coordinates to cartesian coordinates using these formulas. .. math:: \begin{align} x &= r \cos\theta \, \cos\varphi \\ y &= r \sin\theta \\ z &= r \cos\theta \, \sin\varphi \end{align} Using spherical coordinates, it is easy to compute a circle of cameras: the azimuth is divided into steps, the elevation and radius are specified by the user. .. _spherical coordinates: https://en.wikipedia.org/wiki/Spherical_coordinate_system