coordinates

IDL: Can I get the coordinates of a point on my plot's cartesian plane?

I have a plot like this: http://i.imgur.com/i9xp5.png I need the data coordinates of points in order to plot wind barbs. Now, if I wanted a wind barb to be drawn at x=100, y=20, is there a way I can obtain the data coordinates of that ( or other ) points of my plot? ...

In a WPF user control, how do I specify coordinates relative to the control's total size, so that the control will scale correctly?

I have created this simple expand button user control with WPF:          I designed the thing with Width and Height both set to 100 so that I could see what I'm actually doing. The stripped-down XAML of this user control is: <UserControl x:Class="Foobar.ExpandButton" ... Width="100" Height="100"> ... ...

GPS coordinates on mobile phones

Can GPS on a phone, such as iPhone or Android determine your Z coordinates ? I know it certainly has to be able to determine X and Y, well longitude, latitude that is, but what about the Z coordinates ? Can it determine your height, and can I obtain height relative to ground ? ...

pygame vs. VPython for visualizing PyODE

I made a program similar to the second PyODE tutorial but using VPython instead of pygame and I removed the coord function for changing coordinates. It works but the locating of the spheres and joints isn't correct. I am guessing that it is because I am using the PyODE world coordinates within VPython. Would this in the circumstance I de...

Negative coordinates in pygame

What would be the best way to use negative coordinates in pygame? At the moment I have a surface that is 1.5 times the original surface then everything that needs to be drawn is shifted up by a certain amount (to ensure the negative coordinates become positive) and drawn. Is there an easier/alternate way of doing this? ...

How do I get the paintable area in a CFrameWnd with dialog bars?

I have a CFrameWnd with a dialog bar, and I'd like to determine the paintable area (excluding the space used by the dialog bar) so I can draw in it without being overlapped by the dialog bar. How can I do this? GetClientRect() seems to cover the client rect area as well, and I don't see any other obvious candiates in the doucumentation. ...

How to find out whether an affine transformed rectangle contains a certain point, in Java?

Hi, I'm trying to make an interactive GUI but I need to move a certain object whenever that rectangle is clicked + dragged. Basically I wanna know whether a rectangle, that has been affine transformed, contains a specific point (x, y). Is there a way to do this? I have tried using contains() method but it doesn't work for a rectangle th...

PHP MySQL get locations in radius user's location from GPS

Hi, I have in my database car incidents for example. These incidents have a latitude and longitude. On a mobile using the GPS, I get the user's location with his coordinates. The user can select a radius that he wants to know if there are incidents around him. So let's say he want to know incidents 2 miles around him. So I send from th...

Calculating the angle between two lines without having to calculate the slope? (Java)

Hi, I have two Lines: L1 and L2. I want to calculate the angle between the two lines. L1 has points: {(x1, y1), (x2, y2)} and L2 has points: {(x3, y3), (x4, y4)}. How can I calculate the angle formed between these two lines, without having to calculate the slopes? The problem I am currently having is that sometimes I have horizontal lin...

UIView touch location coordinates

What are the coordinates used in UIViews and their corresponding superviews? I have this code which i would like to detect a 'corridor' where the user can touch... similar to this image: This is the code i have: CGPoint touch = [recognizer locationInView:[shuttle superview]]; CGPoint centre = shuttle.center; int outerRadiu...

Convert Lat/Lon to MGRS

Does anyone know where I could find a library of code for converting Lat/Lon position to Military Grid Reference System (MGRS)? I'm looking for a C# implementation if possible. ...

Convert lat/lon to pixels and back

I'm using google maps in my application, and I have a webserver with a databse filled with lat/lon values. I want to mark them on the map, but I also want to cluster them together if they are within a certain pixel-distance of eachother. I figure if I retrieve all my points from the database, I should be able to do something like this (...

In flex, how to get cooridnates when using VBox for stacking up components?

In flex, I am using VBox & HBox to stack components. When I try to get x,y coordinate of a component, I always get 0. If I specify cooridnate like mx:VBox x="120", then I get the value. How can I get the coordinate without explicitly stating it. ...

Create curve 'algorithm' after capturing points from user?

I am capturing some points on an X, Y plane to represent some values. I ask the user to select a few points and I want the system to then generate a curve following the trend that the user creates. How do I calculate this? So say it is this: Y = dollar amount X = unit count user input: (2500, 200), (4500, 500), (9500, 1000) Is there a...

WPF: what object to use as a multi-cell grid which coordinates can be read from?

I need to create the following WPF application: A main window with a square grid in it. The grid should have a large amount of cells in it (for example: [1000x1000]), each cell being painted black or white. A "Robot" object should be able to walk on the grid from cell to cell. I thought of using a Uniformgrid object, but I suspect th...

How to plot two equidistant moving points?

Imagine a surface which has got 2 points which are moving over the surface (resulting into various lines and curves) while adhering to the following conditions. These two points are always and always at a constant C distance from each other. Each point has it's own velocity and direction vector. Of course both these parameters will be...

WPF: Panel with percentage coordinates

Hi, I would like use a panel whose children have coordinates specified as percentage of total panel's width/height. Moreover, I should be able to animate the coordinate property, for example to make a button move from 10% to 50% panel's width. I've made 2 attempts: Use a Grid and specify size as stars - this was not enough, because A...

Retrieve co-ordinates of points from a saved google map

My client has saved a public Google Map with several points of interest marked on it. I need to somehow lift those co-ordinates and put them in an iPhone Google Map. How would I get the longitude & latitude of each of these points? ...

Cross Streets Calculation

How can I get the cross street names of one particular street? Lets say I am on a street name B and I want to get two street either side of street B. I also have co-ordinates for the street B. I think this can be achieved using calculation over co-ordinates. How? If B street has Lon: 40.4325342 and Lat: -72.5346344, can I get the near...

In flex, how to get correct Y-axis when there is a vertical scroll?

In flex, I am getting the y-coordinate in the following way: nextHBox = HBox(ingBox.getChildByName("ing" + nextId)); nextYAxis = ingBox.localToGlobal(new Point(nextHBox.x,nextHBox.y)).y; newCanvas.x = nextYAxis; nextYAxis gives me the y-axis and I use it to position new component. It works absolutely fine. But, when there is vertical...