Morphing 2D cartesian coordinates, from one shape to another

4 visualizaciones (últimos 30 días)
Right Grievous
Right Grievous el 21 de Oct. de 2014
Comentada: Right Grievous el 23 de Oct. de 2014
Hi All,
I have a slight problem for which I'm sure there must be a Matlab function but I can't work out what it is. I have a load of 2d cartesian coordinates which all fall within a rectangular box (A), I need to morph these coordinates to fill a different box (B) which has the same dimensions but is rotated to a different angle. I need to morph the coordinates, not rotate them (I can do that already).
I have been looking at various functions but they all seem to be related to images, not coordinate data, although many of them take a series of coordinates on which to base their morphing, which is why I think Matlab must be able to morph the coordinates themselves...
Any help would be greatly appreciated,
  2 comentarios
Right Grievous
Right Grievous el 23 de Oct. de 2014
Yes, I have done this already, I can rotate the coordinates fine. But I don't want to rotate them now, now I want to morph the first set of coordinates to fit box B, there is a difference.
i.e. Lets say box A is a vertically oriented rectangle and box B is a horizontally oriented rectangle. Now lets say there are a bunch of coordinates at the top right corner of box A. If I rotate the coordinates to fit box B they will now fall in the bottom right corner (because they have been rotated 90 degrees clockwise). However, what I want to do is morph them so that they will still be at the top right corner in box B; all of the coordinates will be stretched in the horizontal plane and squeezed in the vertical plane to fill a horizontal box instead. This wouldn't be too difficult to do, except that my boxes are all rotated at odd angles to each other.
I hope this clarifies things.

Iniciar sesión para comentar.

Respuestas (0)


Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by