Hy everyone,
I have a set of 2D cartesian points (x,y coordinates) lying inside an arbitrary closed contour , something like this: arbitrary_closed_contour
by 'arbitrary' I mean that the closed curve does not resemble any circle or ellipse.
What I want to do know is to map each pair of x,y coordinates to unit circle, thus obtaining something like this: points mapped to unit circle
How to accomplish this? I must confess up to this point I'm clueless!
Thanks for any suggestion.
Update: (based on @bubba comments)
Some clarifications:
- I want to map each pair of (x,y) coordinates to the unit disk, not the unit circle.
- The points I want to map emanate all from the same origin of coordinates. They're also distributed along a set of rays radially distributed
- Each of these rays have two extrema points ((xA,yA) and (xB,yB)) each of them located at a different distance from the origin. Constrain: when mapped each of these points should be located on r=1
You're really mapping points to the unit disk, not the unit circle.
It looks like the points are all aligned on a finite number of "rays" that emanate radially from the origin. If so, this makes things much easier.
On a given ray, you map points as follows: Let $d$ be the distance from the origin to the outermost point on the ray. The mapping for points on this ray is then just $(x,y) \mapsto (x/d, y/d)$.
If you want a single mapping/deformation that applies uniformly to all points, regardless of what ray they lie on, then some sort of interpolation between rays would be needed. But I won't go into that unless you confirm that you need it.