Cartesian Coordinates

Blitz3D Forums/Blitz3D Beginners Area/Cartesian Coordinates

Waz(Posted 2003) [#1]
Hi all!

Reading Krylars book this sounds like a must LEARN thing but I kinda understand his book but then again need more explaining on the way BB uses cartesian.

Can someone explain to me in a more easier way plz.

Cheers

Wazy!


semar(Posted 2003) [#2]
Can you be more specific ?

What do you need to be explained ?

Cartesian coordinates work, in Blitz, as any other graphic language: x coordinates goes from 0---> screen width; for example, in a 640 X 480 screen, 0 is the very left edge, while 480 the very right one.

For y coordinates, they starts from up istead, and increase from 0 to screen height.

So, 0,0 is the upper left corner of the screen; 640,0 is the upper right corner; 0,480 is the lower left corner, while 640,480 is the very lower right corner:

0,0 . . . . . . . . 640,0
.
.
.
0,480 . . . . . . . 640,480

So, if you want to move an astroship on the screen, and you want to move from left to right, you have to increase the ship's x coordinates; while if you want to move the ship up, you have to decrease its y coordinates.

Hope this helps,
Sergio.


DarkEagle(Posted 2003) [#3]
you know how you used to draw graphs in school (or perhaps still do? i have no idea :P) with the origin, and the x and y axis? well the origin is at the top left of the screen, meaning that if you drew your axis like normal, your blitz screen would be in the bottom left quarter of the graph...

hope i didnt confuse you more :P