CS 1025 01 - Week #3 (Jan 28, Jan 30, Feb 01)



Monday, January 28th


Link to download and install NetLogo on your computer (PC or MAC). It is FREE!

Netlogo is also available at most of the computer labs on the UNI campus, including all CNS labs and all of the SCC (Student Computer Center) labs like the Library, Union, Redeker, Towers, Lawther, etc.

  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. Assignment Two: Music, Even and Odd Turtles, Chemistry & Physics Maxwell's Demon Gaslab NetLogo model - due anytime on Friday, February 1st, 2013.

  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. 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
    


Wednesday, January 30th


  1. GasLab Maxwells Demon Netlogo Chemistry/Physics model assignment will be discussed briefly ON FRIDAY so you know how to approach it using NetLogo. Questions on Friday 08/31 appreciated and welcome!

  2. Here is the CHECKERBOARD code we did in NetLogo so we could 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
    
  3. Here is the application that we did in class. 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
    

Friday, February 1st


  1. Maxwell's Demon will be briefly demonstrated and any questions answered and/or problems solved.

  2. Another M U S I C example, if needed, so that the TWINKLE, TWINKLE LITTLE STAR problem techniques/concepts are well understood.

    In the Noteworthy M U S I C: We'll right mouse button click on a link and download the NetLogo file so we can try it out and hear the music while looking at the code.

  3. Saving your NetLOGO work with the file extension .nlogo and attaching the file in an email note to jacobson@cs.uni.edu will be rehearsed with an in class example.

pwd

NEW: TEMPO of Twinkle Twinkle Little Star.

How to use a SLIDER for MUSIC TEMPO.