Guidelines for Drawing Immersive Panoramas in Equirectangular Perspective

Virtual Reality (VR) Panoramas work by interactively creating immersive anamorphoses from spherical perspectives. These panoramas are usually photographic but a growing number of artists are making hand-drawn equirectangular perspectives in order to visualize them as VR panoramas. This is a practice with both artistic and didactic interest. However, these drawings are usually done by trial-and-error, with ad-hoc measurements and interpolation of pre-computed grids, a process with considerable limitations. We develop in this work the analytic tools for plotting great circles, straight line images and their vanishing points, and then provide guidelines for achieving these constructions in good approximation without computer calculations, through descriptive geometry diagrams that can be executed using only ruler, compass, and protractor.


INTRODUCTION
Virtual Reality panoramas are increasingly popular in social media. Facebook, Google, and Flickr all provide relatively easy ways for the user to upload his own 360 degree photographic panoramas and share them as VR experiences, as long as he has the right equipment. The image is uploaded as an equirectangular perspective picture and the platform's rendering software provides the VR experience, by monitoring the direction of view of the user's mobile phone or headset and displaying at each instant a plane perspective -in fact a conical anamorphosis -of a certain FOV from within the total picture. Although these panorama viewers were intended as a photographic display, some artists have chosen to subvert them to display drawn panoramas instead. The drawing is accepted by the VR rendering software after injection of the adequate EXIF information into the picture's file, which makes it pass for a photo from a supported 360-degree camera. There is an interesting collection of these drawings at Flickr's artistic panorama group [8]. See also the whimsical examples by David Anderson [2] and the virtuoso on-location drawings by Gerard Michél [11,12]. This interest in drawing VR panoramas seems part of a trend. Illustrators and urban sketchers (the present author being a member of both tribes) seem recently more interested in both curvilinear perspectives and anamorphoses. Such waves of enthusiasm seem to arise with every time anamorphosis finds a new technological expression. The current VR experience rehashes that of the now forgotten but once extremely popular 19th century panoramas for the display of which large rotundas were built [9], and, before that, the immersive spectacle of illusionary Church ceilings. These large scale immersive anamorphoses were drawn out in plan and elevation as if to build real architecture (and sometimes in replacement of such, as in the case of Andrea Pozzo's famous dome [10]), and then were painted as an optical illusion -a visual simulacrum -of the imagined object. Drawn VR panoramas provide an analogous experience, in a smaller, less expensive scale. Here too the artist starts with a flat perspective drawing and aims at an immersive experience. The difference is that, unlike the firmly grounded classical perspective work of Pozzos treatise [14], most equirectangular drawings are made by using precomputed grids, by sheer trial and error, or by merely drawing on top of photographs. There seems to be no comprehensive description available of the properties and constructions of equirectangular perspective that is adequate for a human draughtsman rather than a computer that can just brute force its way through any rendering. Artist's are notorious hackers of ad-hoc perspective, classical or otherwise, but this lack is more serious for educational applications. Anamorphosis is a good vehicle for teaching descriptive geometry to young students [4]. They motivate the student by allowing him to build a real, impressive object that he can share with his friends and whose construction both requires and facilitates the learning of descriptive geometry. VR panoramas integrate well with this approach since they enable the sharing in social networks not only of the static photograph of the resulting anamorphosis, but the actual immersive experience of the imagined object's visual presence. Yet there is more to this than mere motivational value. It can be argued that technology tends to generate a paradoxical type of ignorance regarding the very principles that it streamlines [17], and that this is true in particular of the naive use of digital tools in art [15]. That you can click a menu and get a perspective picture might be expected to enhance your knowledge of perspective, but instead hinders it, first by expressing it in terms of the machine's primitive operations rather than the human's (brute force pixel-by-pixel plots rather than ruler and compass operations) and then by black boxing the process out of view through abstraction and encapsulation, which itself limits one's modes of thought and expression [13]; instead of learning perspective one learns to turn the knobs on an opaque box whose interface, of a stranger's design, defines the scope of one's possible action and thought. There is a mode of knowledge of space and form that you only get from drawing with your hands and computing with your brain. The digital artist profits from making drawing a part of his flow even if drawing is not his goal. That he can get a perspective at the click of a button only makes it more urgent that he knows how to get one through his mind and hands. The machine should help us know rather than trapping us by making knowing seem unnecessary. As a foil to this trap, the present author has argued [5] for a "deliberate rudimentarization" or "cardboarding" in teaching the concepts behind digital tools -exposing the conceptual gears of digital black boxes by reducing them to their most basic physical expression. The aim is to translate between the human and the machine-executable, creating feedback loops between the two so as to enhance the understanding of both, and create locci for meaningful artistic intervention upon the tools themselves. VR visualization can be such a feedback loop between the human and the machine in the realm of curvilinear perspective rendering. A central curvilinear perspective can be seen as an entailment of two maps -a conical anamorphosis followed by a flattening [3]. Usually the anamorphosis remains merely conceptual -although some artists, notably Dick Termes [18] have explored it explicitely -as the artist works directly on the perspective due to the convenience of working on a plane. The VR display reverses the entailment, allowing for an analog spherical perspective, drawn by hand, to acquire its anamorphic (mimetic) character. As a didactic tool this allows the student to check the correctness of his perspective construction in the most direct manner. A curvilinear perspective drawing can be hard to interpret, but an anamorphosis is judged by eye: a line, planned out in spherical perspective, either looks straight in VR or it doesn't -allowing for an experiential confirmation of the successful perspective drawing. This specific type of visualization will in turn feed back into the drawing process, nor merely as a verification tool but as a motivator of specific aesthetics (the VR display is a reading mode and there is no such thing as a passive reading mode) and therefore of the need to solve geometric problems that derive from these aesthetic goals.
But if the VR panorama is to have such didactic applications, a clear method is required to plot the perspectives by hand, not only within precomputed grids (which are just another limiting black box), but for all general line projections. That is, one must solve the perspective. This is what I propose here, in two parts: First I develop the analytic and computational tools for the systematic plotting of great circles, straight line images and their vanishing points. Next, I provide diagrammatic methods to achieve these constructions without a computer, so as to draw general equirectangular projections, from observation or orthographic plans, using only ruler, compass, and protractor.

SOLVING EQUIRECTANGULAR PERSPECTIVE
A central perspective can be defined as a conical projection (anamorphosis) onto a surface, followed by a flattening map that maps the surface onto a plane. These include cylindrical perspective, (hemi-)spherical perspective, and several flavours of total spherical perspective.
In the spherical case, the anamorphosis is simply the map P → OP/|OP | where O is the center of the sphere, representing the observer's viewpoint. The flattenings are usually mappings well known from cartography. What is usually just called spherical perspective is anamorphosis onto a sphere followed by the azimuthal equidistant projection. The good thing about this projection is that lines are turned into approximate arcs of circle in the frontal hemisphere ([1], [7]) or, in the general case, into curves that can be obtained from these arcs by elementary means [3]. This facilitates solving by ruler and compass.
Equirectangular projections of lines are clearly not as simple as arcs of circle, as can be seen in a comparison of the two projections in fig. 1. This perspective has, however, some advantages: first, it is the standard input for VR panorama displays, so it would be nice to skip a conversion step (that always generates artefacts at the seams of the perspectives) and just use the available rendering engines. Second, its coordinates correspond to the natural angles that one measures in surveying. Third, it renders onto a rectangle rather than a disc, which accords well with the usual shape of drawing pads, sketchbooks and picture frames. For all these reasons it would be useful to solve this perspective. To solve a perspective means to give a classification of all lines and of their vanishing points, and a method to plot them in practice. It also implies a specification of means. Equirectangular perspective is trivially plotted point-bypoint by a computer, but we want it to be solvable with simple tools. The usual candidates are ruler and compass. For equirectangular perspective we need to add to these a protractor.

The equirectangular map projection and its perspective
We can define equirectangular perspective as the composition of conical anamorphosis onto the sphere followed by the equirectangular projection of the sphere onto the plane. This cartographic projection simply maps a point of the sphere with given longitude Figure 1: Equirectangular panorama of a cubical room seen from its center (left), compared with azimuthal equidistant perspective of the same (right). Drawings by the author. The VR panorama rendering is available at the author's website [6].
and latitude (λ, φ) to the point with the same cartesian coordinates at the center of the sphere O, such that (x, y) defines the equatorial plane, u z points at the north pole, and O + u x has zero longitude. In these coordinates, as a map from R 3 → R 2 , the equirectangular perspective is Note that we chose longitude as the first coordinate, unlike the usual geographical convention. Also, when it comes to drawing, it is useful to measure angles in degrees; we will switch units at convenience, asking the reader to be alert to the conversions assumed in the use of trigonometric functions. As for drawing, an A3 sheet will nicely fit a 360 × 180 [mm] drawing rectangle. We will display our longitudes in the interval [−180, 180] and latitudes in [−90, 90], so that (0, 0) sits at the center of the drawing rectangle.

Plotting a general spatial line
How you plot a general line depends on what you can measure. When drawing from orthographic plans (as an architect would) you can measure actual lengths and their ratios. When drawing from observation you measure only angles, and what angles are readily measurable depends on the circumstances of the view.
Whenever possible it is natural to measure a spatial line by rotating the view to face the vertical plane that contains it. For a viewer thus centered, the line will extend 90 degrees in opposite directions, ending on its two diametrically opposite vanishing points. From this viewpoint it is natural for the observer to measure both the angular elevation at which the line crosses his sagittal (0 • longitude) plane and the line's angle of incline at the crossing, that can be easily measured by tilting a pencil in front of one's eyes while taking care to keep it parallel to the vertical plane of the line. The action thus described implies the measuring of three angles (λ 0 , φ 0 , θ ) that fully determine the equirectangular perspective of the line, and that we will now define more carefully. There are two cases: Case 1: Let l be a spatial line such that O l and l is not on a vertical plane through O. Let l ′ be the orthogonal projection of l onto the equatorial plane. There is a point Q 0 such that OQ 0 and l ′ define a right angle ( fig. 2). Let λ 0 be the longitude of Q 0 . Let P 0 be the point of l lying on the vertical plane through OQ 0 . Let φ 0 be the latitude of P 0 . Let θ to be the incline of l, i.e., the angle between l and l ′ on the vertical plane through l.
We wish to plot a general line l of coordinates (λ 0 , φ 0 , θ ). Let's consider a generic point P on the line. We want to determine an expression φ(λ) = f (λ|λ 0 , φ 0 , θ ) for the latitude φ of P in terms of its longitude λ. Let Q be the orthogonal projection of P onto the equatorial plane.
So a general line of coordinates (λ 0 , φ 0 , θ ) can be plotted by the parametrization λ → φ(λ) = f (λ|λ 0 , φ 0 , θ ) given by Note we can solve for the special case λ 0 = 0 without loss of generality, since by rotational simmetry of the equirectangular projection around the z axis, the general case is obtained from this by f (λ|λ 0 , φ 0 , θ ) = f (λ − λ 0 |0, φ 0 , θ ). Hence we can draw any line as if it lies on the plane perpendicular to the (0 • , 0 • ) ray, and then shift it sideways to its correct position on the perspective plane. We can use this parametrization to draw a grid of horizontals and verticals at uniformly spaced angular intervals (fig 3 (top)). The map reduces to φ(λ|λ 0 , φ 0 , 0) = arctan(tan(φ 0 ) cos(λ − λ 0 )) in the case of horizontals. Qualitatively, we observe that the horizontals seem not  much different from arcs of circle right up to the 45 degree mark, and then grow more square as they approach 90 degrees. The lines become more complex for θ 0. In fig. 3 (bottom) we can see three families of parallel lines. From left to right we have θ = 15 • , 45 • and 75 • , with λ 0 = −90 • , 0 • , 90 • respectively, and lines in each family separated by intervals of 15 degrees of latitude. We see that as θ grows the lines become S-shaped, and then progressively sigmoidal, with the maximum of the curve being attained closer and closer to the vanishing point. These irregular lines may appear daunting to the analog draughtsman, but will become simpler once we see them within their great circles.

Drawing Great Circles
In any spherical perspective is it always smart to draw a line by first drawing its great circle and then delimiting the line on it through specification of the vanishing points. Recall some properties of spheres: a great circle is an intersection of the sphere with a plane through its center. We call antipodal point of a point P to the point P ⋆ that is diametrically opposite on the sphere. If P = (λ, φ) then its antipode P ⋆ has coordinates (λ−sдn(λ)π , −φ) where sдn(x) = x/|x |. A meridian is a contiguous half of a great circle. A great circle is the union of any of its meridians with the antipodal set of that meridian. Each spatial line defines a single great circle (but note that a great circle contains many lines), and the conical projection of the line on the sphere is a meridian of that circle, with exactly two antipodal vanishing points at its ends. The vanishing points of a line are obtained, as in any central perspective, by translating the line to O and intersecting with the sphere. So a line (λ 0 , φ 0 , θ ) has vanishing points at v 1 = (λ 0 − sдn(λ 0 )π , θ ) and at v ⋆ 1 . Now note that parametrization 1 can already be extended to plot the image of the great circle containing line l. Let H be the plane defined by O and l, and C the great circle C = H ∩ S 2 . Then the perspective image of C is the union of the perspective image of l with the set of the perspective images of the antipodal points of l. But from 1 we see that φ(λ − sдn(λ)π |λ 0 , φ 0 , θ ) = −φ(λ|λ 0 , φ 0 , θ ) since the sine and cosine reverse sign and the arctan is odd. Then function λ → f (λ|λ 0 , φ 0 , θ ) already parametrizes the whole great circle of l if we extend its domain to [λ 0 − π , λ 0 + π ]. We can rewrite parametrization 1 with the help of the sum of cosines rule, so as to have a single cosine in the argument of arctan. Then the parametrization of the great circle that contains (λ 0 , φ 0 , θ ) takes the form where λ M = λ 0 + arctan (tan(θ )/tan(φ 0 )) , and φ M = arctan tan 2 (φ 0 ) + tan 2 (θ ) .
We can therefore describe a great circle by giving the pair (λ M , φ M ). A particular line within the circle is determined by the choice of a clipping interval [λ 0 − π , λ 0 + π ], which determines the vanishing points. We write (λ 0 , φ 0 , θ ) ≡ (λ M , φ M ) to mean that a line is contained in a great circle. Figure 4 (right) describes the situation: a great circle is determined by a plane H through O. H will intersect the equatorial plane at a line, so the circle is fully described by giving the orientation of this line on the equatorial plane and the dihedral angle between the planes, φ M , which is equal both to the maximum latitude of the circle and to the incline of the tangent at λ E . Since tangents are preserved at the equator, it follows that the plot of the great circle (λ M , φ M ) has incline φ M when it crosses the equator at longitude λ E (and conversely, it has incline φ E = 0 at λ M ). As we shall see, this symmetry is useful when interpolating perspective curves, as it gives the draughtsman control points for the tangents. From it follows that a line on H with λ 0 = λ E will have θ = φ M . For the same reason, the image of a (0, φ, 0) line has incline φ at the image of its vanishing points and, conversely, a line (λ 0 , 0, θ ) has latitude θ = φ M at its vanishing points. We can now understand the asymmetric curves of the pencils of parallel lines in fig. 3 (bottom). In figure 4 (left), the filled red lines represent a set of parallels with incline θ = 30 • separated by 15 • intervals of φ 0 . We have λ = 0, so the plot is in the range [π /2, π /2], ending at the vanishing points (±90 • , ±30 • ). Within their range these lines seemed asymmetric and hard to describe. But they are sections of the great circles represented by dashed lines, and these are more easily understood. For example, the blue line (0, 30 • , 30 • ) is contained in a circle that we can see has zero latitude at λ E = −45 • , hence must reach its maximum latitude at λ M = 45 • , 90 • to the right of λ E . Here φ M = arctan( (2/3)) ≈ 39 • . Around λ M this is a symmetric curve; we have in fact (0, 30 • , 30 • ) ≡ (λ M , φ M ) ≡ (λ M , φ M , 0). So all those confusing curves are just simple symmetric lines of type (λ M , φ M , 0), only sampled in different ways by the clipping windows defined by the vanishing points. So we need only draw lines of type θ = 0, all the other being obtained by lateral translation. The value of λ M and φ M can be calculated from (λ 0 , φ 0 , θ ) by their definitions in eq. 2, but recall we are interested in drawing from observation and we don't wish to make our draughtsmen carry trigonometric tables and calculators. So we notice that in the domain of a line you can always find one of the extremes and one of the zeros (or both, when they are vanishing points) of the great circle. Finding one of the zeros, where the line hits the equatorial plane, we can measure λ E directly. Given λ E we find the exact spot of λ M (which is harder to spot by observation) and measure its height φ M . We get for free the tangent at λ E , as we have seen, which will equal the value of φ M . For instance, in fig 4 we know that the incline of the tangent through λ E (dashed line) has to equal φ M ≈ 39 • .

Plotting by hand with ruler, compass, and protractor
As we have seen, we can reduce all plots of lines to those of type (0, φ 0 , 0), modulo translation and choice of vanishing points. We will now show how to plot these lines by elementary means, using ruler, compass, and protractor, with the help of some descriptive geometry diagrams. We work on the setup of construction of fig. 5 (left), which is nothing more than an orthographic view of the general scheme in fig. 2 for the case θ = 0. The following construction obtains φ for a given λ.
(1) Plot a vertical segment OQ 0 of arbitrary length. Draw perpendiculars to OQ 0 through O and Q 0 . Let these be l O and l ′ respectively. (2) With a protractror, find H on l ′ such that ∠Q 0 OH = φ 0 . With center on Q 0 , draw a circle through H , to find P 0 on OQ 0 . Draw a horizontal l through P 0 . We now have a setup to obtain the latitude of any point on l. (3) To obtain the latitude φ(P λ ) of a point P λ ∈ l whose longitude is λ, proceed as follows: With a protractor, find Q λ on l ′ such that Q λ OQ 0 = λ ( fig. 5 (right)). With center at Q λ , draw a circle through O to find O λ ∈ l ′ such that |O λ Q λ | = |OQ λ |. Draw a vertical through Q λ to find P λ on l. Then φ(P λ ) = ∠P λ O λ Q λ can be read with a protractor. In fig. 6 we used this construction to draw one quarter of the great circle (0, 80 • ) (or a half of the line (0, 80 • , 0)). The rest of the great circle can be obtained from this section by mirror symmetry. Five points were found (with errors in the order of one degree) and the rest were interpolated by eyeballing constant curvature segments (arcs of circle) between each consecutive set of three points. Besides these five points we know both the longitudes at λ M , λ E , and the tangents at these points, so that the tangent at λ E is equal to φ M = 80 • and the tangent at λ M is equal to zero. These control points for the tangents help us direct the approximation to the curve. We can see that even at this high value of latitude, as few as three judiciously chosen points would still provide a serviceable approximation to the curve.
2.4.1 Application to the θ 0 case. The construction above could be trivially applied to lines with θ 0 with a simple modification to step 2: draw line l on step 2 with incline θ . The rest of the procedure is identical. But doing this makes for a larger, more unwieldy diagram. It is easier to use this diagram to find (λ M , φ M ), then reduce the problem to the corresponding one of type θ = 0 through translation and apply the procedure described above. In order to obtain (λ M , φ M ) from (λ 0 , φ 0 , θ ) (as an alternative do direct measurement or calculation) do as follows: on step 2, draw l with incline θ . Find the intersection of l with l ′ . Let this intersection be Q E . Then measure ∠Q 0 OQ E with a protractor, thus obtaining λ E .
Having learned to find all vanishing points and plot all great circles, we can now build complex scenes as the example of fig. 8, with ramps that climb up or down at arbitrary angles.

Approximations.
We note that for small φ 0 , the exact construction above can be replaced by a simple approximation by sinusoids or arcs of circle.
For φ 0 < 35 • , a sinusoid through the apex (0, φ 0 ) and end points at (±90 • , 0) is a good approximations (maximum error ≈ 1 • ), and is easy to draw by ruler and compass. For φ 0 > 35 • this starts to fail, but a circle through these same points becomes a decent approximation until about 55 • (max. error ≈ 2 • ). For larger values of φ 0 the curves take their characteristic sigmoid shape and one must use the general construction of the previous section.

Uniform grids
The pons asinorum in the study of a perspective is always the drawing of uniform grids. Let us consider what would be a one-point perspective grid in classical perspective: a tiled box, as in fig 1. In that picture the box is cubical of size 2d and has been tiled with squares of size d/4. The viewpoint O is at the center of the box. We solve this grid as follows: Face towards 0 • latitude. Measure the latitudes of the grid points on the floor along the sagittal plane. This can be done by direct observation (with a clinometer) or by the diagram of figure 7 with a protractor. You will obtain four points of latitudes h i = −π + arctan(k/4), k = 1, . . . , 4, ending at the 45 • line, where the front wall begins. Draw the lines through these points that have vanishing points on the equator at λ = ±90 • , by the method of fig.  6. Thus you have drawn lines (0, −π + arctan(k/4), 0), k = 1, · · · , 4. These are all that you need to calculate for the floor. To get their perpendiculars, pass a vertical through λ = −45 • and mirror the lines you have drawn. You thus obtain the lines of the grid that go to λ = 0, and in this way a quarter of the tiled floor is achieved. To get the horizontal lines of the frontal wall, The angular height h i obtained for the floor are mirrored through the 45 • latitude. Draw the horizontal lines that go through these at the sagittal plane and vanish at λ = ±90 • . To get the vertical lines of the wall, just pass verticals through the intersections of the bottom of the wall with the lines of the floor that go to λ = 0 at the equator. The rest of the box can be tiled by symmetry without further calculation. Uniform grids of this kind have an interesting property in equirectangular projection: In a sense there is only one of them. If you rotate the room around the z axis,the new drawing will just be displaced by the horizontal offset corresponding to the angle of rotation.

CONCLUSION
Equirectangular perspective is an attractive option for drawing panoramas. It is a full spherical perspective, yet carries the symmetries of cylindrical perspective in good approximation for low latitudes, which align well with intuition and help to improvise figures and action on top of carefully designed referential backdrops. VR visualization makes it useful both for the student of geometry, who can validate constructions in anamorphosis and for the artist interested in the interface between analog and digital drawing. Its main defect is the irregularity of high-latitude great circles, but these can be solved by achieving a few points through descriptive geometry, the rest following by symmetry. We have given a brief outline of a procedure for plotting these lines with elementary tools: ruler, compass, and protractor. However the reader will find it sometimes hard to measure the necessary angles in drawing from life. There is an art to knowing what to measure and where to start. Solving a perspective mean also giving a corpus of solved problems that help the artist in framing the most common situations, and in this we have here by necessity been terse to a fault. The reader will find in due course further notes, illustrations and VR panoramas at the author's website [6] Figure 8: Equirectangular perspective of a stairwell, with stairs going up and down at 34 degree incline. Notice convergence to vanishing points. Drawing by the author. The VR panorama rendering is available at the author's website [6].