i never thought i would actually figure this out, this used to be way above my skill. Verified by desmos!
pain-ish...it was actually kind of fun and took about 2 hours, the issue was actually putting it into code For my raytracer though I’ll just copy it off the internet since it’s faster than this, and I already know how it works anyways