coordinates

WPF how to show an Image.Source (BitmapSource) pixel position?

Let's suppose I've got an image which shows its source in a scaled way, how could i use a MouseMove event to show in a label or textblock the pixel position in which the cursor is? (I need the pixel coordinates not the coordinates of the image relative to its size) Thanks in advance. ...

google maps, cellid to location

According to this sample: http://www.codeproject.com/KB/mobile/DeepCast.aspx It's possible to request a gps coordinate (longitude & latitude) including range when sending cellid information (MCC, MNC, towerid, etc) Can someone tell me the actual parameter to request/post to this address? http://www.google.com/glm/mmap It could be so...

How to map a point onto a warped grid

Say you have a collection of points with coordinates on a Cartesian coordinate system. You want to plot another point, and you know its coordinates in the same Cartesian coordinate system. However, the plot you're drawing on is distorted from the original. Imagine taking the original plane, printing it on a rubber sheet, and stretch...

A question on how to Get data from plist & how should it be layout.

This is a follow up question on my first queries regarding retrieving data on plist. Right now i have manage to detect users touches made on my view with random image call out (thanks to phytonquick). CGPoint currentTouchLocation = [currentTouch locationInView:self]; Im having trouble now on how to compare the value i got from the use...

c++ OpenGL coordinate transformation

Hi I just don't seem to be able to figure this out in my head. I'm trying to move an object in 3D space. If I have a point at 5,15,5 and use opengl functions to change the model view.... glTranslatef( 10.0f, 4.0f, 4.0f ); glRotatef( 33.0f, 1.0f, 0.0f, 0.0f ); glTranslatef( 10.0f, 4.0f, 4.0f ); Is there a way I can find out where tha...

SVG Absolute coordinates?

Hello, I have some SVG files which have many text nodes in them. I would like to get the absolute position of each of the text nodes, within the SVG document (the SVG documents have width="743.75" and height="1052.5"). An example text node looks like this: <g> <text transform="matrix(1,0,0,-1,106.5,732.5)"> <tspan x="0 7.897999...

How can I print a string to the console at specific coordinates in C++?

Hello, I'm trying to print characters in the console at specified coordinates. Up to now I have been using the very ugly printf("\033[%d;%dH%s\n", 2, 2, "str"); But I just had to ask whether C++ had any other way of doing this. The problem is not even that it's ugly, the problem comes up when I try to make myself a prettier function lik...

How do you handle multiple textures in an OpenGL indexed buffer array for use with a data-shader?

I'm attempting to implement this paper. I've have most of it down, but the part about sending arbitrary, non-geometric data to the shader for use in determining and displaying geometric edges is causing me problems. I've managed to successfully send most of my data just fine using what I know of VBOs. However, I need to send a large amou...

CGrectContainPoints & Touches queries

Im getting straight to the point. I have static coordinates stored as array and i want to compare this coordinates with user touch. //touch handling UITouch *touch = [[event allTouches] anyObject]; CGPoint touchPoint = [touch locationInView:touch.view]; //comparing touches if (CGRectContainsPoint((CGRectMake(x1, y1, w, h)) , touchPo...

How to get cardinal mouse direction from mouse coordinates

Hello, is it possible to get the mouse direction (Left, Right, Up, Down) based on mouse last position and current position? I have written the code to calculate the angle between two vectors but I am not sure if it is right. Can someone please point me to the right direction? public enum Direction { Left = 0, Ri...

How to transform a path in svg so that it is parallel to its original location?

Hi, I have a path defined in SVG. I would like to make two copies of the path and translate them so that one sits parallel to the original on one side, and the other sits parallel on the other side. The idea is to end up with 3 paths, all parallel to each other and not overlapping. I have tried simple translations such as transform="tr...

How to create dots in Power Point VBA, move them around in different directions while keeping them connected with straight lines?

Hello everybody. There is one thing I want to do in PowerPoint VBA. I want to create two dots in the main window - dot A and dot B - by their given coordinates: for example, A (232, 464) and B (109, 567). I don't know how to do it in PowerPoint VBA. I know how to create a simple straight line. I use this macro code for that: Sub Crea...

How can I sort a coordinate list for a rectangle counterclockwise?

I need to sort a coordinate list for a rectangle counterclockwise, and make the north-east corner the first coordinate. These are geographic coordinates (i.e. Longitude, Latitude) in decimal form.1 For example, here are the 4 corners of a rectangle, starting with the north-west corner and moving clockwise: [ { "lat": 34.495239, "lng"...

How can I get the coordinates of any given address using CoreLocation framework and not google Maps API?

Hi All, I'm interested in finding out the coordinates of "any" given address and not just the current location using only CoreLocation.Framework. I do not wish to use google maps API or yahoo maps or any other third Party maps API. Is it possible? How can I get the coordinates of any address? Thanks ...

Ruby two dimensional array: finding an object's coordinates

Assume, I have a two dimensional array A, and it's stated that somewhere inside it there's an object my_element. What's the quickest way to find out its coordinates? I am using Ruby 1.8.6. ...

How to get cells (<td>) x and y coordinate in table using jQuery?

I'm looking for a good way to get cells X-Y position in a table. (do not confuse it with css-position, I am looking for X and Y coordinate in Cartesian coordinate system). As we know, we can get particular cell in a table using ex: $('#grid')[0].rows[5].cells[7]. But, what if I want to get the value 5x7 when I click on particular cell,...

Geographical boundaries of states/provinces -> Google Maps Polygon

Hi all, I'm building a web application that is going to dynamically highlight certain U.S. states and Canadian provinces on a Google Map, based on buttons and click events. Plan A) Polygons My primary idea for this was to draw Polygons. For this I need lists of coordinates (latitude + longitude) of all state and province outlines (clo...

WPF - Make a line shorter by X amount each end

I'm making a flow-diagram like WPF app and I've drawn arrows between the centre point of my nodes, trouble is that I want the arrows to start and end on the edge of my nodes. The solution is simple - shorten each of the arrows by 2X, where X is the "radius" of my nodes. I'm a mathematician by trade so I know how to do this using trig...

Why is my glutWireCube not placed in origin?

I have the following OpenGL code in the display function: glLoadIdentity(); gluLookAt(eyex, eyey, eyez, atx, aty, atz, upx, upy, upz); // called as: gluLookAt(20, 5, 5, -20, 5, 5, 0, 1, 0); axis(); glutWireCube (1.); glFlush (); axis() draws lines from (0,0,0) to (10,0,0), (0,10,0) and (0,10,0), plus a line from (1,0,0) to (1,3,0). ...

Finding the translation between points

I have a map of the US, and I've got a lot of pixel coordinates on that map which correspond to places of interest. These are dynamically drawn on the map at runtime according to various settings and statistics. I now need to switch over to a different map of the US which is differently sized, and the top left corner of the map is in a...