Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding centre of rotation for a set of points [closed]

If I have an arbitrary set of points, and then the same set of points rotated by some degree, does anyone know of any algorithms to calculate/estimate where the centre of the rotation is? Or an area of study where these kinds of algorithms are needed? I am having trouble finding any relevant information.

Thanks

like image 210
philbert Avatar asked Nov 04 '10 19:11

philbert


People also ask

Where is the Centre of rotation for rotational symmetry?

The centre of rotation symmetry is right at the centre of the shape.

What is an example of a center of rotation?

The center of rotation is the point at which a picture turns. Or, to put it another way, if you try to hold the paper still with your pencil and turn the paper, the place where your pencil leaves a mark is the center of rotation. If the center of rotation were on a three dimensional object, it would be called the axis.


2 Answers

Lets say you have one point (x, y), that moved to (x', y').

Then the center of rotation must lie on the line that is perpendicular to (x,y)-(x',y'), and that intersects the center (x,y)-(x',y').

Now take another point, (x2, y2), that moved to (x'2, y'2). This also gives rise to a line on which the center of rotation must be located on.

Now take these two lines and compute the intersection. There you have the center of rotation.


Update: If you don't have the correspondence of which point went where, it shouldn't be too hard to figure out. Here is a suggestion from top of my head: Find the center of mass of the "before"-points. Order the points according to their distance from this point. Now do the same with the "after"-points. The order of the two sets should now match. (The point closest to the center of mass before rotation, should be the point closest to the center of mass after rotation.)

like image 81
aioobe Avatar answered Oct 02 '22 18:10

aioobe


It would be crazy overkill for this type of problem, but I think the functionality of the generalized Hough transform for object detection at least encompasses what you want, even though it's not quite meant for this purpose.

Given an arbitrary shape created from a set of points, and another arbitrary set of points, it tries to find the shape in the set of the points even though it's been rotated, scaled, and translated. You might be able to take out the scaling and translation and get what you want.

Basically what it would come down to is brute forcing possible rotation points to see which one fit the second set of points best.

like image 21
user470379 Avatar answered Oct 02 '22 20:10

user470379