Search code examples
animationmathspark-ar-studio

How do I animate an SDF circle along a circular path using patches?


I have some SDF circles in spark ar studio that I need to animate in a circular path continuously. Is this possible? at the moment animating with patches I can only animate into a straight line using the x and y coords. How would I go about doing this?

Heres how it is currently set up.

current animation setup


Solution

  • You can achieve a circular path using sine and cosine, by animating the transition values from 0 to 2*Pi (6.283). Here is an example:

    enter image description here

    There are some nice visualizations that explain how sine and cosine work, for example: https://www.reddit.com/r/visualizedmath/comments/7runef/unit_circle_visualization_of_sine_and_cosine/