coordinate-transformation

How to interpolate values in non-rectangular coordinates using Python?

How to interpolate values in non-rectangular coordinates using Python? Question: I need to make compensation of values in my optical system using Python. I’ve measured the dependency of my compensation params in the corners of my table and I want to interpolate such value there linearly, but a map is not a rectangle. Example: # …

Total answers: 1

Understanding OpenCV homography at a minimum of points

Understanding OpenCV homography at a minimum of points Question: I am quite intrigued by the idea of a homography and try to get it to work at a minimal example with python and OpenCV. Yet, my tests do not pass and I am not quite sure why. I pass in a set of corresponding points …

Total answers: 2

Transform from data to figure coordinates

Transform from data to figure coordinates Question: Similar to this post, I would like to transform my data coordinates to figure coordinates. Unfortunately, the transformation tutorial doesn’t seem to talk about it. So I came up with something analogous to the answer by wilywampa, but for some reason, there is something wrong and I can’t …

Total answers: 2

Why does this python code gives the wrong answer when converting between cartesian and spherical coordinates?

Why does this python code gives the wrong answer when converting between cartesian and spherical coordinates? Question: So I set up two functions in python3.4, Cartesian2Spherical and Spherical2Cartesian, in order to help me convert a point between cartesian ans spherical coordinate systems as part of an application that required lots of such coordinate transformations. Here …

Total answers: 2

PyOpenGL transforming view coordinates into object coordinates for ArcBall navigation

PyOpenGL transforming view coordinates into object coordinates for ArcBall navigation Question: I am following this tutorial for arcball navigation in 3d: https://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_Arcball I managed to perform all the steps and the navigation works but I cant seem to comprehend last step in tutorial: An extra trick is converting the rotation axis from camera coordinates to …

Total answers: 1

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

How to convert Earth Centered Inertial (ECI) coordinates to Earth Centered Earth Fixed (ECEF) AstroPy? Other? Question: 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 …

Total answers: 2

Determining a homogeneous affine transformation matrix from six points in 3D using Python

Determining a homogeneous affine transformation matrix from six points in 3D using Python Question: I am given the locations of three points: p1 = [1.0, 1.0, 1.0] p2 = [1.0, 2.0, 1.0] p3 = [1.0, 1.0, 2.0] and their transformed counterparts: p1_prime = [2.414213562373094, 5.732050807568877, 0.7320508075688767] p2_prime = [2.7677669529663684, 6.665063509461097, 0.6650635094610956] p3_prime = [2.7677669529663675, 5.665063509461096, …

Total answers: 5