More links

Adobe Connect | Adobe Conect Custom Pods | AutoHotkey | Android | Arduino | Blog | COMM140Fractals | Grammar Checkers | Knots | a Million Dots |  Processing | RedBubble | Tutorials | Weather | World Time Meeting Planner |

Home > MicroWorlds Logo (Turtle Graphics) Links & Examples > Examples > MicroWorlds Maths Projects

MicroWorlds Maths Projects

The following programs are a collection of examples most of which I have created for my own amusement or as
teaching aids. You are welcome to download copies and play with them. You may also place copies on your website as long as you add a link to this page and e-mail me details of where you are using them.

If you switch to the procedures page using Ctrl + F or Pages | Procedures you will see that most of these examples use procedures. if the example has no procedures then right click on the turtle and see if there is any code programmed directly into the turtle.

Colours can also have code associated with them. Click on the Paint Brush button to view the colour pallet.
any colours with a black dot in the center of the colour has logo code programmed into it. Double click on the colour to view the associated code.

Note: these example programs are written using MicroWorlds Version 2.05

The Following MicroWorlds programs are free software; you can redistribute and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

These programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

MicroWorlds horse race
August 2, 2004

horse_race2.mw2 86 KB
horse_race2.zip 19 KB

This is a horse race that uses a simple animation technique that does not require setsh "horse1 etc.



Microworlds race
November 1, 2003

race4.mw2 20 KB
race4.zip 5KB

This is a simple race between 4 turtles. The race however is currently rigged with an advantage to the fish.

The fish uses a procedure called race_faster

whereas the car uses a slightly slower version called race.

The turtles stop racing when they reach the colour green.


This project also demonstrated the process of animating a turtle with the trot procedure used by the horse.


MicroWorlds crowd
November 1, 2003

crowd1.mw2 101 KB
crowd1.zip 30KB

A simple version of the crowd idea.

This program is based on:
What a Crowd! by Wendy Petti author of Math Cats
http://www.mathcats.com wpetti@mathcats.com

MicroWorlds crowd

November 2, 2003

crowd3.mw2 142 KB
crowd3.zip 23KB
crowd3.exe 84 KB

Keywords: math's, estimation, random numbers,

This program stamps a random number of people on the screen The object is to estimate the number of people and then check your estimate against the total number of people.

This program is based on:
What a Crowd! by Wendy Petti author of Math Cats
http://www.mathcats.com wpetti@mathcats.com

MicroWorlds LOGO bouncing balls

bounce.mw2 33 KB
bounce.zip 5KB

Fun with bouncing turtles.

 to reflect_red
      seth 180 - heading      ; make the turtle bounce

 to reflect_blue
      seth 360 - heading      ; make the turtle bounce

MicroWorlds LOGO Bouncing balls

MicroWorlds Maths1
July 25, 2004

maths1.mw2 66 KB
maths1.zip 20KB

; Author: Rupert Russell
; e-mail: rupert.russell1@gmail.com
; URL: http://www.rupert.id.au/microworlds

; Purpose: To generate a random collection of turtles
; to promote discussion of mathematical concepts.
; e.g.
; Q. Tell me where the start is? A. Above the car.
; Q. Where is the girl?          A. In front of the house.

; Children can also click & drag turtles on the screen in response to instructions.
; e.g.
; Move the red circle below the swan.
; Move all the animals above the car.
; Put both fishes together.

; Note to you may add or remove turtles as you wish
; but do not remove the turtle named t_star.

; Key Learning Area (KLA): Mathematics
; CSF II Level: 1
; Strand: Space
; KIDMAP Code: MAMA0105

; Learning Outcome: 1.5
; Use and understand simple everyday location words
; to follow and give an oral direction.
; Learning Indicator: Describe where an item is placed
; (e.g. under the table).

; Created: July 25, 2004 - version 1
; This program may be freely used and modified
; for educational purposes as long as this notice
; remains intact.

to go
  ;-------- This procedure sets the shape of each turtle
  ; to a random shape. It then moves each turtle
  ; to a random position on the screen making sure
  ; that each turtle is not too close to the side
  ; of the screen.
  ; It then changes the shape of the turtle "t_star
  ; back to a star. This way there will always be
  ; a single star on the screen.

  everyone [pu]
  everyone [setsh (random 62) + 1] ; only uses 62 turtles
  everyone [setx (random 335) - (random 335)+ 5] ; random x  
  everyone [sety (random 176) - (random 176)+ 5] ; random y

  talkto "t_star setsh "star                     ; make sure                                                  ; there is                                                  ; always a
                                                 ; star


falling objects
September 13, 2004

falling.mw2 91KB
falling.zip 32 KB
falling.exe 92 KB

Get MicroWorlds Web Player Plugin version
GNU License.txt

Published under the GNU GPL

Simulates falling objects.

Each shape falls according to a different set of rulles.

Generated from an idea by David Henderson


October 19, 2004

rotate.mw2 413 KB
rotate.zip 224 KB
rotate.exe 284 KB
rotate source code

Get MicroWorlds Web Player Plugin version
GNU License.txt

Published under the GNU GPL

MicroWorlds sinewaves
November 17, 2004

buz.mw2 45 KB
buz.zip 18.KB
buz.exe 80 KB

Published under the GNU GPL

to buz
   seth 40
   make "x 0

   forever [
      repeat 20 [fd .5 wait 0.1 ]
      rt (sin :x) * 10
      make "x :x + 10

MicroWorlds Guess my number

November 17, 2004

guess1.mw2 12 KB
guess1.zip 9 KB
guess1.exe 72 KB

Get MicroWorlds Web Player Plugin version
GNU License.txt

Published under the GNU GPL

to new_number
   if min > max [settc "red print [Please set min to less than max] stopall]
   if min = max [settc "red print [Please set max to more than min] stopall]
   settc "black
   print (se [Pick a number greater than ] min - 1)
   print (se [& less than ] max + 1 )

   make "hiddenNumber (random (max - min)) + min
   ;show se [The hidden number is ] :hiddenNumber

to ?
   if guess > :hiddenNumber [settc "red print [Too big try again] ]
   if guess < :hiddenNumber [ settc "blue print [Too small try again] ]
   if guess = :hiddenNumber [ settc "green print [You win!]]

March 1, 2005

normal_distribution.mw2 48 KB


Published under the GNU GPL

to bounce
   ; only bounce once per pin
   if :bounce [make "direction random 2]
   make "bounce "false

   ; pick a direction to bounce at random
   ifelse :direction = 1 [bounce_left][bounce_right]

to bounce_left
   ; bounce around the pin 16 times
   if :draw = "true [pd]
   seth 270
   repeat 16 [lt 5 fd 1.7 wait :delay]
   seth 180
   make "bounce "true

April 8, 2005

MindReader.mw2 253 KB
MindReader source code

to Become_a_Random_Shape
   ; each turtle becomes a random shape
   setsh 1 + random 25

to Become_Answer
   ; each Answer turtle becomes the same random shape
   ; t9, t18. t27, t36, t45, t54, t63, t72, t81, t90

   ; choose which random shape to become
   make "random_number 1 + random 25

   ; change each turtle in turn to the same random shape
   make "t_counter 91
   repeat 10[
      talkto word "t :t_counter
      setsh :random_number
      make "t_counter :t_counter - 9

to psychic
    ; show the answer on page 2
   setsh :random_number + 26

May 31, 2006

pirate-map.mw2 449 KB

pirate-map.zip 140 KB

This is an example of a pirates map the objective is to give the turtle commands that will lead it to the gold.

I have drawn the background using stamps of turtles and then used freezebg to freeze the background image that way if you make a mistake you can start again with the CG button and the background does not disappear.

Note that I have stamped the text onto the background as well this is the best way to ensure that the text font and size stay consistent.

APA citation:
Russell, R. (2016, July 04, 02:14 pm). Microworlds maths projects.
     Retrieved October 19, 2017, from http://www.rupert.id.au/microworlds/maths.php

Last refreshed: October 19 2017. 07:07.41 am

rupert dot russell at acu dot edu dot au Support Wikipedia

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.

7925 Visits since February 1, 2005