[Tutor] Mapping memory coordinate to screen coordinates
Phil
phillor9 at gmail.com
Wed Dec 2 18:06:24 EST 2020
On 3/12/20 7:35 am, Dennis Lee Bieber wrote:
> In computer graphics textbooks, what you have encountered is a
> difference between World Coordinates and (Normalized) Device Coordinates
> (there is typically an intermediate of "Viewport Coordinates" covered in
> the texts too). One has to go through a transformation going from one to
> the other.
Thank you Dennis for searching for the links on transformation. I
normally think of transformation in the context of rotating a 3D object,
for example. My current problem is nowhere near as complex and simply
involves swapping the x and y coordinates, [y][x] instead of [x][y]. I
think a grid class, as suggested, would be a helpful solution. I will
study the content of the links.
Thank you Alan for an alternative to a list of lists, I haven't made
much use of dictionaries. I'll give it some thought.
Thank you dn for your report. I hadn't considered that I maybe guilty of
ridged thinking. However, I do seem to get stuck in circular pattern
when trying to solve a problem so your suggestion probably has some merit.
By the way, the pygame example is just something that I came across, it
illustrates the problem well. My current project is built using the
wxPython GUI library.
--
Regards,
Phil
More information about the Tutor
mailing list