[Edu-sig] turtle coordinates: Y increase downards - as in most graphics API?

Yoshiki Ohshima Yoshiki.Ohshima at acm.org
Tue Jun 19 13:58:27 EDT 2018


On Tue, Jun 19, 2018 at 10:40 AM, Andre Roberge <andre.roberge at gmail.com>
wrote:

> HI,
>
> There seems to be a lot of misunderstanding about this issue.  Hopefully,
> the following can help clear it up.
>
> 0. The turtle module includes functions named left() and right() which
> result in the turtle rotating in the corresponding direction on the screen.
> 1. The turtle implementation includes a function, setworldcoordinates(),
> which allows one to have user-defined coordinates (both for the width and
> height of the world) including a choice as to which in which direction the
> coordinates are increasing.   The issue has nothing to do with what choice
> is "best"; any user is free to use whatever they want.
> 2. In the current implementation, if one choses some particular
> orientation for the coordinates, the role of left() and right() are
> inverted and no longer correspond to what the user sees on the screen.
>
> The submitted fix simply ensures that, no matter what one chooses for the
> world coordinates via setworldcoordinates, when right() is called in a
> program, the turtle turns right and not left.
>

Thank you for the clarification.  I was just ranting about my pet peeve^^

Left and right should be consistent with the actual direction the turtle
turns, from the POV of the turtle, yes. (Does it involve changing the
"heading" of the turtle?)





> André
>
>
> On Tue, Jun 19, 2018 at 2:29 PM Yoshiki Ohshima <Yoshiki.Ohshima at acm.org>
> wrote:
>
>> I also stick my nose here.
>>
>> The notion of "in computer graphics Y goes down" is not as true as some
>> people think.  The graphics you are looking at right now on your computer
>> most likely to have gone through some programs that use "Y goes up" scheme
>> (such as GLSL).
>>
>> Only if you are talking about pixels and raster graphics, you could say
>> that there is a dominant convention to make Y go down, but in with vectors,
>> there is no such dominance.
>>
>> For end-users, why does it matter how actually pixels are stored in the
>> actual memory?  Computer is medium that can simulate anything; so the
>> decision should not be based on what computer does at the lower levels.
>>
>> Once we leave from what  computer does at low-level, there are math text
>> books, which are dominantly "Y-up".  Why do they have to know two different
>> conventions? Unless, of course, learning the fact that the coordinate
>> system is just a convention and can be different.
>>
>> Also there may be a case where the particular turtle graphics
>> implementation is tied to the lower level pixel representation. But is
>> basically mixing different abstraction levels, and unless you want to teach
>> about mixing abstraction levels, it is a bad starting point.
>>
>> In summary: the statement "in computer graphics Y goes down" is a wrong
>> argument for turtle graphics to use Y-down coordinate system.  Then, for
>> turtles and for end-users, there is an existing convention to make Y go
>> down.  So that should be a better default.
>>
>>
>>
>>
>> On Mon, Jun 18, 2018 at 9:54 AM, Kevin Cole <kevin.cole@
>> novawebdevelopment.org> wrote:
>>
>>> Sticking my nose in where it don't belong. ;-) But that's never stopped
>>> me before. ;-)
>>>
>>> First "I are not a teacher". At least, not in any formal sense of the
>>> word. Second, some would say "I are not a programmer". I don't listen to
>>> those people.
>>>
>>> In spite of the common "in computer graphics Y goes down", does that
>>> make sense to new learners? I've gotten used to various coordinate systems,
>>> but the first time I had to work with graph paper and plotting (and, for
>>> that matter, maps) one goes "up" ("north", "forward") for Y. Then again,
>>> maybe the average learner isn't quite as flexible these days, and telling
>>> them after they've gotten used to a system that they have to flip
>>> everything upside down and backwards isn't a great idea. I attribute my own
>>> flexibility not to any innate ability but rather to learning during a time
>>> when architectures OS's and languages were changing fast enough that there
>>> wasn't time to become set in one's ways.
>>>
>>> ​[Note: Grammatical "mistakes" above are meant as weak -- very weak --
>>> humor. At least, most are.]​
>>> --
>>> *Kevin Cole*
>>> <http://novawebdevelopment.org>
>>> NOVA Web Development Co-Op
>>> http://novawebdevelopment.org/
>>> Arlington, VA
>>>
>>> _______________________________________________
>>> Edu-sig mailing list
>>> Edu-sig at python.org
>>> https://mail.python.org/mailman/listinfo/edu-sig
>>>
>>>
>>
>>
>> --
>> -- Yoshiki
>>
>> _______________________________________________
>> Edu-sig mailing list
>> Edu-sig at python.org
>> https://mail.python.org/mailman/listinfo/edu-sig
>>
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> https://mail.python.org/mailman/listinfo/edu-sig
>
>


-- 
-- Yoshiki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20180619/b621efc6/attachment-0001.html>


More information about the Edu-sig mailing list