Dot Product - Two point constraint problem
"Dot Product is the product of the magnitudes of the two vectors and the cosine of the angle between them. The name "dot product" is derived from the centered dot that is often used to designate this operation." See wiki entry.
See the example file below for a demonstration.
Example DotProduct.hipnc
Two point constraint problem
The two point constraint problem is an excellent application using the dot product, pythagorean theorem and a little bit of vector math tossed in to solve an animation problem.
The video above describes the mechanics involved - also illustrated in pdf for (includes wrangle nodes as well as hscript).
With wrangle nodes it is even more efficient:
Example H18 hip file herePrevious sample hip file using hscript:
Example dotPythagoreanInActionColor.hipncExample not at origin:
Example dotPythagoreanInActionOffOrigin.hipncExample
Suppose you switched axis to the z-axis - looking at the pdf that would then put you looking down the -z axis so would change the equations to include -z1 + z0:
Example H18 hip file here for ZY
Example
Additionally, after you look at the first formulation of the solution, look at the topsy-turvy example.
ExampleTwo point constraint problem continued pdf. Sample hip file:
Example dotPythagoreanInActionTopsyTurvyColor.hipncMay 24/2014 - added a flipped version of the top most two constraint version with an additional pdf. (READ the FIRST PDF FIRST)
Example dotPythagoreanInActionOffOriginAndOpposite.hipnc
Example
March 7/2015 - going one step further, added a mirrored version of the above with the other point also moving:
Example dotPythagoreanInActionOffOriginAndOppositeMovingMirror.hipnc
Example
May 25/2016 - combine the above constraints - remember, as long as you know where the two points are at any given time you can use them to create something like this https://www.youtube.com/watch?v=pKrHTYqm8pw
Proxy hip file given for basic technique guidelines.
Example LegoManProxy.hipncMay 28/2016 - animating the two point constraints - this one also takes into account crossing over two quadrants.
I have created a H18 hip example file which demonstrates add nodes/two point constraints:
Example animatedTwoPointConstraint.hipncTIP: Remember that points render as spheres so you may want to blast your add points before rendering or use a clean node and delete unused points.
Nov 8/2020 - animating similar to above, but controlled by a point motion at the top.
Example twoPointConstraintVertical.hipnc