CPS 49s StarLogo Fireworks

Betsy McDonald and Anthony Kang

Descriptions

  1. For Each Pair of Buttons first click the corresponding SETUP button and then the firework name to the right.EXAMPLE (Click "setup_one" and then "Blade"
  2. Blade: This looks like a spinning blade

  3.  

     

  4. Spider: This respresents a firework that flowers out and extends downward, and also looks like a spider.

  5.  

     

  6. Pink Eye: This is a pink and red eye.

  7.  

     

  8. Snow Flake: This looks like a blue snowflake

  9.  

     

  10. Basketball: This firework looks like an orange basketball- GO DUKE!

  11.  

     

  12. Circles: Pretty Circles

  13.  

     

  14. Finalie: The Grand Finalie!

  15.  

     

    If you click on any of them more than once; it creates more unique patterns! You can also do different combinations with some of the fireworks by not pushing a setup button before doing the next firework



    The Code:
        observer -
    ;;Betsy McDonald & Anthony Kang

    to setup_one
    ca
    crt 20
    ask-turtles [pd]
    end

    to setup_two
    ca
    crt 20
    ask-turtles [setc yellow]
    end

    to setup_three
    ca
    crt 30
    ask-turtles [setc red]
    ask-turtles [pd]
    end

    to setup_four
    ca
    crt 40
    ask-turtles [setc blue]
    end

    to setup_five
    ca
    crt 60
    end

    to setup_six
    ca
    crt 80
    end

    to setup_seven
    ca
    crt 30
    end

    turtle -
    ;;Betsy McDonald & Anthony Kang

    to firework_one
    fd 8
    rt 45
    fd 10
    hatch [lt 70 fd 6 rt 260 fd 13]
    fd 9
    rt 90
    fd 8
    rt 45
    fd 10
    hatch [lt 70 fd 6 rt 260 fd 13]
    fd 9
    lt 90
    fd 10
    end

    to firework_two
    pd
    fd 3
    if who <= 9 [lt 60 fd 8 lt 60 fd 35 seth 180 fd 25]
    if who >= 10 and who <= 19 [rt 60 fd 8 rt 60 fd 35 seth 180 fd 25]
    hatch [setc orange fd 3 seth 180 fd 5]
    end

    to firework_three
    fd 10
    hatch [setc pink lt 90 fd 10]
    fd 10
    hatch [setc pink rt 90 fd 10]
    fd 10
    hatch [setc pink lt 90 fd 10]
    fd 10
    hatch [setc pink lt 90 fd 10]

    end

    to firework_four
    if who >= 0 and who <= 10 [seth 90 fd 20]
    if who > 10 and who <= 20 [seth 180 fd 20]
    if who > 20 and who <= 30 [seth 270 fd 20]
    if who > 30 and who <= 40 [seth 0 fd 20]
    hatch [setc sky fd 10 pd fd 3 lt 100 fd 6 lt 100 fd 9 lt 100 fd 12 lt 100 fd 15
    lt 100 fd 18 lt 90 fd 40]
    pd
    fd 3
    rt 100
    fd 6
    rt 100
    fd 9
    rt 100
    fd 12
    rt 100
    fd 15
    rt 100
    fd 18
    rt 100
    fd 21
    lt 110
    fd 8
    end

    to firework_five
    setc orange
    pd
    bk 20
    rt 70
    bk 10
    lt 140
    bk 10
    end

    to firework_six
    fd 8
    rt 45
    fd 10
    hatch [lt 70 fd 6 rt 260 fd 13]
    fd 9
    rt 90
    fd 8
    rt 45
    fd 10
    hatch [lt 70 fd 6 rt 260 fd 13]
    fd 9
    lt 90
    fd 10
    end

    to firework_seven
    pd
    fd 15
    lt 50
    fd 5
    rt 150
    fd 5
    pu
    fd 20
    pd
    fd 3
    rt 45
    fd 5
    lt 70
    fd 2
    rt 100
    fd 6
    lt 90
    pu
    fd 10
    pd
    fd 4
    lt 145
    fd 4
    rt 40
    fd 9
    end