Interpolation of geographical coordinates c++ [closed] - c++

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm searching for solution of my problem.
I have some geographical coordinates like this:
Lat. 32.5327 Lon. 95.5019 time 15:44:44
Lat. 32.5339 Lon. 96.1439 time 15:48:31
It's position of some object and time when it was in that position.
What i need is to check in some interval of time(30 seconds for example), what was the position of the object between these points.

Interpolating over a sphere and finding the shortest path between two points would require for example Slerp.
But for distances less than 100km you will end up with a line (more or less) so do not bother and do a linear interpolation.
As #chux pointed out: linear interpolation will exibit significant artifacts when interpolating near the poles.

Related

Jagged voxel terrain using simplex noise 2D [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
My goal is to implement a voxel terrain system for Unreal Engine, and things went well until I produced a bunch of chunks with jagged voxel terrains.
I used simplex noise 2d to calculate the height value. However, I found that each chunk had a specific hightmap, which resulted incoherent and jagged voxel terrain.
So, how can we create smooth terrains which consist of chunks that use the same heightmap using simplex noise 2d?
In order to have the texture seamless, you need to set up the underlying noise funtion in such a way that interpolation at the edges of the tiles will result in the same values; it is impossible to obtain the desired result with noise functions which are completely independent from each other in each tile. The approach is discussed in detail here.

OpenGL - How to track a moving object? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I want to learn how I can track a moving object in OpenGL. The position of the object will be a continuous input. Also, what if when the object moves out of the screen?
You have to position and orient your camera towards the object. That means you will have to provide the correct View Matrix.
You can use functions such as gluLookAt() to generate a View Matrix that points towards a specific object.
If you don't know what a view matrix is, I suggest looking at this tutorial (http://learnopengl.com). Check out this page which explains cameras matrices work in openGL

Is there any further steps to calculate phase after dft? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am trying to find magnitude and phase of fourier transform. There is an tutorial Opencv.
After using this formula, we are going to switch to a logarithmic scale and shifting normalizing. But I could not find for phase. Phase formule is :
Here is the question after arctan calculation, do I need to do extra stuff like magnitude(log scale,shifting,normalizing)? Or what is the logic behind it I could not understand? I am programmer guy and I am very far from these Math stuff.
The arctan range is (−π, π]. Hint: use std::atan2. You may indeed shift this to [0, 2*π) if you like. This is in no way necessary, it just avoids negative numbers.
Scaling to 360 degrees is also possible, but very rare - math is always done in radians, degrees are only for human consumption, and which human is going to look at FFT magnitudes?
Log scales are utterly pointless for angles, as they are modulo 2π.

Calculating a coordinate from 2 given 1-dimensional lines [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
What is the and optimal method, if not the best, for doing it?
Assume that I have an object that has 2 wheels. The only information I have available is how far the wheels have rolled at any time.
Basically, I want to know how to calculate the coordinates (x2,y2)
I put this question on the programming section because I want to solve this with an algorithm or plainly put, by programming (in c++).
Given that you have how far the wheels have rolled at any time, it means that you have two functions of time w1(t) w2(t) giving the distance covered by the wheels.
from that you may by derivation get the scalar velocity of each wheel as v1(t) and v2(t).
As your object position is the mean between the position of those two wheels, the velocity of your object is the mean of those two velocities, but the difference of the velocities gives the speed of rotation of the object. So you have essentially a velocity described as a scalar velocity plus a rotation speed.
By integrating that vectorial quantity you may arrive to the current position of your object.
Details must be thought carefully, but the idea I think is that.

C++: what is Mat3f? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I try to solve a task for my studies. We got a little framework in which we are asked to put our solution to. There is a line that I don't understand:
Mat3f R (conf.R);
Part of the task is to multiply matrices. So I guess Mat3f stands for a float matrix. But what stands the number 3 for? And what is the conf.R argument for? What will be the dimensions of the resulting matrix?
Thanks in advance!
The exact meaning of the 3 in Mat3f is library-specific, but a normal games programmer seeing it for the first time would expect Mat3f to be a 3x3 matrix.