Last active
August 12, 2024 16:08
-
-
Save NSDesign/d0016a77f678eadd76c5 to your computer and use it in GitHub Desktop.
VEX : Matrix rotation about a pivot point
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f@angle = chf("angle") * 2 * $PI; // angle is a float slider with range from 0 - 1 | |
v@axis = chv("axis") + point(1, "N", 0); // axis is a 3 float vector {0.0, 0.0, 0.0} | |
3@imatrix = ident(); | |
rotate(@imatrix, @angle, @axis); | |
@P = (@P - point(1, "P", 0)) * @imatrix + point(1, "P", 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment