Last active
May 4, 2018 08:06
-
-
Save serguei-k/adec08ab71f7471e096bd500884b36b7 to your computer and use it in GitHub Desktop.
Spherical Coordinates Tutorial Expression 1
This file contains hidden or 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
float $rate = 3.14 / 2.0; | |
float $theta = offset.translateX * $rate + control.translateX * $rate; | |
float $phi = offset.translateY * $rate - control.translateY * $rate; | |
constraint.translateX = sin($theta) * sin($phi); | |
constraint.translateY = cos($phi); | |
constraint.translateZ = cos($theta) * sin($phi); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment