coordinate-systems

Cartesian Coordinate System in Perspective Projection

最后都变了- 提交于 2019-12-06 07:43:18
I'm still implementing a perspective projection for my augmented reality application. I've already asked some questions about the viewport-calculation and other camera stuff, which is explained from Aldream in this thread However, I don't get any useful value at the moment and I think this depends on my calculation of the cartesian coordinate space. I had some different ways to transform latitude,longitude and altitude to a cartesian coordinate space, but nothing of them seems to work properly. Currently I'm using ECEF(earth centered), but I also tried different calculations like a combination

Error when re-projecting spatial points using spTransform in rgdal R

你。 提交于 2019-12-06 07:03:07
问题 G'day, I have a large number of lon/lat coordinates that are in the CRS Australian Geodetic Datum 66/84 (AGD66 for brevity). I want to change these coordinates from AGD66 to WGS84 because there is about a 200m difference between them and I have other coordinates and layers in WGS84. I have tried to do this by: lon lat 147.1428 -43.49083 library(rgdal) pts<-read.table(file.choose(),header=TRUE,sep=',') # I first project the pts in their original CRS pts66<-project(cbind(pts$lon,pts$lat), "

Coordinate System in SpriteKit

痞子三分冷 提交于 2019-12-06 05:06:51
I am quite confused with the spritekit coordinate system. I need clarification on two cases. Case 1: When a sprite node is added as child to the scene: SKSpriteNode * blueBall = [SKSpriteNode spriteNodeWithImageNamed:@"hRedBall.png"]; blueBall.name=@"blueball"; blueBall.size=CGSizeMake(75, 75); blueBall.position=point; //I am varying this point [self addChild:blueBall]; I have added the node at different points each time.These are the points I added the node at: (100x100)(200x200)(300x300)(400x400)(900,600) And in my iphone 5 device, they look like this: If you look into 100x100, when I add

Normalized Device Coordinates

早过忘川 提交于 2019-12-05 11:06:14
I'm writing a library that deals with 2D graphical shapes. I'm just wondering why should my coordinate system range from [-1, 1] for both the x and y axis instead of [0, width] for x and [0, height] for y ? I went for the latter system because I felt it was straight forward to implement. From Jim Blinn's A Trip Down The Graphics Pipeline , p. 138. Let's start with what might at first seem the simplest transformation: normalized device coordinates to pixel space. The transform is s_x * X_NDC + d_x = X_pixel s_y * Y_NDC + d_y = Y_pixel A user/programmer does all screen design in NDC. There are

convert latitude and longitude to x and y grid system using python

家住魔仙堡 提交于 2019-12-05 07:47:29
I have file with latitude and longitude values, that i want to convert the x and y in km I want to measure the distance from each point. for instance I make the first points of latitude and longitude(which are 51.58, -124.6 respectfully) to (0,0) in my x and y system so than basically i want to find out what the other points are and their location from the origin so i want to find what 51.56(lat) -123.64(long) is in (x,y) in km and so on for the rest of the file. I want to do this all in python, is there some sort code ? I found sites online , for instance http://www.whoi.edu/marine/ndsf/cgi

Does the method for computing the cross-product change for left handed coordinates?

放肆的年华 提交于 2019-12-05 02:46:58
Does the method for computing the cross-product change for left handed coordinates? Sven Marnach The formula for the cross product of the vectors (x1, x2, x3) and (y1, y2, y3) is z1 = x2 * y3 - x3 * y2 z2 = x3 * y1 - x1 * y3 z3 = x1 * y2 - x2 * y1 It is designed in a way that the three vectors x , y and z in the given order have the same handedness as the coordinate system itself. This property does not depend on the handedness of the coordinate system -- for a left-handed coordinate system the vectors fulfil the left-hand rule. You don't need to change anything about the formula. Useful links

How Can I Use (Ruby) RGeo to Transform (Unproject) Coordinates

假如想象 提交于 2019-12-05 02:24:37
问题 I started with How can I transform the coordinates of a Shapefile? . The response there started me on [what I think is] the right track, but I still haven't been able to solve my problem. One issue is that I haven't found the correct projection yet: https://gis.stackexchange.com/questions/13330/how-can-i-correctly-transform-unproject-from-lcc EDIT: That question on the gis site has been answered, and I was able to reproduce a correct transformation using the PROJ command line tool cs2cs. It

How to convert Earth Centered Inertial (ECI) coordinates to Earth Centered Earth Fixed (ECEF) AstroPy? Other?

泄露秘密 提交于 2019-12-04 19:14:10
I have position (x,y,z) and velocity (Vx,Vy,Vz) vectors in Earth Centered Inertial Coordinates (ECI) for a satellite orbit, and ultimately want to end up with geodetic coordinates (Latitude, Longitude, & Altitude). According to this other Stack Overflow question it seems that I need to convert to Earth Centered Earth Fixed (ECEF) coordinates as an intermediate step (so ECI --> ECEF --> Lat/Lon/Alt). I know ECI and ECEF share the same origin point (the center of mass of Earth) and the same z-axis that points to the North Pole. However, I am not sure what actual equations or adjustments I need

How to convert Longitude,Latitude, Elevation to Cartesian coordinates?

穿精又带淫゛_ 提交于 2019-12-04 13:23:41
I downloaded weather data and it has longitude (in decimal), latitude (in decimal), and elevation (in m) values. There is no information about the coordinate system used. How I can convert it to cartesian coordinates ?. My attempts are below. But, my problem is to find the right formulas def cartesian(self,longitude,latitude, elevation): R = 6378137.0 + elevation # relative to centre of the earth X = R * math.cos(longitude) * math.sin(latitude) Y = R * math.sin(longitude) * math.sin(latitude) Z = R * math.cos(latitude) def cartesian3(self,longitude,latitude, elevation): X = longitude * 60 *

get touch coordinates (in the form of 0-480 and 0-320)

此生再无相见时 提交于 2019-12-04 08:04:59
i dont get how to translate the coordinates of the iphone. if i make a single touch i get the coordinate. if i make a touch and keep it and release it it shows the difference of the starting and end point. how do i get the absolute position of the touch? thanks! -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; CGPoint location = [touch locationInView:touch.view]; NSLog(@"X: %f",location.x); NSLog(@"Y: %f",location.y); } I want to resize an image with touch and drag(only the height) The position of a touch is calculated relative