1 / 13

StarLogo

StarLogo. Le tartarughe in parallelo!!. CONTIAMO LE TARTA. to inizia ca crt 1 end ------------------- to genera hatch [ ] fd 1 end. I comandi in parallelo. Usare genera 4 volte e poi il comando repeat 4 [genera]

marcie
Download Presentation

StarLogo

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. StarLogo Le tartarughe in parallelo!!

  2. CONTIAMO LE TARTA • to inizia • ca • crt 1 • end • ------------------- • to genera • hatch [ ] fd 1 • end

  3. I comandi in parallelo • Usare • genera 4 volte e poi il comando • repeat 4 [genera] • Contare le tartarughe nei due casi e rendersi conto della differenza nelle figure prodotte

  4. La regola di Tartaglia • 1 1 • 1 2 1 • 1 3 3 1 • 1 4 6 4 1 • 1 5 10 10 5 1 • …………………….. • La somma sulla riga n è 2 n

  5. Due figure diverse • repeat 10 [genera ] • rt 90 • repeat 10 [genera ] • rt 90 • ---------------- • repeat 2 [repeat 10 [genera ] rt 90]

  6. Quante?? • repeat 10 [ genera setc color + 10 ] • rt 90 • repeat 10 [ genera setc color + 10 ] • rt 90 • repeat 10 [ genera setc color + 10 ] • rt 90 • repeat 10 [ genera setc color + 10 ]

  7. Quante? • repeat 5 [genera ] • repeat 4 [repeat 5 [genera ] rt 90] • repeat 5 [genera ] rt 90 quattro volte ATTENZIONE diverso su due righe. In ogno patch? • repeat 2 [repeat 5 [genera ] rt 90] due volte • repeat 2 [repeat 2 [repeat 5 [genera ] rt 90]] due volte • repeat 4 [repeat 2 [repeat 5 [genera ] rt 90]]

  8. Quante? • repeat 10 [ genera setc color + 10 ] • rt 90 • repeat 20 [genera] • ------------------- • repeat 2 [repeat 10 [ genera setc color + 10 ] rt 90] • rt 90 • repeat 2 [repeat 10 [ genera setc color + 10 ] rt 90] • osservare le ali

  9. Altre figure • repeat 36 [repeat 3 [hatch [setc who] fd 1]] • rt 10 ( poi 30, 90 ) • repeat 36 [repeat 3 [hatch [setc who] fd 1]] • ------------------ • repeat 36 [repeat 3 [hatch [setc who] fd 1] rt 10]

  10. Intersezione di cerchi • to fiore :petali • repeat :petali [repeat 36 • [repeat 3 [hatch [setc who] fd 1] rt 10] • rt (360 / :petali)] • end

  11. esperimenti • to fiore :num ca crt 1 ask-turtles [fiore :num] end • ----- • fiore 10, fiore 4, • e poi continuare sulla finestra tartarughe

  12. Altri esperimenti • Con 20 tarta e il bottone forever con la procedura • to gira • fd 4 rt 10 • end • diminendo la velocità di esecuzione

  13. Altri esperimenti • Con 20 tarta e la procedura • to gira1 • if who < 10 [rt 1 hatch [setc who / 30 • repeat 36 [fd 4 rt 10] die]] • end • diminendo la velocità di esecuzione • repeat 100[gira1] e bottone forever

More Related