Add polar coordinate calculations to ContextGraph

This commit is contained in:
Kyler Olsen 2025-02-10 18:36:17 -07:00
parent e2f37553df
commit a340fe7936
1 changed files with 4 additions and 0 deletions

View File

@ -1872,6 +1872,10 @@ class ContextGraph:
r_last = self._r.value # type: ignore
theta = next(self._theta) # type: ignore
r = self._r.value # type: ignore
x_last = r_last * math.cos(theta_last)
y_last = r_last * math.sin(theta_last)
x = r * math.cos(theta)
y = r * math.sin(theta)
return x_last, y_last, x, y, self.color
@property