Deborah R. Fowler

Arc Cos and Dot Product

Posted May 30 2021 Updated May 30 2021 Updated Mar 16 2026
There are some interesting things you can do with cos/sin and acos/asin as seen on my other page, however sometimes combining it with the dot product is necessary.

For example suppose you have a arm that is not suppose to bend at the elbow but is rigid (for elbow bending see my page on two-point constraints). That problem can also be solved by intersection analysis or kinefx but that's for another day.
If it were a straight horizontal line click here.

Suppose we have a point (representing the top of an object we are moving up and down) and we want to drive the rotation with this - we will need to use acos and dot product as follows:

Analyzing the problem, we need to use both acos combined with a dot product. Here is the solution. You have a point (moving) labeled in green - movept in the wrangle above.


The dot product between the red vector and the -y axis is found The calculation is based on the bottom part of the arm, assumed to be parallel with the x-axis Once you have the above calculated it is a matter of taking the red angle and subtracting the green angle to give us the desired magenta angle The equations for calculating the angles are as follows And visually the final result is seen below