[etoys-dev] Forward direction (was Re: First draft of Etoys Reference Manual Glossary)

Bert Freudenberg bert at freudenbergs.de
Wed Sep 26 09:02:51 EDT 2012


On 2012-09-26, at 05:08, Steve Thomas <sthomas1 at gosargon.com> wrote:
>  changing forward direction should not IMNSHBOWO change heading.  


Wrong indeed ;) It's actually quite simple:

Forward Direction describes where "forward" is in the graphic shape of an object, whereas "heading" describes the object's rotation. If you paint a car from the top, then "going forward" should mean going "up" on the screen. If you paint a fish pointing right, then "going forward" should mean going "right". Now what's the difference between these two objects? It's just an image. The computer can't tell. So we have to tell it, leaving the car's forward direction at 0 degrees (meaning "north"), but changing the fish's forward direction to 90 degrees ("east").

Example. Here's a fish, freshly painted:



Telling it to move forward would move it up the screen. Not what we want. So we shift-drag the green forward-arrow to point to the fish's "nose":



So now the forward direction is to the right. The appearance of the fish did not change, but since going forward now would move it in another direction, its heading has changed, obviously. Afterwards we can change the heading, of course, which rotates the object as expected:



And so on:



Note that if we had *not* changed the heading value when dragging the forward arrow, *this* is the picture we'd have gotten. Not good.

One way to think about it is that the forward direction describes the rotation as seen from the inside of the object, and heading is the rotation as seen from outside. You almost never have to use the numerical value of the forward direction because it only describes in which orientation the object was painted.

HTH,

- Bert -
-------------- n?chster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20120926/832d8d59/attachment-0001.html>
-------------- n?chster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : PastedGraphic-2.png
Dateityp    : image/png
Dateigröße  : 12229 bytes
Beschreibung: nicht verfügbar
URL         : <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20120926/832d8d59/attachment-0004.png>
-------------- n?chster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : PastedGraphic-3.png
Dateityp    : image/png
Dateigröße  : 12560 bytes
Beschreibung: nicht verfügbar
URL         : <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20120926/832d8d59/attachment-0005.png>
-------------- n?chster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : PastedGraphic-4.png
Dateityp    : image/png
Dateigröße  : 12918 bytes
Beschreibung: nicht verfügbar
URL         : <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20120926/832d8d59/attachment-0006.png>
-------------- n?chster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : PastedGraphic-5.png
Dateityp    : image/png
Dateigröße  : 12548 bytes
Beschreibung: nicht verfügbar
URL         : <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20120926/832d8d59/attachment-0007.png>


More information about the etoys-dev mailing list