User:AboutFace 22/sandbox2

From Wikipedia, the free encyclopedia

I have a 2-sphere and I want to define 2 rectangular areas on it. They are "spherical rectangles" with borders that are some meridians and parallels. Sorry for not using Greek letters all the way through-they refused to take subscripts, superscripts. Let angle θ <t> be the inclination (polar) angle, and angle φ <f> the azimuthal angle. I will use Greek and Latin letters interchangeably. I need three angles t: and two angles f: It is clear they define two contiguous (adjacent) spherical rectangles. The rectangles touch each other on parallel. A function f(θ,φ) is defined on the area that is the sum of both rectangles. The portions of the function f(θ,φ) on both rectangles are different. Let (θ,φ) be the portion of the function f(θ,φ) on one rectangle and (θ,φ) the corresponding portion on the other rectangle. A basis of fully normalized Spherical Functions

(1)

is defined on the whole 2-sphere but I will consider only the portion that is covered by the above two rectangles. Each function (θ,φ), (θ,φ) and (θ,φ) will be expressed as

(2)

(3)

and

(4)

I then fix one particular index which defines a subspace in the functional Hilbert space and compute these expressions (asterisk marks complex conjugate):

(5)

(6)

(7)

It is very important for me to know if additivity is preserved and

(8)

[1]

BIPOLAR SPHERICAL HARMONICS [1]; pg 160

I need to expand my research into Bipolar Spherical Harmonics (BiPoSH). It is regretful that Wikipedia does not have an article on them. They are used in Quantum Theory of Angular Momentum [2] , studies of CMB isotropy violations [3][4] and X-Ray computerized tomography [5]. In order to formulate my questions I need to display a few known formulas.

This is the definition for regular Spherical Harmonics

(9)
is a normalization factor.

The BiPoSH:

(10)

Where:

are two unit vectors on 2-sphere and

and

are Clebsh-Gordan Coefficients

The condition for Clebsch-Gordan coefficients being non-zero:

(11)

I understand that [6] (page 178):

It's been said that bipolar spherical harmonics constitute an orthonormal basis on and therefore any function

can be expanded into a series of bipolar spherical harmonics:

(12)
are expansion coefficients

Direct expression for expansion coefficients:

(13)

[7] also gives this expression for expansion coefficients (pg 3, formula 4):

(14)

and so called "unbiased (in terms of CMB statistics) estimator:"

(15)

The following expression

(16)

will be invariant under rotations

  • TRIPOLAR SPHERICAL HARMONICS

Tripolar Spherical Harmonics are defined as a tensor product of three ordinary Spherical harmonics; Ref {1} pg 161

(17)

where:

are three unit vectors on 2-sphere

And are Clebsch-Gordan coefficients

Integers have such limitations:

(18)

(19)

(20)

(21)

(22)

(23)

(24)

Tripolar Spherical Harmonics form a complete orthonormal basis for functions defined on 2-sphere in such a way that they depend on three vectors

Then the expansion of a function will take this form:

(25)

Where are complex valued expansion coefficients of the function dependent on three vectors on 2-sphere.

(26)

Where is a real-valued function defined on 2-sphere and dependent on three not necessarily linearly independent vectors

The expression

(27)

will be invariant under rotations.

|||====================================|||

In CMB research they have by necessity only one sphere and the unit vectors are chosen arbitrarily and the correlations are examined between resulting coefficients.

My task necessitates me to apply the Translation Operator [8] (pg. 142) first to a set of Spherical Harmonics and then forming the tensor product of the original and shifted Spherical Harmonics.

(28)
is the shift operator.
is an irreducible tensor product.

Quadrature rules based on interpolating functions[edit]

A large class of quadrature rules can be derived by constructing interpolating functions that are easy to integrate. Typically these interpolating functions are polynomials. In practice, since polynomials of very high degree tend to oscillate wildly, only polynomials of low degree are used, typically linear and quadratic.

Illustration of the rectangle rule.

The simplest method of this type is to let the interpolating function be a constant function (a polynomial of degree zero) that passes through the point ((a+b)/2, f((a+b)/2)). This is called the midpoint rule or rectangle rule.

Illustration of the trapezoidal rule.

The interpolating function may be a straight line (an affine function, i.e. a polynomial of degree 1) passing through the points (a, f(a)) and (b, f(b)). This is called the trapezoidal rule.

Illustration of Simpson's rule.

For either one of these rules, we can make a more accurate approximation by breaking up the interval [a, b] into some number n of subintervals, computing an approximation for each subinterval, then adding up all the results. This is called a composite rule, extended rule, or iterated rule. For example, the Composite Trapezoidal rule can be stated as

(17)

where the subintervals have the form [k h, (k+1) h], with h = (ba)/n and k = 0, 1, 2, ..., n−1.

Interpolation with polynomials evaluated at equally spaced points in [a, b] yields the Newton–Cotes formulas, of which the rectangle rule and the trapezoidal rule are examples. Simpson's rule, which is based on a polynomial of order 2, is also a Newton–Cotes formula.

Quadrature rules with equally spaced points have the very convenient property of nesting. The corresponding rule with each interval subdivided includes all the current points, so those integrand values can be re-used.

If we allow the intervals between interpolation points to vary, we find another group of quadrature formulas, such as the Gaussian quadrature formulas. A Gaussian quadrature rule is typically more accurate than a Newton–Cotes rule, which requires the same number of function evaluations, if the integrand is smooth (i.e., if it is sufficiently differentiable). Other quadrature methods with varying intervals include Clenshaw–Curtis quadrature (also called Fejér quadrature) methods, which do nest.

Gaussian quadrature rules do not nest, but the related Gauss–Kronrod quadrature formulas do.

Applying the Gaussian quadrature rule then results in the following approximation:

Quadratic interpolation[edit]

One derivation replaces the integrand by the quadratic polynomial (i.e. parabola) which takes the same values as at the end points a and b and the midpoint m = (a + b) / 2.

This calculation can be carried out more easily if one first observes that (by scaling) there is no loss of generality in assuming that and .

Simpson's rule can be derived by approximating the integrand f (x) (in blue) by the quadratic interpolant P(x) (in red).
An animation showing how Simpson's rule approximation improves with more strips.
  • EXAMPLES OF SIMPLE DEFINITE INTEGRALS TO VERIFY SOME SUBROUTINES

Calculation of sample definite integrals (some presented below) has been done by using three methods: (1) Simple Newton's integration (2) Composite Trapezoidal rule, formula (17) above, and (3) 'Gauss-Legendre integration by using Holoborodko's abscissas and weights (16 x 2 = 32 points). The result showed that Gauss-Legendre is more accurate than the other two by perhaps hundreds or thousands of times.

Градштейн & Рыжик 3.121(2)

(18)

Paul's online math notes[9]

(19)

(20)

(21)

(22)

(23)

Source[10]

(24)

(25)

Interactive Mathematics[11]

(26)

Градштейн & Рыжик 3.716(2, etc.)

(27)

(28)

(29)

(30)

(31)

Legendre Polynomials & Associated Legendre Polynomials positional diagram:

Associated Legendre Polynomials of indexes 1 to 8 are published[12] They are being used for the seeds of recurrence formulas presented in Sandbox. First they must be normalized; simple formulas for that exist. The calculated values match those in Tables of Normalized Associated Legendre Polynomials by S.L. Belousov

Calculation of Normalized Legendre polynomials, accurate up to 1600 and 800 can be done two-fold. The first method employs formula [50] in Sandbox.

  • MOVING FROM LEFT TO RIGHT

(50)

The seeds for this formula are and

[50] is implemented as ********. Matches Belousov's values. On the above diagram that will involve scaling up the Red ladder. The result will give us the first seed.

In order to move horizontally from Left to the Right by using the formula [57] two seed values are needed, and

The following formula [57] allows to move horizontally from left to right for indexes . The formula needs two seeds: and . The first value is provided by formula [50] and the second value by this formula [71]:

(71)

(57)
  • MOVING FROM RIGHT TO LEFT

The following formula allows to climb the Green ladder and eventually compute polynomial

(45)

[45] is implemented as highOrder_ALP_LeqM_Norm. Matches Belousov's values[2]. [45] will give us the first seed for [62]. Formula [75] will give the second seed.

(75)

The following formula [62] allows moving from Right to Left, in direction of decreasing index:

(62)

for and for

!!!==================================!!!

In the following table[13] and

Table of first ALP's with L = 7 & 8 (Non-normalized!)
FUNCTIONS

!!!==================================!!!

  • 3-D PROJECTION (Wikipedia) [14]

If the normal of the viewing plane (the camera direction) is parallel to one of the primary axes (which is the x, y, or z axis), the mathematical transformation is as follows; To project the 3D point , , onto the 2D point , using an orthographic projection parallel to the y axis (where positive y represents forward direction - profile view), the following equations can be used:

where the vector s is an arbitrary scale factor, and c is an arbitrary offset. These constants are optional, and can be used to properly align the viewport. Using matrix multiplication, the equations become:

.
  • PERSPECTIVE PROJECTION

The perspective projection requires a more involved definition as compared to orthographic projections. A conceptual aid to understanding the mechanics of this projection is to imagine the 2D projection as though the object(s) are being viewed through a camera viewfinder. The camera's position, orientation, and field of view control the behavior of the projection transformation. The following variables are defined to describe this transformation:

  • - the 3D position of a point A that is to be projected.
  • - the 3D position of a point C representing the camera.
  • - The orientation of the camera (represented by Tait–Bryan angles).
  • - the viewer's position relative to the display surface [3] which goes through point C representing the camera.

Which results in:

  • - the 2D projection of .

When and the 3D vector is projected to the 2D vector .

Otherwise, to compute we first define a vector as the position of point A with respect to a coordinate system defined by the camera, with origin in C and rotated by with respect to the initial coordinate system. This is achieved by subtracting from and then applying a rotation by to the result. This transformation is often called a camera transform, and can be expressed as follows, expressing the rotation in terms of rotations about the x, y, and z axes (these calculations assume that the axes are ordered as a left-handed system of axes): [4] [5]

This representation corresponds to rotating by three Euler angles (more properly, Tait–Bryan angles), using the xyz convention, which can be interpreted either as "rotate about the extrinsic axes (axes of the scene) in the order z, y, x (reading right-to-left)" or "rotate about the intrinsic axes (axes of the camera) in the order x, y, z (reading left-to-right)". Note that if the camera is not rotated (), then the matrices drop out (as identities), and this reduces to simply a shift:

Alternatively, without using matrices (let's replace (ax-cx) with x and so on, and abbreviate cosθ to c and sinθ to s):

This transformed point can then be projected onto the 2D plane using the formula (here, x/y is used as the projection plane; literature also may use x/z):[6]

Or, in matrix form using homogeneous coordinates, the system

in conjunction with an argument using similar triangles, leads to division by the homogeneous coordinate, giving

The distance of the viewer from the display surface, , directly relates to the field of view, where is the viewed angle. (Note: This assumes that you map the points (-1,-1) and (1,1) to the corners of your viewing surface)

The above equations can also be rewritten as:

In which is the display size, is the recording surface size (CCD or film), is the distance from the recording surface to the entrance pupil (camera center), and is the distance, from the 3D point being projected, to the entrance pupil.

Subsequent clipping and scaling operations may be necessary to map the 2D plane onto any particular display media.

!!!==================================!!!

  • EXAMPLE OF 10-POINTS GAUSS-LEGENDRE INTEGRATION
ABSCISSAS
WEIGHTS
  • BIBLIOGRAPHY

{1} D.A. Varshalovich, A.N. Moskalev, V.K Khersonskii Quantum Theory of Angular Momentum, 1988 World Scientific

{2} Nidhi Joshi, Aditya Rotti, and Tarun Souradeep Statistics of Bipolar Representation of CMB maps; Phys. Rev. D, Vol. 85, 043004, 2012

{3} I.S. Gradshteyn, I.M. Ryzhik Tables of Integrals, Series and Products; Seventh Edition; Academic Press 2007

{4} Istva´n Szapudi Wide Angle Redshift Distortions Revisited The Astrophysical Journal, 614:51–55, 2004 October 10

{5} Table of Spherical Harmonics, Wikipedia.org [15]

  1. ^ 1
  2. ^ 1
  3. ^ Ingrid Carlbom, Joseph Paciorek (1978). "Planar Geometric Projections and Viewing Transformations" (PDF). ACM Computing Surveys. 10 (4): 465–502. doi:10.1145/356744.356750..
  4. ^ Riley, K F (2006). Mathematical Methods for Physics and Engineering. Cambridge University Press. pp. 931, 942. ISBN 0-521-67971-0.
  5. ^ Goldstein, Herbert (1980). Classical Mechanics (2nd ed.). Reading, Mass.: Addison-Wesley Pub. Co. pp. 146–148. ISBN 0-201-02918-9.
  6. ^ Sonka, M; Hlavac, V; Boyle, R (1995). Image Processing, Analysis & Machine Vision (2nd ed.). Chapman and Hall. p. 14. ISBN 0-412-45570-6.