You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to visualise airplanes, boats and cars following their routes. For airplanes I'm using arcs, for boats and cars paths. How can I get the position (both coordinates and rotation) for a given position on an arc or path to use this to align my three.js objects on my custom layer? The position would be determined by a percent value of how much of the route has already been travelled.
The text was updated successfully, but these errors were encountered:
This is not as easy as it may seem at first. You need to do some spherical geo calculations to get to the result you're looking for.
Simplifying the question, if all that was needed was to get the percentual coordinates of a location along the great circle arc between just two points, I would suggest to use d3-geo's geoInterpolate.
For paths, it's not as easy. But the good news is that you have all the coordinates of the points already on your side. So depending on the complexity of your paths, you can perhaps already calculate a good approximation by using the geoInterpolate function above.
I want to visualise airplanes, boats and cars following their routes. For airplanes I'm using arcs, for boats and cars paths. How can I get the position (both coordinates and rotation) for a given position on an arc or path to use this to align my three.js objects on my custom layer? The position would be determined by a percent value of how much of the route has already been travelled.
The text was updated successfully, but these errors were encountered: