CS 1025 01 - Week #5 September 19 thru 23



Monday, September 19th




  1. Homework due on Friday: Gravity simulation and Adobe After Effects:
    Trig functions and a bouncing ball.
    14 questions to answer, 1 video to watch.

    Homework due on Friday: NetLOGO SIX questions GASLAB Maxwell's Demon model also due on Friday.


  2. Circles with NetLOGO and good review of IFELSE and REMAINDER.

     
    repeat 360            ;; What will be the diameter of this NetLOGO circle?
    [ 
       fd .25 
       rt 1 
       wait 0.01 
    ]
    

    TO circle
      ca
      cro 1
      ask patches [ set pcolor white ]
    
      ask turtles
      [
        pd
        set pen-size 5
        fd 12             ;; radius of 12 gives circumference of 2*PI*12
        rt 90             ;;              gives 2 * 3.14159 * 12 or 2 * 37.7
                          ;;              gives 75.4 as the circumference
    
        repeat 180
        [
           fd (2 * 37.7 / 180)    ;; or could have said   fd (75.4 / 180)
           rt 2                   ;;                      ---------------
        ]
      ]
    END
    
    
  3. Monday 8 am class was SPOKES for spokes of a biccycle wheel.

    Right Mouse Button click to download and run Spokes and Spokes.nlogo example from today's class.

    TO Spokes
       ca
       ask patches [ set pcolor white ]
    
       repeat 14
       [
         cro howManyTurtles          ;; howManyTurtles was a SLIDER
         ask turtles [fd 1]
         wait delayAmt               ;; delayAmt was a SLIDER
       ]
    END
    
  4. Monday 12 pm class called the same basic NetLOGO procedure fillUpGrid and did not do as much, leaving the PATCHES the default color.

    Right Mouse Button click to download and run fillUpGrid and Circles12pm.nlogo example from today's class.

    to fillUpGrid
       ca
    
       repeat 8             ;; the spokes were only 8 turtles long at the end.
       [
         cro howManySpokes  ;; SLIDER is named howManySpokes - 4 is min, 128 is max.
    
         ask turtles [fd 1]
    
         wait delayAmt      ;; delayAmt goes from 0 to 1 by 0.1
       ]                    ;; delayAmt SLIDER would be 0, 0.1, 0.2, 0.3, ... 0.9, 1.0
    end
    

Wednesday, September 21st


  1. Using the TANGENT (TOA) to solve last weeks problem instead of using SINE and COSINE.

    Last week's problem: Twelve Turtle Trigonometry problem.

  2. Using the SHODOR Data Flyer tool, show the equation for the line that connects the following two points:
    2   7
    7   2
                                          y = mx + b
    What is the slope (m)?  
    What is the intercept (b)?  
    What is the sum of squares of deviations?
    
    Consider the following 4 points:
    1 3
    1 4
    4 7
    4 9
    What is the equation of the best fitting line for the four points?
    What is m?  What is b?   What is the sum of the squares of the deviations?
    
  3. ...


Friday, September 23rd



  1. Homework due today: Gravity simulation and Adobe After Effects:
    14 questions about 1 video.

    HW part 2: NetLOGO SIX questions homework due TODAY.

    There are a total of 20 questions due today: 14 After Effects Bouncing Ball and 6 NetLOGO Maxwell's Demon Model.


  2. Scratch to draw a circle. Scratch.MIT.edu is the URL for Scratch at MIT...

  3. Finish up Data Flyer problems from Wednesday.

  4. HOMEWORK due NEXT WEDNESDAY: Sine, Cosine, and Tangent trigonometry...

    Due on Wednesday, September 28th. SHOW YOUR WORK!

    SHOW YOUR WORK!!!!!

  5. SHOW YOUR WORK!