Wednesday, December 26, 2012

Navigating as a Wave, 2

2. Two wave motions     are propagated simultaneously from the same point in the plane, in perpendicular directions.  What is the resultant wave motion?


SOLUTION:
Three approaches.

1. Using equally spaced, perpendicular lines...
This is a Java Applet created using GeoGebra from www.geogebra.org - it looks like you don't have Java installed, please go to www.java.com
Here, the equations are
          
Since    ω1 = ω2    α = β, if the motion differs from a circle, it will be due only to a difference in amplitude of the two signals.

The cosine function travels to the right; the sine function travels upward.  Successive lines are equally spaced increments of time.  The black dots join two perpendicular lines which correspond to the same moment in time.  The intersection is thus the predicted motion of a particle equidistant from  both originating motions.  The red dot is the first such intersection.  The black line is an equal time curve.  Every point on this curve will experience the same motion as the red dot, delayed in time.
The speed of sound is for fun and is very slow.  For small values of c, the signal cascades over itself in space, which is unrealistic.  As c increases, the response of the medium becomes increasingly linear, and the black dots form a nearly straight line.  The motion of an individual particle is unaffected.

Trace has been turned on for the red dot. How does it move?
The motion is elliptic.

Result 1: The ratio of amplitudes of the two signals is the ratio of the major and minor radii of the resulting elliptic motion.

2. The resulting motion can be determined by projection.  Place one circle in the second quadrant and a second circle in the fourth.  Rotate a vector around each circle following ω1t and ω2t.  Mark equal time intervals of the two motions on the circumference of the circle.  Project these points across the axes and connect the intersections of equal increments of time.  The resulting figure is the motion of the particle.
This is a Java Applet created using GeoGebra from www.geogebra.org - it looks like you don't have Java installed, please go to www.java.com

3. Find the locus of this projection. This is a Java Applet created using GeoGebra from www.geogebra.org - it looks like you don't have Java installed, please go to www.java.com
[i.e. find the locus of the parametric (vector) curve  (A cos(w1 t + α), B sin(w2 t + β))]

Two Questions about Navigating as a Wave

Q1) What is the locus of points equidistant from two circles?

The distance from a point to a circle is understood to mean the shortest distance, which is along a straight line perpendicular to the arc.  On a circle, such a line passes through the origin of the circle... and the other side.  From any point of reference, we are interested in the nearest of these two intersections.

In general, given two sound sources propagating in air, at different locations, for an observer moving in relation to both sources, paths which are solutions to the locus problem are equal time curves.

Geometric solution:
This is a Java Applet created using GeoGebra from www.geogebra.org - it looks like you don't have Java installed, please go to www.java.com
Two circles with centers A and B, radii r and s. The two loci are shown in blue and orange.  Click "Auxiliary Objects" to see the method of construction.
Identifying the cases is tricky with geometry.  Consider a partial construction:
This is a Java Applet created using GeoGebra from www.geogebra.org - it looks like you don't have Java installed, please go to www.java.com
This appears to give the locus of all points F forming isosceles triangles DEF.  There are several problems.  For example, C lies on Ray AD and is undefined for s > r.  But if we use the Line through AD, it intersects α twice and  only one of these intersections at a time can be closest to us.  If F moves along line AD  it gives a second branch to the hyperbola, corresponding to D rotated beyond the point that the two rays AD, BE are parallel.  There is no such isosceles triangle with internal angles > 90°.
The solution is to let C move freely along the line AD, and restrict F to the ray.  Several problems remain, and then there is the question of the second intersection of Ray AD with β'.  Proceeding this way is klunky.  I'll use algebra.

Algebraic solution:
Two circles, α and β lie together on a sheet of paper.  They're just friends.  Their centers are the points A and B.  Draw coordinate axes on the table.  Connect the segment AB, bisect it and call the midpoint m.  Rotate the sheet until AB lies on the x-axis, then move it left or right until m lies on top of the coordinate origin.  O (0,0) bisects AB.  The coordinates of A and B are now A: (-AB/2, 0), (AB/2, 0).  For convenience, let the distance AB/2 = c.  The problem can now be written like this:

There are two circles  α and β with respective origins (-c, 0), (c, 0); and radii  r, s.   Solutions to the first equation form a circle t meters away from α.  Solutions to the second equation are t meters away from  β.  The values of t which satisfy both are the solution to the problem.  If the circles are advancing wave fronts, positive values of t are future times, and negative values are past.

There are four arrangements of the ± signs.

ORANGE:     a){(t), (t)}      b) {(r − t), (s − t)}
The solution in x and y is the same.  If t = k satisfies the first pair, t = −k satisfies the second.  Beginning with a), rewrite the first equation as y2 = (r+t)2 − (x+c)2, and plug this value of y2 into the second equation. Expanding the squares and simplifying, we have   .  Let

Then

Substitute this value of t back into (1), and again expanding the squares and simplifying, we obtain


In  the same manner, beginning with b), we obtain

with the same solution (4).

BLUE: c) {(r + t), (− t)}       d) {(t), (s + t)}
The procedure is the same.  The results are

Which share the solution


Note that (3), (3b) and (4)  can be turned into (3c), (3d) and (4)' by trading the places of R and S.

Preliminary Result:  there are two distinct quadratic solutions of the same form, one determined by the difference of the two radii (R), the other by the sum (S):


Every line through the center of a circle determines two intersections: 1, 2.  Invariably, the closest, or principal, intersection is given by the vector from the center of the circle to our location.  The second intersection is the greatest distance from our location to the circle, and invariably crosses the origin of the circle.  Solutions to (4) and (4') are equidistant from a pair of these intersections... but which pair? There are four possibilities: (α11), (α22); and (α12), (α21).  We want to keep only the first .

ORANGE:
If  R2 < 4c2,  (4) is a hyperbola.
   The branch closer to the origin of the smaller circle: 11), SOLUTION
   The second branch: (α22).
If R2 > 4c2, (4) is an ellipse.  the equal lengths: (α12), (α21)
   according as α or β is greater.

BLUE:
If S2 > 4c2,  (4)' is an ellipse.
    Equal distances: 11), SOLUTION
If S2 < 4c2, (4)' is a hyperbola.
    Equal distances of the two branches:  (α12), (α21)

In summary:
  • ORANGE:   (4) is a solution only when  |R| < 2c
  • BLUE:  (4)' is a solution only when S > 2c
  • Cases:
    • If one circle encloses the other, the solution is an ellipse (4)'.
    • If the circles lie entirely outside one another, the solution is the branch of the hyperbola (4) closest to the smaller circle.
    • If the circles intersect in two points, there are two solutions, one ellipse (4) and one branch of a hyperbola (4)'.
  • The curvature of the locus changes continuously.  As r and s aproach equality, the curvature of the hyperbola goes to zero.  At r=s it is a line.
    Likewise, the curvature of the ellipse approaches a constant as the centers of the two circles approach.  When the centers of the circles coincide, the ellipse is a circle.
    These are not special cases, and part of providing a complete solution is accounting for them as continuous relationships (curvature).
  • The three conditions sign(|R|− 2c); sign(S− 2c); sign(r − s) are sufficient to select the solutions we want.

Spatialization IIc: Microphones and the Mid-Side Image

There are two basic kinds of microphones.  A Pressure  microphone is open to the environment on one side.  The closed side of the diaphragm faces an enclosed volume of air.  Pressure changes on the open side are measured against the closed reference. Such a microphone is omnidirectional: it is insensitive to angular changes in sound pressure.  A change in instantaneous pressure on one side moves the diaphragm.  Forces arriving at different angles, but which produce identical instantaneous pressure are recorded identically.

 In a Pressure Gradient microphone, the diaphragm is open on both sides.  The pickup pattern is a figure-8.  There is no reference volume for forces arriving off the axis of the diaphgram: equal forces in opposite directions cancel and the component of force in the direction perpendicular to the diaphgram is always zero, irrespective of the magnitude of the force.
The gradient microphone records the component of force in the direction of its axis.  It experiences a phase difference in sound pressure.

 A pressure mic can be combined with a gradient mic to create a directional microphone with a cardioid pattern:
FIG1 Adding Capsules
This is a Java Applet created using GeoGebra from www.geogebra.org - it looks like you don't have Java installed, please go to www.java.com
FIG1
General equations for the omnidirectional microphone is
Omni :      r = a
Figure-8:  r =  b cos θ      {Cartesian:  (x-b/2)2 + y2 = (b/2)2}

1. Cardioid = Omni + Gradient:
   (1)       rc =   a + b cosθ  = Mid
The classic cardioid is produced when the two circles are tangent; when a = b :
   (1b)      r= a(1+cosθ)
In a Mid-Side recording, this is the Mid microphone.

2. Stereo = Cardioid ± Gradient (figure-8):
   (2L)     rL = a + b cosθ + c sinθ   = Mid + Side
   (2R)    r= a + b cosθ − c sinθ  = Mid − Side
where abc. are arbitrary positive constants.
The second (Side) microphone is perpendicular to the axis of the cardioid.  In other words,

Mid-Side recording (perpendicular figure-8's + omni) is a stereo field (a Blumelein pair) with an oreintation provided by the omni capsule.
These are precisely the preliminary conditions we require for an orientable image.  Note that a Blumelein pair is insufficient; it lacks an orientation.

To compare different stereo recording methods, and transform them as spatial images, I need a series of reference points.

Reference Microphone and Level:  Use a cardioid (directional) microphone as a frame of reference, with a polar pattern normalized to r=1 in the direction of maximum sensitivity.
(I may switch to using a reference area.)

The maximum value of (1) is  a + b.  Hence a = 1 − b,  and
  (1)'       rc = 1 + b(cosθ −1),    0 ≤ b ≤ 1
b interpolates between omnidirectional (b=0) and figure-8 (b=1).  The classic cardioid occurs at b = ½.

We now have for Stereo (2) :
 (2)'     rL,R = 1 + b(cosθ −1) ± c sinθ
 rL and rR are symmetric about the facing vector. The matrix <M+S, M−S> = <L, R> represents two cardioid patterns rotated in ±θ  respectively.  As c increases from 0 (no Side channel), M + S rotates toward 90°, but won't reach it unless b=0.  For rL, all values of sin, cos are positive.

Stereo Width:
Let θ1 denote the angle of maximum sensitivity implied by L.  rL is maximum when   , and r ≠ 0.  Hence,     .
The width of the image is then  .    Constants vanish when we take the derivative and do not affect directionality of the stereo image.

I should track the maximum value of r. Work out constraints later.  Mid-Side
          
Plugging these values into (2)',
          

FIG3: Reference Signal
This is a Java Applet created using GeoGebra from www.geogebra.org - it looks like you don't have Java installed, please go to www.java.com

FIG3 Drag the red dot to change the angle of the source relative to the microphones.
Given two identical sources of equal magnitude, the same distance from the microphone,  no two angles around the circle produce the same output.  Disturbances reach the microphones from all directions, continuous in time,  and the result is a stereo image.

I will begin with the assumption that the imaging resolution is infinite.  In other words, if the membranes vibrate, then they will do so according to the laws of mechanics.  The sensitivity of the membranes (and the bit depth of a resulting digital recording) determine the sensitivity to differences in phase angle.

Notes: Sound is a field.  A sonic image is a relative map.  It does not imply a knowledge of the absolute position of objects.  A walk down the street with eyes closed should be enough to understand the division.

There is only so much time to spend on the implications of physics on the panner.  The pan pot has no meaningful relationship to spatial imaging. Likewise, the surround speaker solution.  It is expensive and reduces the imaging resolution to a handful of points in space.  The sources of two sounds which arrive at different points at the same time are equidistant from both points.  Changing the gain of the image at playback, at the speaker has no relationship to position of a source in space.  If it arrives at both ears at the same time, it is in front of us.  Interpolation between  speakers has the same relationship to 3-dimensional space as panning a static image across the screen.  The illusion is vague and lacks flexibility.  It is not a transformation which implies a change in relationship between the viewer and the image.  If we layer and pan many images this way, adjusting the gain so each is "brightest" at its center, we have a collage.

Constructing a new space from scratch, and transforming it in time is a completely different question.

We distinguish the problems with our own approach.  There is the "dead spot" at the center between the speakers.  And now we have another speaker there.  This is all nonsense.  We all also understand that a properly recorded stereo image creates an invisible column directly in front of us in space. An image too dense in the center can be widened, and new sounds placed in this invisbile column.   The width of a stereo image is arbitrarily hight and can be adjusted with a single scalar.
If we choose to adjust the gain of mono files instead, certain observable properties result, which are independent of the number, or arrangement of speakers.  Of particular note is the loss of an image between two speakers.
But imaging was the thing to be done.  Interpolation is the most impoverished possible image given the technology at our disposal.

 It remains to identify procedures we can carry out in the recording and mixing process which will allow us to leverage such images as orientable objects.  Exactly as the visual artist.

Next up: Two sources at variable angles and distances.

Monday, December 24, 2012

The Elliptic Integral

The motion of an undamped pendulum. This is a Java Applet created using GeoGebra from www.geogebra.org - it looks like you don't have Java installed, please go to www.java.com Explanations forthcoming. And soon to be addressed, the mystery of how Javascript turned 150k of image files into 650. It's Christmas Eve. Close eyes and think of rainbows. Dance a halling. Norwegian elves are standing by for your call.