Jump to content

Recommended Posts

I was attempting to build a type of link system using the law of cosines and discovered that I need to use the "spherical law of cosines" instead for calculating this "spherical triangle" as seen below.

I'm already pushing my limited math-in-Houdini skills and was hoping someone familiar with the concept could help me approach it in a good Houdini way to obtain the data/measurements needed to complete the solve for each angle in A B & C below.

 

In my use-case the simple image below represents a neutral position for three points.

Please note that the side measurements shown are NOT in radians ( simply distance from points) which would be a requirement to solve.

 

•Each point (A,B,C) is a fixed distance from the center of a sphere.  Essentially creating a spherical triangle.

•Each point only rotates about one axis between it and the center of the sphere creating angles

•The A point is in a fixed position on the sphere and does not move.  Consider it a kind of base point

•The C point travels, with a limited range along the surface of the sphere(essentially rotating it's position from the center if the sphere).

•The distance between  A & B (AB) and B & C (BC) are both fixed lengths and function as arms.

•The B point essentially functions as an elbow and always stays the same distance between both A & C respectively as the C point moves.

 

Essentially I need C to be driven by XYZ rotations from the center of the sphere and for B to "chase it" like a hinged elbow would "chase" a hand within the constraints of it's distance between A & C.

Using the Spherical Law of Cosines I should be able to measure the new distance of CA to find all the angles of A, B & C (in Radians?).

https://en.wikipedia.org/wiki/Spherical_law_of_cosines

Essentially a simple inverse kinematic that avoids using the Houdini bone system.

Since A is always a fixed point I should the be able to simply compare the neutral angle of A to the new one and use that difference to drive the animation necessary to rotate both A and B to position the the BC and AB sides/arms to align with the C position as it travels along the suffice of the sphere.

 

I've included the scene below for reference but it's only a representation and the only potentially useful item is my measuring widget which unfortunately cannot do radians at this point.

Thanks for any help or pointers.

Michael

 

Screen%20Shot%202021-11-22%20at%207.47.4

 

Law_of_cosines.hip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×