CS 1025 01 - Week #7 (Oct 07, 09, 11)



Monday, October 7th


  1. Mushroom hunting, part II. One turtle searching. Counting and reporting mushrooms found. Starting from the lower left hand corner.

  2. Assignment due on Wednesday, October 16th: Music, Even and Odd Turtles, Chemistry & Physics Maxwell's Demon Gaslab NetLogo model - due anytime on Wednesday, October 16th, 2013.

  3. GasLab Maxwells Demon Netlogo Chemistry/Physics model assignment will be discussed briefly on Wednesday or Friday so you know how to approach it.

  4. Here is CHECKERBOARD code we have done several times in NetLogo to see each of the patches:
    Each patch has a certain pcolor (think pcolor = P_atch_COLOR).
       
    Each patch has an x coordinate (pxcor)
               and a  y coordinate (pycor).
     
    TO checkerBoard
        ask patches 
        [ 
          ifelse remainder (pxcor + pycor) 2 = 0 
                           [ set pcolor white ]
                           [ set pcolor yellow ]
        ]
    END
    
  5. Here is an application with slowWalk and right triangle trigonometry.

    Study it. Try it out. Eight Turtles, but the odd turtles (1, 3, 5, 7) walk farther than the even turtles (0, 2, 4, and 6).

    ifelse remainder who 2 = 0 
    [
       slowWalk 8                         ;; Even turtles move 8 units
    ]
    [
       slowWalk sqrt (8 ^ 2 + 8 ^ 2)      ;; Odd turtles move square root of 128 units
    ]                                     ;; Odd turtle move about 11.3 units
                
                          11.31371 ^ 2 =  128.0000339641
     8 squared plus 8 squared = 64 + 64 = 128
                             square root (128) = 11.31371
    


Wednesday, October 9th


  1. Music with Netlogo.

    Twinkle Twinkle Little Star song consists of only quarter notes and half notes. It starts on note C, which is 60 for NetLogo.

  2. The Sound of Music and Julie Andrews (Mariah).
    60, a deer, a female deer.
    62, a drop of golden sun.
    64, a name I call myself
    65, a long, long way to run
    67, a needle pulling thread
    69, a note to follow 67
    71, I drink with jam and bread
    That will bring us back to 72...oh oh oh
    
    The magificent seven: Do-re-mi-fa-so-la-ti.
    When you read you begin with A-B-C
    When you count you begin with 1-2-3
    When you sing you begin with do-re-mi
    
  3. Music and NetLogo: Happy Birthday - 60 is C, 62 is D, ..., 72 is C and 60 + 12 = 72.

  4. Noteworthy - M U S I C: More examples/explanations M U S I C and NetLogo...

  5. TEMPO of Twinkle Twinkle Little Star.

    How to use a SLIDER for MUSIC TEMPO.


Friday, October 11th


  1. ...

  2. ...