Math for VSFX

Updated on March 1  2024

also Houdini Resources


 Overview (pictoral)


copyright © Deborah R. Fowler




Deborah R. Fowler



Dot Product - Two point constraint problem

Posted before Nov 12   2013
updated Nov 8  2020



"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\cdot " that is often used to designate this operation."  See wiki entry. See the hip file for a demonstration.
MISSING GIF


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 - H18 hip file here.

(Previous sample hip file using hscript here. (example not at origin here))



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 - see attached H18 hip file here for ZY

MISSING IMAGE

Additionally, after you look at the first formulation of the solution, look at the topsy-turvy example.



Two point constraint problem continued pdf. Sample hip file here.


May 24/2014 - added a flipped version of the top most two constraint version with an additional pdf and hip (READ the FIRST PDF FIRST)


March 7/2015 - going one step further added a mirrored version of the above with the other point also moving (hip here)
Missing Image

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

MISSING IMAGE

Proxy hip given for basic technique guidelines
.

May 28/2016 - animating the two point constraints - this one also takes into account crossing over two quadrants

MISSING IMAGEMISSING GIF
I have created a H18 hip example file which demonstrates add nodes/two point constraints.
TIP: 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 H18 hip example file twoPointConstraintVertical.hipnc

MISSING IMAGEMISSING IMAGE