Midpoint Movement

Snare

New member
Joined
Feb 11, 2015
Messages
2
Yo!

So, the issue is basically to get from Image 1 to Image 2.

Original setup:

0






The red dots are the mid-points (x & y).

Now. How much do I need to compensate (relatively) on B's origin x & y values to match up B's midpoint with A's midpoint and end up with this:

0


You can assume a standard Cartesian plane, so negative values are fine. The most important thing is that A will never move. B must move relative to A to make sure the midpoints match up exactly.

Can anyone help?
 
Yo!

So, the issue is basically to get from Image 1 to Image 2.

Original setup:

0




The red dots are the mid-points (x & y).

Now. How much do I need to compensate (relatively) on B's origin x & y values to match up B's midpoint with A's midpoint and end up with this:

0


You can assume a standard Cartesian plane, so negative values are fine. The most important thing is that A will never move. B must move relative to A to make sure the midpoints match up exactly.

Can anyone help?


I'm not sure about others but, to me, it looks like your image was "drawn in invisible ink"
 
The links are to images inside what appears to be the poster's gMail account. I'm not going to try to hack the account to retrieve the images. :shock:
 
Yo!

So, the issue is basically to get from Image 1 to Image 2.

Original setup:



unnamedw.jpg

The red dots are the mid-points (x & y).

Now. How much do I need to compensate (relatively) on B's origin x & y values to match up B's midpoint with A's midpoint and end up with this:

unnamed1.jpg

You can assume a standard Cartesian plane, so negative values are fine. The most important thing is that A will never move. B must move relative to A to make sure the midpoints match up exactly.

Oh - I did neglect to mention that the trick is of course that the only values you have for certain, is the origin of A. At any given point, you would have to calculate the other three corners of the rectangle, and thus also the origin of B.

Also, the translation of B needs to happen in terms of its origin, i.e. even if I correctly calculate the midpoints for both A and B, I can't just say "move B's midpoint to the coordinates of A's midpoint". I'd have to work out the current origin of B first, then work out how much that origin needs to be translated relative to the midpoint of A (or relative to anything of A, really) in order to have the midpoints line up.


Sorry for the upload error of the pictures initially
 
Yo!

So, the issue is basically to get from Image 1 to Image 2.

Original setup:



View attachment 4952

The red dots are the mid-points (x & y).

Now. How much do I need to compensate (relatively) on B's origin x & y values to match up B's midpoint with A's midpoint and end up with this:

View attachment 4951

You can assume a standard Cartesian plane, so negative values are fine. The most important thing is that A will never move. B must move relative to A to make sure the midpoints match up exactly.

Oh - I did neglect to mention that the trick is of course that the only values you have for certain, is the origin of A. At any given point, you would have to calculate the other three corners of the rectangle, and thus also the origin of B.

Also, the translation of B needs to happen in terms of its origin, i.e. even if I correctly calculate the midpoints for both A and B, I can't just say "move B's midpoint to the coordinates of A's midpoint". I'd have to work out the current origin of B first, then work out how much that origin needs to be translated relative to the midpoint of A (or relative to anything of A, really) in order to have the midpoints line up.


Sorry for the upload error of the pictures initially

From your pictures, I will assume that both rectangles are in the 4th quadrant, with a corner of rectangle "a" on the origin.

Therefore, the center of rectangle "a" is located at ((1/2)Wa, -(1/2)Ha).

For rectangle "b": the x coordinate of the center will be Wa + (1/2)Wb; the y coordinate will be at -(1/2)Hb.

Does my interpretation make sense? Can you proceed from here?
 
Top