CS 1025 01 - Week #2 (Aug 27, 29, 31)


NEW: TEMPO of Twinkle Twinkle Little Star.

How to use a SLIDER for MUSIC TEMPO.


Monday, August 27th


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.
    The 4 question/task assignment will be due on Wednesday, September 5th, after Labor Day holiday.

    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: This is 3 of 4 questions/tasks handed out last Friday 08/24 in class: Music, Even and Odd Turtles, Chemistry & Physics Maxwell's Demon Gaslab NetLogo model - due on the Wednesday AFTER Labor Day (Due on Sep 03, 2012).

  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, August 29th


  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, August 31st


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

  2. A few thoughts on Turtles, Termites and Traffic Jams readings:
    NOTE:  This is item #3 on your assignment two.  SEE the YELLOW HANDOUT.
           Read pages 49-59 of the Turtles, Termites, and Traffic Jams 
      
    Read pages 49-59 of the Turtles, Termites, and Traffic Jams textbook.
    
    Turn in one-half page of thoughts,
                                notes,
                                   confusions,
                                      insights,
                                         reflections
                                               about your reading
    
                             to prove that you read it 
                                 and engaged with the material.
    
        You may write down and quote some sentences from the material.
    
  3. 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.

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

Week #3 (September 5th) preview
Note: Labor Day holiday on Monday - no classes

Note: We may be continuing with week #2 topics and tasks.
The above schedule is tentative and the pace of the race might need to be SLOW down, but NOT to a TURTLE pace.


  1. We will look at the NetLogo Flocking of Birds example in the 3rd class, but get back to it later in the class.

  2. Predator/Prey model and NetLogo basics - Panthers versus Jackrabbits or Lynx versus Hare.

  3. Flash ActionScript and the bouncing ball. Gravity to be simulated using Adobe Flash. A very simple model will be created.

  4. Flocking of birds example: Watch the movie and then play with item #5, the NetLogo model published to the web.

  5. Another forest FIRE model available from SHODOR.

  6. Shodor Data Flyer tool used to Plot Data. We will plot some Forest Fire simulation output again during the first week of class. This tool is much simpler to use than SPSS and Excel!