Questions tagged [coordinate-systems]

Coordinate systems use one or more numbers, or coordinates, to uniquely determine the position of a point or geometry in space.

Coordinate systems use one or more numbers, or coordinates, to uniquely determine the position of a point or geometry in space.

Latitude and longitude is part of a common coordinate system to refer to points relative to the Earth's surface. Global Positioning System (GPS) uses a coordinate system with latitude and longitude for navigation and locating objects on or near the Earth.

A Cartesian coordinate system uses X-Y-Z values to represent points in a 3-D space.

839 questions
160
votes
3 answers

How do android screen coordinates work?

I am working with Android Animation and I have found the Android coordinate system to be quite confusing so I am here to ask this question about how coordinates work in Android. I am following this image for moving one view to another but it seems…
Yasir Khan
  • 2,263
  • 4
  • 17
  • 26
74
votes
9 answers

flip svg coordinate system

Is there a way to flip the SVG coordinate system so that [0,0] is in the lower left instead of the upper left?
Nippysaurus
  • 19,402
  • 18
  • 71
  • 124
58
votes
6 answers

Changing the Coordinate System in LibGDX (Java)

LibGDX has a coordinate system where (0,0) is at the bottom-left. (like this image: http://i.stack.imgur.com/jVrJ0.png) This has me beating my head against a wall, mainly because I'm porting a game I had already made with the usual coordinate…
Sosavpm
  • 683
  • 1
  • 5
  • 6
55
votes
7 answers

Python conversion between coordinates

Are there functions for conversion between different coordinate systems? For example, Matlab has [rho,phi] = cart2pol(x,y) for conversion from cartesian to polar coordinates. Seems like it should be in numpy or scipy.
cpc333
  • 1,095
  • 1
  • 9
  • 10
47
votes
1 answer

Hexagonal Grid Coordinates To Pixel Coordinates

I am working with a hexagonal grid. I have chosen to use this coordinate system because it is quite elegant. This question talks about generating the coordinates themselves, and is quite useful. My issue now is in converting these coordinates to…
captncraig
  • 19,430
  • 11
  • 95
  • 139
34
votes
3 answers

Check if geo-point is inside or outside of polygon

I am using python and I have defined the latitudes and longitudes (in degrees) of a polygon on the map. My goal is to check if a generic point P of coordinates x,y falls within such polygon. I would like therefore to have a function that allows me…
33
votes
4 answers

Convert a UIView origin point to its Window coordinate system

I want to get the origin of scrollView in the window coordinate system. For Example, presently, scollView origin is (0,51). But in window coordinate system it should be 51 + 44(navigation bar height)+20(status bar height) = 115. Means in window…
Nishit
  • 573
  • 1
  • 6
  • 17
33
votes
1 answer

R - plot human body in 2d

I was wondering if there is a package to plot a 2D representation of the outline of a human body? Being in 2D, plotting either the front/back/side at any one time would presumably be the easiest way to accomplish this. The output would be something…
thelatemail
  • 81,120
  • 12
  • 111
  • 172
28
votes
5 answers

Generating triangular/hexagonal coordinates (xyz)

I'm trying to come up with an iterative function that generates xyz coordinates for a hexagonal grid. With a starting hex position (say 0,0,0 for simplicity), I want to calculate the coordinates for each successive "ring" of hexagons, as illustrated…
John Schulze
  • 2,028
  • 3
  • 19
  • 22
28
votes
4 answers

Acceleration from device's coordinate system into absolute coordinate system

From my Android device I can read an array of linear acceleration values (in the device's coordinate system) and an array of absolute orientation values (in Earth's coordinate system). What I need is to obtain the linear acceleration values in the…
25
votes
4 answers

Algorithm for finding nearest object on 2D grid

Say you have a 2D grid with each spot on the grid having x number of objects (with x >=0). I am having trouble thinking of a clean algorithm so that when a user specifies a coordinate, the algorithm finds the closest coordinate (including the one…
random
  • 343
  • 1
  • 3
  • 5
24
votes
11 answers

Free tool for watching coordinates in PDF

Is there any tool in some PDF Viewer/Editor like Acrobat, Evince, etc. where I can navigate and watch coordinates(i.e. (x,y)) of any selected point in PDF-document?
Michael Z
  • 3,229
  • 6
  • 35
  • 54
24
votes
10 answers

How to draw lines in Java

I'm wondering if there's a funciton in Java that can draw a line from the coordinates (x1, x2) to (y1, y2)? What I want is to do something like this: drawLine(x1, x2, x3, x4); And I want to be able to do it at any time in the code, making several…
Karoline Brynildsen
  • 3,498
  • 5
  • 32
  • 43
24
votes
2 answers

Difference between layerX and offsetX in JavaScript

There are different co-ordinate system for JavaScript, such as e.clientX, e.screenX. I understand those two well, but there are some like e.layerX and e.offsetX. These two are not very clear to me. Can someone explain those two co-ordinates for me?
AL-zami
  • 7,637
  • 11
  • 53
  • 104
18
votes
2 answers

Mac OS X: Convert between NSView coordinates and global screen coordinates

I have the following situation in my multi-monitor setup: In this example I want to position a window exactly at the coordinates depicted with the yellow arrow. All I do have however, are the coordinates of an NSView that is a subview of the…
scrrr
  • 4,684
  • 5
  • 39
  • 44
1
2 3
55 56