15,668,167 members
1.00/5 (1 vote)
See more:
In my entire application I work with cartesian coordinates(2 dimensions ) and everything is just fine . But finaly I need to display some points on the screen and I think that I need to convert my points from cartesian to screen coordinates and I have no idee how to do that.

for exp in cartesina coordinates
X axis [-200,200]
Y axis [-200,200]
that meens that for the screen coordinates

X axis is in the interva [0,400]
Y axis is in the interval [0,400]

I need some help with this "conversion" because I really don`t know how to do it;
Thank you.
Posted

## Solution 1

Hi,

with a short description below the formula.

Xscr = Xc + (X-Pcx)*Scale
Yscr = Yc - (Y-Pcy)*Scale

Xscr = result from mapping cartestian to screen
Xc = half of screen size
X = X cartesian coordinate
Pcx = centre of the screen in caresian coordinates
S = Scale Factor

Regards

How can I get the scale ? For my exp the scale with be 2??
Thank you for your fast replay.
El_Codero 1-Mar-12 18:14pm
Don't exactly know what's your problem now but yes you set the scale.
Please scroll down to Scaling at "Cartesian formulas for the plane" in wikipedia, described well there, otherwise comment again ;)

http://en.wikipedia.org/wiki/Cartesian_coordinate_system[^]
El_Codero 2-Mar-12 6:47am
Hm, why downvoted?