alice-teacher Realistc Fish - s Digest, Vol 61, Issue 6

robert durtschi robert.durtschi at gcsu.edu
Sat Sep 12 06:04:47 EDT 2015


I'm going to assume that Alice 3 also allows events, etc.
The solutions file for Exercise 8.2 in "An Introduction to Programming Using Alice 2.2, 2nd Edition" :

Sets up an object list of the fish's tails
Creates a "while the world is running" event
either creates a "swim" method called by the event  or in-line in the event:

world.swim ( ) 
       For all world.tails , every item_from_tails together 
           item_from_tails  turn  left 0.1  revolutions duration = 0.25  seconds 
           item_from_tails  turn  right 0.2  revolutions duration = 0.5  seconds 
           item_from_tails  turn  left 0.1  revolutions duration = 0.25  seconds 

Best:
Bob Durtschi
________________________________________

Message: 2
Date: Thu, 10 Sep 2015 17:15:47 -0700
From: Steven Jang <sjang at pacificacademy.org>
Subject: alice-teacher Alice 3 - Real looking fish motion
To: alice-teachers at lists.andrew.cmu.edu
Message-ID:
        <CAKkyj=25_a57DxNtVCFSG3jf-2ZOT__ejUQDDURFMZiaFowZ0Q at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I'm asking my students to create an aquarium with Alice 3

We are challenged with how to move a fish forward while wagging the tail
left and right.
Can't find a way to make it look smooth like a YouTube video I saw;

I believe it's only 2 - 4 lines. If you have these I would love to use them
during class.

Steve Jang
Pacific Academy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20150910/6c89427d/attachment-0001.html

------------------------------


More information about the alice-teachers mailing list