turtle coordinates: Y increase downards - as in most graphics API?
Hi, usually in computer graphics Y is counted to increase downwards. I casn do it with: setworldcoordinates(0, 400, 600, 0) but then, "right(..)" turns to the left :/ I could swap: right, left = left, right but on errror I get a bit misleading message
right() Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> right() TypeError: left() takes exactly 1 argument (0 given)
I thought to make this hack for kids, so better clearer error msgs... Any Ideas? Thanks :) -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt
On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < jurgis.pralgauskis@gmail.com> wrote:
Hi,
usually in computer graphics Y is counted to increase downwards. I casn do it with: setworldcoordinates(0, 400, 600, 0)
but then, "right(..)" turns to the left :/
I could swap: right, left = left, right
but on errror I get a bit misleading message
right() Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> right() TypeError: left() takes exactly 1 argument (0 given)
I thought to make this hack for kids, so better clearer error msgs...
Any Ideas?
http://bugs.python.org/issue23660 (includes a proposed "permanent" fix). André
Thanks :) -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
Thanks, would be even better, if there were possibility to swich orientation with mode(...) https://docs.python.org/3/library/turtle.html#turtle.mode don't know how to call this mode, maybe 'crt_style' or so? now there are 'standard', 'logo', or custom 'world' On Fri, Mar 13, 2015 at 5:48 PM, Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < jurgis.pralgauskis@gmail.com> wrote:
Hi,
usually in computer graphics Y is counted to increase downwards. I casn do it with: setworldcoordinates(0, 400, 600, 0)
but then, "right(..)" turns to the left :/
I could swap: right, left = left, right
but on errror I get a bit misleading message
right() Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> right() TypeError: left() takes exactly 1 argument (0 given)
I thought to make this hack for kids, so better clearer error msgs...
Any Ideas?
http://bugs.python.org/issue23660 (includes a proposed "permanent" fix).
André
Thanks :) -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
-- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt
So, a little over 3 years after I submitted a bug report (see previous conversation below) **with a fix** so that no one would have to explain why "right()" could result in a turtle turning left, and vice-versa, my submission was refused and the bug report was closed with the following explanation: " I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility. " I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students? Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant André On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < jurgis.pralgauskis@gmail.com> wrote:
Hi,
usually in computer graphics Y is counted to increase downwards. I casn do it with: setworldcoordinates(0, 400, 600, 0)
but then, "right(..)" turns to the left :/
I could swap: right, left = left, right
but on errror I get a bit misleading message
right() Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> right() TypeError: left() takes exactly 1 argument (0 given)
I thought to make this hack for kids, so better clearer error msgs...
Any Ideas?
http://bugs.python.org/issue23660 (includes a proposed "permanent" fix).
André
Thanks :) -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
Hi Andre, I'm sorry that you did not like my response when I was triaging all of the open Turtle issues. I am happy to change the status back to open. All that you needed to do was ask politely and give me a chance, as a volunteer, to have the time to do so. Regards, Carol
On Jun 17, 2018, at 1:41 PM, Andre Roberge <andre.roberge@gmail.com <mailto:andre.roberge@gmail.com>> wrote:
So, a little over 3 years after I submitted a bug report (see previous conversation below) **with a fix** so that no one would have to explain why "right()" could result in a turtle turning left, and vice-versa, my submission was refused and the bug report was closed with the following explanation:
" I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility. " I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students?
Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant
André
On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge <andre.roberge@gmail.com <mailto:andre.roberge@gmail.com>> wrote:
On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis <jurgis.pralgauskis@gmail.com <mailto:jurgis.pralgauskis@gmail.com>> wrote: Hi,
usually in computer graphics Y is counted to increase downwards. I casn do it with: setworldcoordinates(0, 400, 600, 0)
but then, "right(..)" turns to the left :/
I could swap: right, left = left, right
but on errror I get a bit misleading message
right() Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> right() TypeError: left() takes exactly 1 argument (0 given)
I thought to make this hack for kids, so better clearer error msgs...
Any Ideas?
http://bugs.python.org/issue23660 <http://bugs.python.org/issue23660> (includes a proposed "permanent" fix).
André
Thanks :) -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt <http://galvosukykla.lt/> _______________________________________________ Edu-sig mailing list Edu-sig@python.org <mailto:Edu-sig@python.org> https://mail.python.org/mailman/listinfo/edu-sig <https://mail.python.org/mailman/listinfo/edu-sig>
_______________________________________________ Edu-sig mailing list Edu-sig@python.org <mailto:Edu-sig@python.org> https://mail.python.org/mailman/listinfo/edu-sig
Dear Carol, I apologize for letting my frustration show in this way, in a public forum. André On Mon, Jun 18, 2018 at 1:01 PM Carol Willing < willingc@willingconsulting.com> wrote:
Hi Andre,
I'm sorry that you did not like my response when I was triaging all of the open Turtle issues.
I am happy to change the status back to open. All that you needed to do was ask politely and give me a chance, as a volunteer, to have the time to do so.
Regards,
Carol
On Jun 17, 2018, at 1:41 PM, Andre Roberge <andre.roberge@gmail.com> wrote:
So, a little over 3 years after I submitted a bug report (see previous conversation below) **with a fix** so that no one would have to explain why "right()" could result in a turtle turning left, and vice-versa, my submission was refused and the bug report was closed with the following explanation:
"
I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility.
"
I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students?
Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant
André
On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < jurgis.pralgauskis@gmail.com> wrote:
Hi,
usually in computer graphics Y is counted to increase downwards. I casn do it with: setworldcoordinates(0, 400, 600, 0)
but then, "right(..)" turns to the left :/
I could swap: right, left = left, right
but on errror I get a bit misleading message
right() Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> right() TypeError: left() takes exactly 1 argument (0 given)
I thought to make this hack for kids, so better clearer error msgs...
Any Ideas?
http://bugs.python.org/issue23660 (includes a proposed "permanent" fix).
André
Thanks :) -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________
Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
Dear Andre, Thank you. The issue is reopened. If others would like to test your recommended fix still applies cleanly, I will be happy to review it. Warmly, Carol
On Jun 18, 2018, at 9:18 AM, Andre Roberge <andre.roberge@gmail.com <mailto:andre.roberge@gmail.com>> wrote:
Dear Carol,
I apologize for letting my frustration show in this way, in a public forum.
André
On Mon, Jun 18, 2018 at 1:01 PM Carol Willing <willingc@willingconsulting.com <mailto:willingc@willingconsulting.com>> wrote: Hi Andre,
I'm sorry that you did not like my response when I was triaging all of the open Turtle issues.
I am happy to change the status back to open. All that you needed to do was ask politely and give me a chance, as a volunteer, to have the time to do so.
Regards,
Carol
On Jun 17, 2018, at 1:41 PM, Andre Roberge <andre.roberge@gmail.com <mailto:andre.roberge@gmail.com>> wrote:
So, a little over 3 years after I submitted a bug report (see previous conversation below) **with a fix** so that no one would have to explain why "right()" could result in a turtle turning left, and vice-versa, my submission was refused and the bug report was closed with the following explanation:
" I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility. " I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students?
Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant
André
On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge <andre.roberge@gmail.com <mailto:andre.roberge@gmail.com>> wrote:
On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis <jurgis.pralgauskis@gmail.com <mailto:jurgis.pralgauskis@gmail.com>> wrote: Hi,
usually in computer graphics Y is counted to increase downwards. I casn do it with: setworldcoordinates(0, 400, 600, 0)
but then, "right(..)" turns to the left :/
I could swap: right, left = left, right
but on errror I get a bit misleading message
right() Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> right() TypeError: left() takes exactly 1 argument (0 given)
I thought to make this hack for kids, so better clearer error msgs...
Any Ideas?
http://bugs.python.org/issue23660 <http://bugs.python.org/issue23660> (includes a proposed "permanent" fix).
André
Thanks :) -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt <http://galvosukykla.lt/> _______________________________________________ Edu-sig mailing list Edu-sig@python.org <mailto:Edu-sig@python.org> https://mail.python.org/mailman/listinfo/edu-sig <https://mail.python.org/mailman/listinfo/edu-sig>
_______________________________________________ Edu-sig mailing list Edu-sig@python.org <mailto:Edu-sig@python.org> https://mail.python.org/mailman/listinfo/edu-sig <https://mail.python.org/mailman/listinfo/edu-sig>
Ok, I could test it :) Should I wait for some commit and comment results on the issues site or how...? -- Jurgis Pralgauskis tel: 8-616 77613 2018-06-18, pr 19:32, Carol Willing <willingc@willingconsulting.com> rašė:
Dear Andre,
Thank you.
The issue is reopened. If others would like to test your recommended fix still applies cleanly, I will be happy to review it.
Warmly,
Carol
On Jun 18, 2018, at 9:18 AM, Andre Roberge <andre.roberge@gmail.com> wrote:
Dear Carol,
I apologize for letting my frustration show in this way, in a public forum.
André
On Mon, Jun 18, 2018 at 1:01 PM Carol Willing < willingc@willingconsulting.com> wrote:
Hi Andre,
I'm sorry that you did not like my response when I was triaging all of the open Turtle issues.
I am happy to change the status back to open. All that you needed to do was ask politely and give me a chance, as a volunteer, to have the time to do so.
Regards,
Carol
On Jun 17, 2018, at 1:41 PM, Andre Roberge <andre.roberge@gmail.com> wrote:
So, a little over 3 years after I submitted a bug report (see previous conversation below) **with a fix** so that no one would have to explain why "right()" could result in a turtle turning left, and vice-versa, my submission was refused and the bug report was closed with the following explanation:
"
I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility.
"
I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students?
Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant
André
On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < jurgis.pralgauskis@gmail.com> wrote:
Hi,
usually in computer graphics Y is counted to increase downwards. I casn do it with: setworldcoordinates(0, 400, 600, 0)
but then, "right(..)" turns to the left :/
I could swap: right, left = left, right
but on errror I get a bit misleading message
> right() Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> right() TypeError: left() takes exactly 1 argument (0 given)
I thought to make this hack for kids, so better clearer error msgs...
Any Ideas?
http://bugs.python.org/issue23660 (includes a proposed "permanent" fix).
André
Thanks :) -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________
Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
On Mon, Jun 18, 2018 at 1:50 PM Jurgis Pralgauskis < jurgis.pralgauskis@gmail.com> wrote:
Ok, I could test it :)
Should I wait for some commit and comment results on the issues site or how...?
Jurgis: Could you just apply the patch I submitted locally and test it? Or would anyone else volunteer to test it? Obviously, I can provide an independent test of my own contribution. :-)
-- Jurgis Pralgauskis tel: 8-616 77613
2018-06-18, pr 19:32, Carol Willing <willingc@willingconsulting.com> rašė:
Dear Andre,
Thank you.
The issue is reopened. If others would like to test your recommended fix still applies cleanly, I will be happy to review it.
Warmly,
Carol
On Jun 18, 2018, at 9:18 AM, Andre Roberge <andre.roberge@gmail.com> wrote:
Dear Carol,
I apologize for letting my frustration show in this way, in a public forum.
André
On Mon, Jun 18, 2018 at 1:01 PM Carol Willing < willingc@willingconsulting.com> wrote:
Hi Andre,
I'm sorry that you did not like my response when I was triaging all of the open Turtle issues.
I am happy to change the status back to open. All that you needed to do was ask politely and give me a chance, as a volunteer, to have the time to do so.
Regards,
Carol
On Jun 17, 2018, at 1:41 PM, Andre Roberge <andre.roberge@gmail.com> wrote:
So, a little over 3 years after I submitted a bug report (see previous conversation below) **with a fix** so that no one would have to explain why "right()" could result in a turtle turning left, and vice-versa, my submission was refused and the bug report was closed with the following explanation:
"
I'm closing this issue since introducing this suggested change would impact teaching materials and resources that have already been published. This would be a change that would break compatibility.
"
I'm curious: does anyone on the edu-sig list has written teaching material for the turtle module that sets world coordinates such that left and right are reversed? If so, how do you explain it to students?
Rant: This is the third time that I submit either a bug report for cPython **with** a proposed fix, or simply a fix for an existing bug report and that it is either rejected or dismissed with no alternative solution proposed. Thankfully, the folks here on edu-sig have been much more supportive since I joined, almost 15 years ago. /rant
André
On Fri, Mar 13, 2015 at 12:48 PM Andre Roberge <andre.roberge@gmail.com> wrote:
On Fri, Mar 13, 2015 at 8:52 AM, Jurgis Pralgauskis < jurgis.pralgauskis@gmail.com> wrote:
Hi,
usually in computer graphics Y is counted to increase downwards. I casn do it with: setworldcoordinates(0, 400, 600, 0)
but then, "right(..)" turns to the left :/
I could swap: right, left = left, right
but on errror I get a bit misleading message
>> right() Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> right() TypeError: left() takes exactly 1 argument (0 given)
I thought to make this hack for kids, so better clearer error msgs...
Any Ideas?
http://bugs.python.org/issue23660 (includes a proposed "permanent" fix).
André
Thanks :) -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________
Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
Thanks for your persistence on this Andre. I agree with you that this is a serious bug. Curriculum writers down the road will steer clear of Python's turtle if it's not up to responding sanely to left and right. Our loyalty should be to teachers and teaching material developers in the future, not as much to prior editions with unfortunate workarounds. Kirby On Wed, Jun 27, 2018 at 6:29 PM, Andre Roberge <andre.roberge@gmail.com> wrote:
On Mon, Jun 18, 2018 at 1:50 PM Jurgis Pralgauskis < jurgis.pralgauskis@gmail.com> wrote:
Ok, I could test it :)
Should I wait for some commit and comment results on the issues site or how...?
Jurgis: Could you just apply the patch I submitted locally and test it?
Or would anyone else volunteer to test it? Obviously, I can provide an independent test of my own contribution. :-)
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
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. ;-)
Hi Kevin. I for one welcome your comments as I do think teachers need to prepare students for more than one way of doing coordinate systems. As you well know, and point out, in maths we almost always make the positives go to the right and the negatives to the left (number line). Then we add a 2nd number line going up and down, with positives increasing in magnitude going up and negatives getting bigger going down. This arrangement of two numbered lines considered "most normal" i.e. this schema is rather ubiquitous and must be considered something of a home base in classroom projects. Where to put the origin (0,0) is another question and is usually (A) at the lower left of the plot (if we don't need all four quadrants) or (B) in the middle (if we do need all quadrants), like when doing a unit circle. However if you walk around to the back and look from the other side... my right is your left and so on -- these are terms relative to a point of view, not to the object in front of us, which is where the confusion often begins. Who's left? Stage left means what again? It's the actor's left, not the audience's left. Theater practice is another place to absorb geometry. The screen is a kind of stage after all, with sprites = puppets. I always tell my Scratch students that programming is a kind of theater (stuff follows a script, objects i.e. actors, agents, sprites, do stuff i.e. act). https://www.sewwhatinc.com/blog/wp-content/uploads/2010/02/stage_diagram1.jp... Computer graphics (Blender et al) reintroduces the camera or viewpoint, which is often missing from elementary maths textbooks. Math texts don't believe in talking about an observer for some reason, or multiple observers. I expect the influence of computer science to be a positive influence in helping address that blind spot over time. MIT Scratch, by far the most popular way to introduce programming in my neck of the woods (Silicon Forest), puts (0,0) in the middle, Y up, X right. Also, should we make the Z axis go into the page or stay on the page perpendicular to X? Again, viewpoint matters. Where is the viewer in this picture, and in what direction is the viewer looking? Important questions! Getting off the XY plane to XYZ is always the next step in maths, including in computer graphics. We may introduce latitude and longitude at this point, along with spherical coordinates, in addition to XYZ. I've used POV-Ray in some of my classes, and certainly for my own Python projects. http://4dsolutions.net/ocn/pymath.html In POV-Ray the positive Z-axis points into the screen and Y goes towards the top of the screen, matching most textbooks that stick to X and Y. When I teach Codesters (Python) in the classroom, I always warn them that when they get to Codepen.io later (where we use HTML, SVG etc), the coordinate system will flip and they'll hear a lot more about H and W (height and width). We'll also talk a lot more about pixels (cells) and the level of resolution (frequency) which, in a DGGS (geospatial data system) might be hexagonal and pentagonal. http://i.stack.imgur.com/UtStp.jpg https://www.eat-the-planet.com/wp-content/uploads/2017/07/tile_resources2_co... Kirby
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@python.org https://mail.python.org/mailman/listinfo/edu-sig
-- -- Yoshiki
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. André On Tue, Jun 19, 2018 at 2:29 PM Yoshiki Ohshima <Yoshiki.Ohshima@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@python.org https://mail.python.org/mailman/listinfo/edu-sig
-- -- Yoshiki
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
On Tue, Jun 19, 2018 at 10:40 AM, Andre Roberge <andre.roberge@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@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@python.org https://mail.python.org/mailman/listinfo/edu-sig
-- -- Yoshiki
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
-- -- Yoshiki
On Tue, Jun 19, 2018 at 1:40 PM, Andre Roberge <andre.roberge@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.
André
Ah. Then I did indeed misunderstand the point. And now I'm of two minds as to whether or not the fix is a fix. I see it as an option, but I also see the argument that sprites, avatars, turtles, etc, often are designed with a "head" and a "tail". So, it's back to the whole "stage left" vs. "left" argument: Are we talking about the virtual creature's left or the viewer's left? (Or am I misunderstanding yet again? If I'm not misunderstanding, I would say "Make it a configuration or startup option, or attribute of setworldcoordinates, or some such." For me, if I'm giving you directions to my apartment, and say in e-mail "Turn left" I would expect you to turn to your left, even if you knew which direction I was currently facing. I would expect an avatar to turn to its left regardless of my viewing angle.) -- *Kevin Cole* <http://novawebdevelopment.org> NOVA Web Development Co-Op http://novawebdevelopment.org/ Arlington, VA
Is this Python's edu-sig or Monty Python's philosophers club? ;-) ;-) ;-) Anyone on this list could probably do the following in less than one minute... Run the following program, showing how left() results in a proper turn left
from turtle import * forward(40) left(90) forward(40)
Now, close the interpreter and run it again, this time with the following
from turtle import * setworldcoordinates(-100, 100, 100, -100) forward(40) left(90) forward(40)
See how left() no longer correspond to a left() turn for the turtle? André ===== For those reading this on a device that does not have Python installed, below, I show an ascii-simulated representation of forward(100) right(90) forward(100) when the turtle is oriented facing left initially, starting at the position labeled by O and ending at X (example chosen because it is the easiest for me to draw, regardless of whether a proportional font is used or not for this email) X | | | | | ---------------O In the current implementation, with a particular choice for user-defined coordinates , the same instructions might yield the following ----------------O | | | | | X i.e. a right() instruction would result in a left turn, and vice-versa. On Tue, Jun 19, 2018 at 3:01 PM Kevin Cole < kevin.cole@novawebdevelopment.org> wrote:
On Tue, Jun 19, 2018 at 1:40 PM, Andre Roberge <andre.roberge@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.
André
Ah. Then I did indeed misunderstand the point. And now I'm of two minds as to whether or not the fix is a fix. I see it as an option, but I also see the argument that sprites, avatars, turtles, etc, often are designed with a "head" and a "tail". So, it's back to the whole "stage left" vs. "left" argument: Are we talking about the virtual creature's left or the viewer's left? (Or am I misunderstanding yet again? If I'm not misunderstanding, I would say "Make it a configuration or startup option, or attribute of setworldcoordinates, or some such." For me, if I'm giving you directions to my apartment, and say in e-mail "Turn left" I would expect you to turn to your left, even if you knew which direction I was currently facing. I would expect an avatar to turn to its left regardless of my viewing angle.)
-- *Kevin Cole* <http://novawebdevelopment.org> NOVA Web Development Co-Op http://novawebdevelopment.org/ Arlington, VA
On Tue, Jun 19, 2018 at 11:20 AM, Andre Roberge <andre.roberge@gmail.com> wrote:
Is this Python's edu-sig or Monty Python's philosophers club? ;-) ;-) ;-)
I do think we're branching out to discuss coordinate systems more generally, as a perennial feature of pedagogy. These more general concerns are distinct from turtle.py in particular. I hope contributors are not shy about continuing the higher level discussions.
Anyone on this list could probably do the following in less than one minute...
Yes, I just ran the following:
turtle.setworldcoordinates(0, -200, 400, 0) turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.left(90) turtle.forward(100)
Here's the resulting graphic output: https://flic.kr/p/28i3cDY However in this test, I did not isolate the problem. The turtle turns to its own right and then its own left. I'm assuming lower left is (0, -200) and upper right is (400, 0) i.e. Y still increases as we go vertically towards the top. I should change that... Lets make Y increasingly positive as we go down the screen.
turtle.setworldcoordinates(0,200,400,0) turtle.forward(100) turtle.left(90) turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.right(90)
Indeed, now I see the problem. The turtle no longer obeys it's own viewpoint but turns oppositely to what I command. Here's the graphic output this time: https://flic.kr/p/26ZJmQ2 Kirby
Any Ideas?
Thanks :) --
Wow I didn't know about this issue. Just import turtle turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.left(90) turtle.forward(100) performs as expected out of the box right? Forward is in the direction the turtle is facing and left and right are the turtle's own front paws. We're looking down on said turtle. https://flic.kr/p/Lb4mUf (warning: URL is case sensitive) I gather some have a preference for (0,0) as upper left versus smack dab in the middle of the screen with X right and Y up? Codesters and Scratch follow the (0,0) in the middle convention. That's how math textbooks do it. HTML Canvas object is irrelevant. Resistance is futile. Just kidding. Would be good to have a global setting, just like for cubic vs. tetra volumes. Kirby
On Sun, Jun 17, 2018 at 10:13 PM kirby urner <kirby.urner@gmail.com> wrote:
Any Ideas?
Thanks :) --
Wow I didn't know about this issue.
Just
import turtle turtle.forward(100) turtle.right(90) turtle.forward(100) turtle.left(90) turtle.forward(100)
performs as expected out of the box right?
Yes, it does. BUT, if you set the world coordinates like Jurgis reported, then left and right are inverted. There's an easy fix ... but it has been rejected.
Forward is in the direction the turtle is facing and left and right are the turtle's own front paws. We're looking down on said turtle.
https://flic.kr/p/Lb4mUf (warning: URL is case sensitive)
I gather some have a preference for (0,0) as upper left versus smack dab in the middle of the screen with X right and Y up?
Codesters and Scratch follow the (0,0) in the middle convention. That's how math textbooks do it.
HTML Canvas object is irrelevant. Resistance is futile. Just kidding.
Would be good to have a global setting, just like for cubic vs. tetra volumes.
Kirby
_______________________________________________ Edu-sig mailing list Edu-sig@python.org https://mail.python.org/mailman/listinfo/edu-sig
performs as expected out of the box right?
Yes, it does. BUT, if you set the world coordinates like Jurgis reported, then left and right are inverted. There's an easy fix ... but it has been rejected.
OK. Thanks for the clarification. I had no idea. Kirby
participants (6)
-
Andre Roberge
-
Carol Willing
-
Jurgis Pralgauskis
-
Kevin Cole
-
kirby urner
-
Yoshiki Ohshima