0

I've been stuck trying to isolate the variables "x" and "y" in this equation system and was wondering if any one here has the time to solve this for me.

y = rotatedPointY - pointX * s - pointY * c + y * c + x * s
x = rotatedPointX - pointX * c + pointY * s - y * s + x * c

The closest I've got is this but as you can see it pretty far off and might be incorrect.

y = (rotatedPointY - pointX * s - pointY * c + (x * s)) / (1 - c))
x = rotatedPointX - pointX * c + pointY * s - y * s + x * c 
---
y = rotatedPointY / (1 - c) - (pointX * s) / (1 - c) - (pointY * c) / (1 - c) + (x * s) / (1 - c)
---
x = rotatedPointX - pointX * c + pointY * s - (rotatedPointY / (1 - c) - (pointX * s) / (1 - c) - (pointY * c) / (1 - c) + (x * s) / (1 - c)) * s + x * c

Thanks for your time.

  • 1
    You've probably done roughly the right thing (I haven't followed through all of the logic), but you can make things a lot easier on yourself by replacing all the terms that don't involve $x$ or $y$ with single values, e.g. set $A = $ rotatedPointY - pointX * s - pointY * c, so your equations reduce to forms like $y = A + cy + sx$ and $x = B - sy + cx$, then the algebra will look much simpler. – ConMan Mar 30 '22 at 23:16
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 31 '22 at 01:21

0 Answers0