WeScheme Project, March 9, 2012, Cardinal Forest Elementary School

WeScheme website

Back to WeScheme Projects

  1. Flying Chicken in WeScheme

    1. Change the UFO to a chicken:

  2. 2. Change to "chicken.png"

    2b. Change (define UFO .... to (define CHICKEN ...

  3. Rotate the CHICKEN.

    3b Type in the new code that will rotate the chicken:

  4. Use rotate to make an upside down chicken:

  5. Make a UFO and Chicken flying together, use (overlay/xy ...

    5b. Use (overlay/xy ... Here the "100 0" means over 100 and down 0 for the 2nd image

  6. Try rotating the UFO and chicken at the same time

    6b. Here's the new code to type:

  7. Make the chicken and UFO fly up instead of down:

  8. Now make them fly diagonally:

  9. Here's how to slow them down (or speed them up).

    If you would like to copy and paste the starting source code, here it is:

    (define (descend w) (+ w 5))
    
    (define (hits-floor? w) (> w 300))
    
    (define UFO 
        (image-url "http://world.cs.brown.edu/1/clipart/ufo.png"))
    
    (define (draw w)
      (place-image UFO 150 w
                   (empty-scene 300 300)))
    
    ;; The use of big-bang starts the world program.
    (big-bang 0                               ;; initially, let the height be zero.
              (on-tick descend 1/15)    ;; tick every 15 frames a second
              (on-redraw draw)              ;; use render to draw the scene
              (stop-when hits-floor?))  
    

    More pictures to try from Brown U.