How to find a (set of) mapping between two polygons?

Provided that there are two set of points in a plane, we can find two minimum convex polygons containing these points. Two polygons may have the same or different amount of vertices, we assume polygon A has N vertices and polygon B has M vertices, how can we find a set of mappings M that containing all feasible mapping m(i) satisfying m(i)*A ∈ B, where A is a 2*N matrix and B is 2*M and m(i) is 2*2 mapping matrix?
If m(i) is diagonal matrix then we can find a intersection of all mappings map every vertex of A inside B, but if m(i) is full-element matrix, how to find a solution?
Thank you all.

1 Comment

This doesn't sound like a problem Matlab can really help with; it sounds like a (difficult) topological problem which needs a theoretical solution before you could implement it in Matlab. Why or how are planning to use Matlab to solve this?

Sign in to comment.

 Accepted Answer

You cannot take a 2*2 matrix and to a matrix multiplication of it on the left hand side of a 2*N matrix and end up with a 2*M matrix. Simple rules of matrix algebra tell you that you will get a 2*N matrix, not a 2*M matrix.
I'm also confused as to why you give an index to the matrix m, as in "m(i)*A". Normally when you specify an index, you get one scalar element of m (unless m is a cell array which it's not). So I assume you meant m*A where * is the matrix multiplication operator.

4 Comments

As I understand it, he wants the 2XN matrix to be transformed by the mapping function m such that the new polygon is located inside the convex hull defined by the other polygon (2xM points). I assume the index is to index the set of feasible mapping m(i) in M.
You can see why this seems wildly out of scope for Matlab to tackle.
Do you mean like he wants to scale and translate the convex hull of one of them to fit completely inside the convex hull of the other one? (If so, what would be the use case?)
Yes, but he wants to find all possible scale/translate/rotate combinations that fix polygon A inside polygon B. The object of interest is a set of mapping.
I cannot imagine a use case that isn't abstract mathematics; maybe some kind of minimal shape compression algorithm... but that would be much simpler since you don't need to find all of them.
Qiu
Qiu on 19 Dec 2015
Edited: Qiu on 19 Dec 2015
As @jgg said, I meant I hope to find a set of mappings map polygon A inside polygon B.
M is a set of multiple mappings, every element in M was denoted by m(i), which is a 2*2 matrix. Actually I wanted to use a subscript for i but I don't know how to type it here, sorry for your confusion caused by my impreciseness.
Anyway, if all element in M is diagonal matrix, the solution is simple. But how about for a non-diagonal matrix, like perspective or affine transformation matrix(when points are in 3-dimension)?

Sign in to comment.

More Answers (0)

Categories

Products

Asked:

Qiu
on 18 Dec 2015

Edited:

Qiu
on 19 Dec 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!