I've been trying to figure this out for a while, and I finally got it! Fun fact: This uses the sin and cos functions.
You can use this without credit.