Post #4235620
2026-07-30 09:20 UTC
#pixelgraphics people: I’m thinking of implementing a radar/scanner view of a todo list/calendar with tasks/events placed around me like aliens approaching in Aliens. Obviously the choice for this would be polar coordinates, with angle picked arbitrarily except avoiding overlap and distance picked by time to event/deadline.
Now, how does one convert polar coordinates to Cartesian integer pixel coordinates? It seems unnecessarily complicated when computer graphics people online describe it.
Replies (2)
-
@marmrt@mastodon.nu 2026-07-30 09:35
@amanda@social.spejset.org x=r*cos(theta), y=r*sin(theta) + rounding
-
@pulkomandy@mastodon.tetaneutral.net 2026-07-30 09:34
@amanda@social.spejset.org Given a polar coordinate (a = angle, d = distance): x = d . cos(a) y = d . sin(a) Round as needed to get integers. I'm not sure how people manage to make this sound complicated? Or do I misunderstand the question?