The following article is Open access

Solving the Alhazen–Ptolemy Problem: Determining Specular Points on Spherical Surfaces for Radiative Transfer of Titan's Seas

, and

Published 2021 March 29 © 2021. The Author(s). Published by the American Astronomical Society.
, , Citation William J. Miller et al 2021 Planet. Sci. J. 2 63 DOI 10.3847/PSJ/abe4dd

Download Article PDF
DownloadArticle ePub

You need an eReader or compatible software to experience the benefits of the ePub3 file format.

2632-3338/2/2/63

Abstract

Given a light source, a spherical reflector, and an observer, where on the surface of the sphere will the light be directly reflected to the observer, i.e., where is the specular point? This is known as the Alhazen–Ptolemy problem and finding this specular point for spherical reflectors is useful in applications ranging from computer rendering to atmospheric modeling to GPS communications. Existing solutions rely upon finding the roots of a quartic equation and evaluating numerically which root provides the real specular point. We offer a formulation, and two solutions thereof, for which the correct root is predeterminable, thereby allowing the construction of the fully analytical solutions we present. Being faster to compute, our solutions should prove useful in cases that require repeated calculation of the specular point, such as Monte Carlo radiative transfer, including reflections off of Titan's hydrocarbon seas.

Export citation and abstract BibTeX RIS

Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.

1. Introduction

The specular point is the specific location on a surface where the outgoing vector of a mirror reflection coincides exactly with the vector to an observer. At such a point, the light from a point source is seen by the observer and, if the source has spatial extent, an image is produced in the reflection. Because superposition allows a source with spatial extent to be divided into point sources—each with a single specular point which in aggregate comprise the specular region—the same methods for finding a specular point can be repeatedly applied to determine the region of specular reflection corresponding to a source with spatial extent.

1.1. Applications

Perhaps the most notable use for finding the specular point for an arbitrary source–observer configuration is in Global Positioning Systems (GPS). Unfortunately, the tolerance of GPS requires Earth to be approximated as an ellipsoid instead of a sphere, rendering the analytical solution of the spherical-surface case less useful (Prakash et al. 1994; Southwell & Dempster 2018). However, our formulation can be extended to elliptical geometries more easily than previous approaches, arguing positively of its usefulness in this application.

Unlike Earth, Saturn's moon Titan—which harbors liquid hydrocarbons that allowed the Cassini mission to record numerous specular reflections (Stephan et al. 2010; Barnes et al. 2014)—can be well approximated as a sphere. The SRTC++ model (Barnes et al. 2018) does exactly that, and finding a faster method for computing the specular reflections due to scattering off of Titan's ubiquitous atmospheric haze aerosols in SRTC++ is the direct motivation for this work. There may also be utility for removing "Sun glint" from imaging data by employing a method similar to those in Kay et al. (2009), but with the higher precision enabled by our analytical solutions.

Another notable application is the rendering of computer graphics with ray tracing (Inakage 1986), a case where computation speed is critical, particularly when rendering a reflected image (instead of a simple point source) because the rendering fidelity is much more sensitive to the accuracy of the specular point calculation. The increased interest in ray-traced rendering, particularly with regard to the video game and movie industries, serves only to increase the usefulness of a faster method for handling even partially reflective surfaces.

1.2. Planar Surface

For a planar surface, the specular point (Figure 1) can be found trivially. In the coordinate system centered on the specular point with the x-axis parallel to the surface, the positions of the source and observer must satisfy

Equation (1)

where θi is the incidence angle and θe is the emission angle. In the configuration shown in Figure 1, they are defined as

where xs is the separation between the source and observer in the x direction. Then, the position of the source and observer relative to the specular point can be found by combining the above and rearranging:

Figure 1.

Figure 1. Specular point for the planar surface.

Standard image High-resolution image

1.3. Alhazen–Ptolemy Problem

The case of a spherical surface (Figure 2) is far more complicated. First formulated in 150 CE by Ptolemy (Weisstein 2002), it is known as the Alhazen–Ptolemy problem because the first method of solving it (a geometric approach using conic sections) was provided—and proven—by Ibn al-Haythum in the 11th century (Katz 1995). Elkin (1965) provided the first algebraic solution and similar formulations by Riede (1989), Smith (1992), and Waldvogel (1992) confirmed Elkin's solution. Neumann (1998) proved that the ruler-and-compass construction of a general solution, a method that permits only circular arcs and straight lines, is impossible. That is, given only an unmarked and idealized compass and straight edge, there is no way to determine the specular point.

Figure 2.

Figure 2. Specular point on a spherical surface.

Standard image High-resolution image

1.3.1. Existing Methods

The solution in Elkin (1965) produces a quartic equation for the distance from either the source or the observer to the specular point (though he does not term it such), the roots of which can be used to retrieve a collection of distances from the specular point to the other point of interest. The resulting xy pairs must then be analyzed to find the real specular point. There are several methods that are useful in retrieving the specular point from the generated xy pairs: minimizing the source–specular–observer path length, employing a numerical root-finding method with an initial "guess" (e.g., Newton's method), or "by probe."

Fujimura et al. (2019) provides a formulation that works well for the method of path-length minimization, but suffers numerical instability in cases where the radius of the sphere is very small relative to source or observer distance (e.g., in the one-finite case discussed below). Glaeser (1999) demonstrates the numerical root-finding approach (using an algorithm from Schwarze 1990) and notes that it is subject to "numerical instabilities that may lead to a considerable loss of accuracy" under certain circumstances. Elkin (1965) shows the "by probe" method, but this is almost impossible to capture algorithmically. These limitations beg the creation of a better, faster method.

1.3.2. Our Approach

The salient problem, and in fact the only obstacle to a fully analytical solution, is that of deducing which root to use. We present a formulation that allows predetermination of the "correct" root and enables the construction of a piecewise function that directly produces the location of the physical specular point. We find this formulation superior to previous work because of its analytical branch deduction—something lacking from every other formulation. The fully analytical approach avoids numerical instability and allows significantly faster computation.

We present two analytical solutions for this formulation: one that requires the distance to either the source or observer be approximable as infinite (the "one-finite" case) and a second that works for any arbitrary configuration of source and observer (the "both-finite" case). Furthermore, we demonstrate that the complete solution can be expressed using no more than three roots in the both-finite case and no more than two roots in the one-finite case. We apply an Euler rotation and make use of the particulars of the resulting geometry to simplify the analysis, which also serves to minimize the associated computational expenses.

2. Euler Rotation

In both cases, it is useful to place either the source or observer at polar angle π/2 (i.e., above the north pole) for two reasons: first, it reduces the subsequent analysis to two dimensions, and second, it allows a simplification that will be used in Sections 3 and 4. The simplest way to accomplish this is to start in Cartesian coordinates with the origin at the center of the sphere and then apply two sequential rotations. The first rotation uses the angles

Equation (4)

to define new coordinates in a rotated frame (denoted by the prime, '),

Equation (5a)

Equation (5b)

Equation (5c)

Here, α is the azimuthal angle of the source (measured from the positive x-axis), and β is the inclination angle (measured from the positive z-axis). The second rotation is not strictly necessary; the critical portion is the placement of source or observer at π/2, accomplished by the first rotation. However, this second rotation further reduces the problem because it enforces −π/2 < θobs < π/2 (in the rotated frame), allowing us to ignore some of the roots in Equations (13a) and (20a). This rotation takes

Equation (6)

to establish coordinates in the twice-rotated, '', frame to be

Equation (7a)

Equation (7b)

Equation (7c)

with k ∈ {src, obs} (i.e., for xsrc, xobs, etc.) and where $\mathrm{atan}2\left(y,x\right)$ defines the angle from the positive x-axis to (x, y). At the end, once the specular point has been calculated in this new coordinate system, we will apply these two rotations in reverse for k ∈ {src, obs, spec} to recover the specular point in the original system. The rotated system $({x}_{k}^{{\prime\prime} },{y}_{k}^{{\prime\prime} },{z}_{k}^{{\prime\prime} })$ will be used for the remainder of this paper.

In the one-finite case, the rotation should be performed to place the coordinate of the finite radius at π/2. This allows full use to be made of the approximation RobsRsph or RsrcRsph. In the both-finite case, the rotation can place either coordinate at π/2, but we will place the source at π/2 for notational consistency.

3. One-finite Case

If either the source or the observer can be considered infinitely distant, then after applying the Euler rotation in Equation (5a) to place the finitely distant of the two at π/2—as Figure 2 shows—θ1 and θ2 can be defined such that

Equation (8a)

Equation (8b)

where θe and θi are then given by

3.1. Formulation

Because the incidence angle (θi ) must always be equal to emission angle (θe ), then in the limit where RobsRsph, we get

Equation (9)

With the introduction of a constant,

Equation (10)

and substituting in θ2 from Equation (8b), Equation (9) becomes

Equation (11)

Making use of the identities

and the fact that the Euler rotation in Equation (5a) results in θsrc = π/2, we get

Equation (12)

3.2. Solution

Equation (12) has 16 unique, nontrivial solutions, courtesy of Wolfram Mathematica (Wolfram Research 2020). We ignore eight of these because they represent special cases that are not physically meaningful for our purposes. The other eight are presented in Equation (14) using the coefficients we define in Equation (13a):

Equation (13a)

Equation (13b)

Equation (13c)

Equation (13d)

Equation (13e)

Equation (14)

The only differences between the solutions are the different signs associated with the four terms. The possible combinations are ± − − − , ± − + − , ± + − + , and ± +++. These solutions are plotted in Figure 3 for a source at 3000 km from the center of a sphere of radius 2575 km (i.e., Titan) and an observer at a much greater distance. After comparing these solutions against the numerical method, as in Figure 3, it is clear the branch that produces the physical specular point (on the exterior of the sphere) is

Equation (15)

Figure 3. Plots of the solutions to Equation (12), where Rsph/Rsrc (c) is 0.85. Note that the numerical method is only applied to [−π/2, π/2] because the Euler rotation in Section 2 enforces θobs to be between −π/2 and π/2. θobs is the angle of the observer, and θspec is the angle of the specular point. Both are in the rotated reference frame and measured from the positive x-axis. An animated version is available which shows the solutions for various values of c. The real-time duration of the animation is 10 s.

(An animation of this figure is available.)

Video Standard image High-resolution image

4. Both-finite Case

4.1. Formulation

If ${R}_{\mathrm{obs}}\,\rlap{/}{\gg }\,{R}_{\mathrm{sph}}$ and ${R}_{\mathrm{src}}\,\rlap{/}{\gg }\,{R}_{\mathrm{sph}}$, then the solution becomes even more complicated. In this case, Equation (9) becomes

Equation (16)

and Equation (8a) becomes

Equation (17a)

Equation (17b)

which yields

Again making use of θsrc = π/2 and defining a new constant,

Equation (18)

the both-finite equivalent of Equation (12) is

Equation (19)

With b = 0 (and with some manipulation), we can recover Equation (12). Doing so is nontrivial and will be ignored for brevity, but it is clearly demonstrated by the agreement between the two methods when b ≈ 0 as shown in Section 5.2.

4.2. Solution

Similar to Equation (12), Equation (19) produces 16 unique, nontrivial solutions—only 8 of which are physically meaningful (the others represent special cases). These are presented in Equation (21) using the coefficients defined in Equation (20a):

Equation (20a)

Equation (20b)

Equation (20c)

Equation (20d)

Equation (20e)

Equation (20f)

Equation (20g)

Equation (21)

As in Equation (14), the only differences between the solutions are the signs on four terms. The combinations of these signs are ± − − − , ± − + − , ± + − + , and ± +++ (the same as in Equation (14)). They are plotted in Figure 4. Comparison with the numerical method indicates the branch that produces the physical specular point (on the exterior of the sphere) is

Equation (22)

where the limits L1 and L2 are given by

Equation (23a)

Equation (23b)

It should be noted that L1 may occur at less than −π/2, and in such cases, only the second two parts in Equation (22) are necessary. Additionally, while there is an exact solution for the partial derivative of E7, in practical computation, it is robust to use the approximation

where ζ is directly related to the branch-deduction precision (assuming it is larger than the computation precision), e.g., ζ = 10−9 will result in the correct branch being chosen within 10−9. Our both-finite implementation in the following section makes use of this approach.

Figure 4. Solutions to Equation (21) for Rsph/Rsrc (c) of 0.85 and Rsph/Robs (b) of 0.95. Note that the numerical method is only applied to [−π/2, π/2] because the Euler rotation in Section 2 enforces θobs to be between −π/2 and π/2. θobs is the angle of the observer, and θspec is the angle of the specular point. Both are in the rotated reference frame and measured from the positive x-axis. An animated version is available which shows the solutions for various values of b and c. The real-time duration of the animation is 12 s.

(An animation of this figure is available.)

Video Standard image High-resolution image

5. Computation

Implementations of these solutions in both Python and C++ can be found in this GitHub Repository. 3 Also in the repository are the Wolfram Language Package files for easily reading the solutions into Mathematica. The C++ implementations were used for performance benchmarking. The solution for the one-finite case performs significantly better than that of the both-finite case, but in many applications, the difference will be negligible because both routines are relatively minimal—especially compared to numerical methods.

5.1. Performance

Excluding branch deductions (and after compiling with the gcc option -O3), our C++ implementation of the one-finite solution requires 76 floating-point operations, 6 trigonometric, and 5 sqrt calls with one expensive exponentiation operation to find a complex cube root. The corresponding both-finite code requires 131 floating-point operations, 5 trigonometric, and 5 sqrt calls, and one expensive cube root.

Benchmarked on a hexacore Intel i7-8750H, the one-finite solution averaged 23 ns per iteration and the both-finite solution averaged 121 ns per iteration for 109 random combinations of b, c, and θobs. The code used for benchmarking is included in the linked GitHub repository. In cases where L1θobsL2, the one-finite implementation has a more significant speed advantage because the both-finite implementation's branch deductions are most expensive in this region.

5.2. Precision

The agreement between the one-finite solution and the both-finite solution is shown in Figure 5. When using the 64 bit double type, the machine precision for either calculation is roughly 10−7 due to the trigonometric functions. The use of the long double type (which is implementation dependent but usually corresponds to between 80 and 128 bit storage) can be used to improve this precision to 10−15. It should be noted that any numerical methods will have the same or similar precision limitations. Figure 5 does not make use of the extra precision, and therefore, the point at which the average error exceeds 10−6 can be considered the point at which the disagreement between the two methods exceeds the machine precision. This occurs at around b/c = 2 × 10−5, i.e., when either Robs or Rsrc is 50,000 times larger than the other. At a ratio of 500, the accuracy drops to ±1.72 × 10−2 degrees, but only for the nearly worst-case-scenario of c = 0.95. As c decreases, the accuracy of θspec at the same b/c improves, e.g., for c = 0.1 the accuracy is ±1.72 × 10−6 degrees at b/c = 500.

Figure 5.

Figure 5. Agreement between the one-finite and both-finite solutions as a function of the ratio between b and c with the maximum error across all θobs for a given b/c. Note that even though θobs is confined to [−π/2, π/2], we are showing the error for θobs between 0 and π. We do so to demonstrate that for −π/2 > θobs or θobs < π/2 (in the reference frame before the second Euler rotation), the persistent error is symmetrically reversed.

Standard image High-resolution image

6. Conclusion

6.1. SRTC++

Our method is of particular use in simulating radiative transfer on Titan, i.e., in the SRTC++ model (Barnes et al. 2018). Specifically, calculating specular reflections due to atmospheric scattering allows us to compensate for the adjacency effect—when atmospheric scattering redirects light reflected off bright material adjacent to spectrally dark regions (e.g., lakes) and causes them to appear brighter than they should. This effect has been well documented on Earth (Odell & Weinman 1975; Tanre et al. 1981; Minomura et al. 2001; Sterckx et al. 2011; Kiselev et al. 2015), and Karkoschka & Schroder (2016) found it necessary to compensate for it in their reflectivity analysis of Huygens data.

Realistically simulating Titan's atmosphere and surface requires compensating for the adjacency effect, and many high-fidelity simulations. In such simulations, the specular point must be calculated for every scattering event (and there are usually billions). The effect of our method on the computation speed of these simulations is negligible (e.g., about 1 minute over 4 days of execution time). The same cannot be said of existing methods.

6.2. Computer Rendering

Another notable application is in rendering computer graphics. Computation speed is critical here as well, and often multiple light sources or reflections must be accounted for—each with a separate specular point. Sources with non-negligible spatial extent are also common, requiring the calculation of multiple specular points during each refresh. We have formulated this paper to emphasize spherical surfaces, but in fact, the analysis in the rotated reference frame can be applied to any reflective surfaces of revolution, provided the intersection between the surface and the plane formed by the source, observer, and specular point forms a circle.

6.3. Extension to Elliptical Geometry

Extending our approach to elliptical geometry would drastically broaden its usefulness by providing an analytical, branch-deducing method for calculating specular points on any closed conic section. As mentioned previously, this extension would enable our solution to be used in GPS communications. But it would also expand the usefulness for computer rendering because most planar slices of regular surfaces of revolution produce one or several noncircular conic sections. We leave the elliptical case to future work.

6.4. In Summary

We have presented a formulation of the Alhazen–Ptolemy problem in which the physical specular point is predeterminable; we find this formulation to be superior to previous approaches because it does not rely on numerical methods for branch deduction. Furthermore, we have shown that the solution can be directly written as a piecewise function with only three branches in the both-finite case and only two branches in the one-finite case. Employing an Euler rotation, normalizing the radius of the sphere to unity, and translating the rotated coordinate system to center on the specular point are critical in this formulation and in enabling robust and efficient computational implementation. Our method is useful for studying the ethane composition of Titan's lakes with SRTC++, rendering 3D computer graphics, and lays the groundwork for extension to elliptical geometry.

Footnotes

Please wait… references are loading.
10.3847/PSJ/abe4dd