Help relating two coordinate systems

mound

New member
Joined
Apr 20, 2012
Messages
2
Hello
This is probably exceedingly simple, but for some reason my brain struggles with this type of thing.

I'm trying to relate points in one grid to points in another, but they have opposite orientations. See the below image:

grids.jpg

The outer grid has an upper left origin point (0,0).. The inner grid (red) has a lower/right origin point (0,0). The outer grid is 800x800 and the inner is 310x310. This is for a piece of visual control software I am working on and the outer grid represents the screen and the inner represents motor positions for the hardware I am controlling.

What would be the proper formula for me to relate a known point in the outer coordinate system to a relative point in the inner coordinate system?

Thanks for any assistance!
 
Last edited:
Turning it around is relatively easy.

If x represents the black coordinates, then define t = 775-x just to reverse things.

Then define y = t*(310/800) to scale to the red coordinates.

Let's see if it works:

x: (700,600)
t: (75,175)
y: (29.0625,67.8125) <== Is that the right place?
 
Last edited:
Thanks! I think this just about gets it.. I have to tweak it though:

y=t*(310/750)

instead of

y=t*(310/800)
 
Top