MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

# Thread Subject: 2d morphing of polygons and dependent lines

 Subject: 2d morphing of polygons and dependent lines From: Johannes Korsawe Date: 11 Jul, 2012 13:13:07 Message: 1 of 1 Dear community, i have the following task: Let P1 and P2, size(P1) = size(P2) = [10,2] denote two polygons in 2d space (they seem to be nearly equal, but this does not matter for the task). Let C, size(C) = [100,2], denote some curve inside the polygon P1. If i want to morph polygon P1 into polygon P2, i can use polymorph from the FEX e.g.. But how should i morph the curve C , which "depends" from its "ruling boundary" P1, into some target D (size(D) = [100,2])??? To give an example: If P1 denotes a square, P2 denotes a rectangle and C denotes a circle around the middle of P1, then D should be some ellipse. If the other way round, P1 and P2 denote circles with not identical midpoints, and C is a square inside P1, i want D to be some rectangle inside P2. You see the idea? I do not want some very specific outcome of D, but it should be some smooth morphing out of C. Now, how to do this? If P1 and P2 are both triangles, i could use barycentric coordinates If i can mesh the areas of P1 and P2 "accordingly" with triangles, i can use repeated barycentric coordinates as well. But these are very special cases. What to do in general? Best regards, Johannes