On Tue, September 25, 2012 12:56 pm, karl ramberg wrote:
> On Mon, Sep 24, 2012 at 8:49 AM, Edward Mokurai Cherlin > <[hidden email]> wrote: >> forward direction: What effect or use does it have? > > Each player has a direction arrow that can be changed by clicking on > it while holding shift. > If it's not visible you can check the box 'direction arrow' in halo menu. > When you tell a player to move forward it will move in the direction > of the arrow. This turns out not to answer the question I asked. You are describing the heading, not the forward direction. Objects move in the direction of their heading, which is the direction of the Halo arrow, but not necessarily the same as the forward direction. Rotating the Morph with the Rotate handle in the Halo changes the heading but not the forward direction. Turning on the direction arrow, and then grabbing it with a shift-click and turning it, changes both the forward direction and the heading. These two values can be edited in the viewer as well. Editing the heading leaves the forward direction unchanged. Editing the forward direction also changes the heading. The command Object forward by 5 moves the Morph in the heading direction. I see nothing in Etoys that makes use of the forward direction. In Squeak, we see for the Morph class: heading "Return the receiver's heading (in eToy terms)" owner ifNil: [^ self forwardDirection]. ^ self forwardDirection + owner degreesOfFlex forwardDirection: newDirection "Set the receiver's forward direction (in eToy terms)" self setProperty: #forwardDirection toValue: newDirection. degreesOfFlex "Return any rotation due to flexing" "NOTE: because renderedMorph, which is used by the halo to set heading, goes down through dropShadows as well as transformations, we need this method (and its other implems) to come back up through such a chain." ^ 0.0 and so on. Also in Squeak, I see 19 senders of forwardDirection in 12 classes, which I do not feel ready to explore until after I learn rather more Squeak and Smalltalk. I can feel it coming on. ^_^ -- Edward Mokurai (默雷/निशब्दगर्ज/نشبدگرج) Cherlin Silent Thunder is my name, and Children are my nation. The Cosmos is my dwelling place, the Truth my destination. http://wiki.sugarlabs.org/go/Replacing_Textbooks _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Edward,
I think you may have uncovered a bug (although it may exist in the model inside my head). I can take a polygon from the Supplies flap and it starts out with its heading and forward direction as 0.
Then if I first change the forward direction to 180 and then change the heading to 0 (which also changes the forward direction to 0) I wind up with the polygon costume turned 180, but heading and forward direction both 0. This does not make sense to me.
Also the Balloon help for "heading" states: "Which direction the object is facing. 0 is straight up" The Balloon help for "forward direction" states: "The angle of my forward direction without rotating myself"
Okay, so I may be starting to get this but it seems harder than it should be. To my simple mind, there are two things:
Thus changing forward direction should not IMNSHBOWO change heading. Of course at this point we probably do not want to change existing behavior which could break old projects. So we may have to document as is.
Stephen IMNSHBOWO - In My Not So Humble But Often Wrong Opinion On Tue, Sep 25, 2012 at 7:08 PM, Edward Mokurai Cherlin <[hidden email]> wrote: On Tue, September 25, 2012 12:56 pm, karl ramberg wrote: _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Other interesting thing is that if you turn by 270, heading=-90 and forward direction=270
Why? Well on the one hand good to think of things using multiple models, but still. Also one other thing that affects rotation (although only for "graphics" (stuff you paint or images imported) is "rotation style" which now that we have "flip left rignt" and "flip up down" perhaps should be removed from the Etoys friendly mode.
Rotation Stye has four options:
Stephen On Tue, Sep 25, 2012 at 11:08 PM, Steve Thomas <[hidden email]> wrote: Edward, _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On 2012-09-26, at 05:08, Steve Thomas <[hidden email]> wrote: changing forward direction should not IMNSHBOWO change heading. 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 - _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Steve Thomas
On 2012-09-26, at 05:08, Steve Thomas <[hidden email]> wrote:
> Edward, > > I think you may have uncovered a bug > > I can take a polygon Polygons are very special. You could have used almost any other object. The preferred means of creating an object in Etoys is by using the paint tool. > from the Supplies flap and it starts out with its heading and forward direction as 0. > Then if I first change the forward direction to 180 and then change the heading to 0 (which also changes the forward direction to 0) I wind up with the polygon costume turned 180, but heading and forward direction both 0. This does not make sense to me. This is because polygons are not rotated like other objects. When rotating a polygon, its vertices get changed. The new heading is recorded in the polygon's forward direction. That means that for polygons, heading and forward direction are intrinsically linked, unlike for any other object where they are independent. The reason polygons are different is so that they do not get magnified like a sketch when resized, but they keep their border width. One way to think of it is this: when an object's forward direction is the same as its heading (+/- 360 degrees) then its screen image appears unrotated from its "intrinsic" image. That's always the case for polygons because rotating the polygon changes its internal orientation, whereas for sketches the original sketch is not modified so it needs to keep track of the forward direction independently of its heading. - Bert - _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Bert Freudenberg
On Wed, Sep 26, 2012 at 9:02 AM, Bert Freudenberg <[hidden email]> wrote:
Not the first or last time. The only thing good about being wrong is when I find out I learn something new! Thanks.
This is perhaps the best and simplest explanation yet.
It definetly helps. _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On 2012-09-26, at 15:57, Steve Thomas <[hidden email]> wrote: > On Wed, Sep 26, 2012 at 9:02 AM, Bert Freudenberg <[hidden email]> wrote: >> On 2012-09-26, at 05:08, Steve Thomas <[hidden email]> wrote: >>> changing forward direction should not IMNSHBOWO change heading. >> >> Wrong indeed ;) It's actually quite simple: > Not the first or last time. The only thing good about being wrong is when I find out I learn something new! Thanks. >> >> 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. > This is perhaps the best and simplest explanation yet. > >> HTH, > It definetly helps. Great! Maybe you could come up with better help balloons for these tiles ... - Bert - _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Created Issue in Tracker http://tracker.squeakland.org/browse/SQ-1117 cc'ing education team for input.
On Wed, Sep 26, 2012 at 10:02 AM, Bert Freudenberg <[hidden email]> wrote:
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Free forum by Nabble | Edit this page |