Wednesday, June 15, 2005

Conformal Mapping

Conformal Mapping

1. Remove points inside a minimum radius. Coordinate within a dz crosssection are x1,y1 and in polar coordinates are r1,theta1 where the optical center is the origin.

2. Determine x2,y2 from the conformal map r2=1/r1 and theta2=theta1. Then x2=r2*cos(theta2) and y2=r2*sin(theta2).

3. Apply the convext boundary search in the new coordinate system (x2,y2).

4. Knowing the points that define the convex line segments, map back as r1=1/r2 and x1=r1*cos(theta1), y1=r1*sin(theta1).

5. The average of the convex inside and outside boundary can be used as the result. The way you map it to a mat5 matrix that is Z along the horiz and theta1 along the vertical is to simply map the end points (Z,thetaA,Z,thetaB) of each point pair, first in the outter boundary, in {Z,theta} space, then back out theta1 by selecting all pixels between the end points, in the mat5 matrix. For each value of theta1 you can get r1 and from that you can get (x1,y1) to fill the rest of the mat5. Next do another mat5 for the inside boundary and then finally average the two mat5 values together. Where there is no overlap, put a 0 in the final indicator function. The result should be a convex shell approximating the surface.