5.9. Miscellaneous¶
5.9.1. Curve from Abbe Number¶
In most cases only a center refractive index \(n_\text{c}\) and the Abbe number \(V\) are provided for a material, but not its full \(n(\lambda)\)-curve. To simulate such materials, a wavelength-dependent model needs to be established first. While there are countless potential curves that produce these two parameters, it is expected that real same-parameter-materials only exhibit slight curve variations inside the visible range.
We assume a simple model of the form:
where \(d=0.014\, \mu\text{m}^2\) is a compromise between the Cauchy (\(d=0\)) and the Herzberger (\(d=0.028\,\mu\text{m}^2\)) models.
Given \(n_\text{s}:=n(\lambda_\text{s}),~n_\text{c}:=n(\lambda_\text{c}),~n_\text{l}:=n(\lambda_\text{l})\) and the Abbe number equation in (5.196), one can solve for \(A,~B\):
Parameters \(V\), \(n_\text{c}\) and the spectral lines \(\lambda_\text{s},~\lambda_\text{c},~\lambda_\text{l}\) are provided by the user.
5.9.2. TiltedSurface Equation¶
Given the quantities
and the point normal equation for a plane
which is equivalent to
yields the following function for a tilted surface for \(n_z \neq 0\):
5.9.3. Flipping and Rotation¶
Flipping a surface is implemented as a 180-degree rotation around the x-axis. This transformation is equivalent to negating its relative shape \(z_r\) with respect to an offset \(z_0\) and mirroring the y-component: \(z_0 + z_r(x, y) \Rightarrow z_0 - z_r(x, -y)\). For a surface with rotational symmetry, this simplifies to \(z_0 + z_r(r) \Rightarrow z_0 - z_r(r)\). Rotation is achieved by altering the accessing coordinates through a rotation of the coordinate system:
The radius is \(r = \sqrt{(x-x_0)^2 + (y-y_0)^2}\). \(x_0\) and \(y_0\) are the rotation center coordinates, and \(\alpha\) is the rotation angle.
By simply adjusting the value of the rotation angle, the surface values can be rotated without actually rotating the underlying shape.
5.9.4. Equal Area Radial Sampling of Ring and Circle¶
A differential circular area element can be represented in polar coordinates as:
The variable \(\text{d}\phi\) can be rewritten as a circle segment:
\(N\) is the number of segments. Let us define a function \(r(u)\) which provides radial values \(r\), and its derivative outputs radial spacing values \(\text{d}r\).
For uniformly sampled data, \(\text{d}A\) must remain constant in regard to a uniform variable \(u\). This requirement corresponds to the condition \(\frac{\text{d}A}{\text{d}u} = 0\).
The solution to this second-order, nonlinear differential equation takes the form:
For convenience, we set the constants to \(c_1 = 0\) and \(c_2=1\). To obtain output values in the range \([r_i, ~R]\), the corresponding input values are \([r^2_i, ~R^2]\). By treating \(r\) and \(u\) as random variables, we arrive at:
The polar angle is uniformly spaced:
The resulting 3D positions for a circle perpendicular to the z-axis are then
Circle sampling can be implemented as a ring with inner radius \(r_\text{i} = 0\). A similar derivation is found in [1].
Due to artifacts around the center a different sampling technique is employed in optrace, as outlined in Section 5.1.6.
References