I never took a trigonometry class so I need some help.
I know how to find the center point between two points, but I want to know how to find the center between three points, or for that matter, any number of points. How can I do this using expressions applied to the position of a null object?
Thanks!
Help me find the center of a triangle
-
- Posts: 704
- Joined: June 5th, 2004, 7:59 am
- Location: London, UK
Wouldn't this just be a case of adding all the points together then dividing by the number of points, no trigonometry required?
For example:
point1 = thisComp.layer("Null 1").position;
point2 = thisComp.layer("Null 2").position;
point3 = thisComp.layer("Null 3").position;
(point1 + point2 + point3) / 3;
For example:
point1 = thisComp.layer("Null 1").position;
point2 = thisComp.layer("Null 2").position;
point3 = thisComp.layer("Null 3").position;
(point1 + point2 + point3) / 3;