Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How does one carry out a coordinte change to map image from one catesian to another?

Status
Not open for further replies.

matrixofdynamism

Advanced Member level 2
Advanced Member level 2
Joined
Apr 17, 2011
Messages
593
Helped
24
Reputation
48
Reaction score
23
Trophy points
1,298
Activity points
7,681
I have an image existing in space x[-2,1] y[-1.5, 1.5]. I want to project it into an axes with dimensions x[0,800] y[0,600]. How do I do this? What is generally the formula for such projections?
 

Generally, you multiply by a scalar, then add an X offset, and a Y offset.
Or alternately, first add the offset, then multiply by a scalar.

Do you wish to preserve aspect ratio? If so then your image may leave unused margin space on one axis.

It looks as though your image occupies 3 units in both axes. Then your scalar is calculated as 600 divided by 3 (=200). This is if you wish your image to fill the entire vertical canvas, and if you wish to preserve aspect ratio.

Perhaps you want to stretch your image to all extreme edges of your canvas? Then scale your X axis differently (calculated as 800 divided by 3).

For horizontal axis add an offset that centers your image at the 400 mark. For vertical axis it's the 300 mark.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top