traveling the shortest distance between two points on a sphere?

244 views

Jeff McFall

Jul 11, 2012, 3:11:31 PM7/11/12
to soft...@listproc.autodesk.com
Hi all,

I am trying to find the best way to move a point along a path of the shortest distance between two points on the surface of a sphere.
Probably a pretty basic geometry function but I am having trouble even starting.
>From what I can gather the way to solve this is through a Great Circle calculation

I am getting hung up on the long/lat conversion to 3Dspace, not to mention how to interpolate the movement along this path once calculated

Anyone happen to have a tutorial or know of a compound that could help?
in ICE of course

many thanks
Jeff

winmail.dat

David Barosin

Jul 11, 2012, 3:23:08 PM7/11/12
to soft...@listproc.autodesk.com
Take a look at either the 'Increment Rotation with 2 Vectors' node or the 'Increment Quaternion with 2 Vectors' node in ICE.

Use can use the weight as a blend btwn the two points.

Ed Manning

Jul 11, 2012, 3:31:58 PM7/11/12
to soft...@listproc.autodesk.com
I don't have time at the moment to try building it in ICE, but conceptually maybe this would be a start:

1. visualize your 2 points on a sphere
2. create a duplicate sphere at the same location as the original
3. rotate the new sphere about local X and Z until both points lie on the equator
4. rotate the new sphere about local Y to put 0-degrees longitude on one point -- call this Y-rot value "A"
5. rotate the new sphere about local Y to put 0-degrees longitude on the 2nd point -- call this Y-rot value "B"
6. subtract A from B -- your path is now a Y-rotation about the new sphere's center

or:

1. get the vector from Point A to point B
2. make a projection from the center of the sphere of the vector onto the sphere's surface
3. subdivide the projected arc

On Wed, Jul 11, 2012 at 3:11 PM, Jeff McFall wrote:

Grahame Fuller

Jul 11, 2012, 3:40:46 PM7/11/12
to soft...@listproc.autodesk.com
Increment Quaternion with 2 Vectors, then linear interpolate between the two quaternions. Use the result to rotate the first vector.

[cid:image0...@01CD5F7B.874A9300]

gray

_____________________________________________
From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Jeff McFall
Sent: Wednesday, July 11, 2012 03:12 PM
To: 'soft...@listproc.autodesk.com'
Subject: traveling the shortest distance between two points on a sphere?
image001.png

Alan Fregtman

Jul 11, 2012, 4:11:21 PM7/11/12
to soft...@listproc.autodesk.com
Slight variation on the same general idea, plus visual path debugging and ICE kinematics to constrain a null between two quaternions:

...and an emdl (saved in SI 2012) of it:

Enjoy,

-- Alan

Jeff McFall

Jul 11, 2012, 5:55:36 PM7/11/12
to soft...@listproc.autodesk.com

thanks everyone, I really appreciate all the input. These solutions are more varied and much simpler than I initially imagined.

I ended up going back to my first thought of implementing the orbit around controller node somehow.  It seems to work well so far for my need of interpolating between pointcloud A to pointcloud B positions on a circular path.

It has already built in speed control and it also seems to play nice with Rigid Bodies  which is the next step

Here is a screenshot.

thanks again!

orbit_to_position.jpg