I got the equation from https://mathworld.wolfram.com/ButterflyCurve.html, and I got the code to do exponents from https://en.scratch-wiki.info/wiki/Solving_Exponents.