AutoHotkey | Android | Arduino | COMM140 | Fractals | Grammar Checkers | Knots | A Million Dots Activity | Processing | Processing for Scratch Users | Redbubble | Tutorials | Weather | World Time Meeting Planner | Favicon Generator.
Home > MicroWorlds Logo (Turtle Graphics) Links & Examples > Examples > MicroWorlds Input & Control
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 |
random_tri_sq.zip 38KB use winzip to unzip |
to click_switch if :click_switch = "true [ to check_switches Draws random triangles & squares, Produces nice 50's style table top designs. Demonstrates one way to implement push buttons using turtles to control a try / false variable. |
on_a_tangent.zip 9KB use winzip to unzip |
Note this project demonstrates the use of Check Boxes Inspired by the online essay going
in circles |
one_good_turn.mw2
27 KB |
Demonstrates the use of radio buttons Inspired by the online essay going
in circles |
etch-a-sketch2.zip 4KB use winzip to unzip |
Etch-a-sketch a work in progress |
flower.zip 388KB use winzip to unzip |
In this example the colours cyan and magenta are programmed to show a text box containing information for eight seconds, and then hide the information again. |
radio_buttons.zip 11KB use winzip to unzip |
This project demonstrates one way to implement radio buttons in MicroWorlds. |
move_turtle2.mw2 29 KB
|
Move the turtle using the
cursor keys Yet another more complex version of move_turtle0 This is an example of creeping featurisim. I could not help adding the ability to lift the turtle using U for pu and then I had to have D for pd and then I had to be able to see the diffierence between when the turtle was up and down. And then I added colours and then I though what about white... This is always a risk when writing programs. Creeping featurisim is also known as program bloat. |
October 21, 2004 move_turtle3.mw2
82 KB move_turtle3 source
code
|
Another more complex version of move_turtle0 This version uses features from Art2 to colour the turtle as it moves |
make_turtles.mw2 52 KB make_turtles.zip 10 KB use winzip to unzip |
Uses Sliders for Input Demonstrates how to make and remove turtles using procedures based on code from: http://www.microworlds.com/library/math/geoboard/geoboard.zip to remove_all_turtles newturtle "create_a_dummy_turtle
; this is necessary make "number_of_turtles count get first pagelist "turtles |
move_turtle0.mw2
18 KB move_turtle0 source
code |
Move the turtle using the cursor keys |
to startup make "step 50 setpensize 5 move_turtle end to move_turtle pd ; read the key pressed make "ch ascii readchar if :ch = 38 [t1, seth 0 fd :step] ; north if :ch = 40 [t1, seth 180 fd :step] ; south if :ch = 39 [t1, seth 90 fd :step] ; east if :ch = 37 [t1, seth 270 fd :step] ; west ;setc (random 15) + 125 ; add some colour setc "black move_turtle ; repeat the whole process again end |
|
harmonograph.mw2 90KB |
Draws harmonographs
Based on code from http://www.mulawa.net/mulawa/projects/index.html Andrew Purdam has produced equations that allow one to
explore the beauty of the harmongraph without building one....not that
building one is any less satisfying. His equations are: y(t) = Ay(t) sin(wy + py) All initial amplitudes, frequencies (w) and phases (p) should be different and not integer multiples for the most complicated (interesting) patterns. In order for the amplitude to decay (not necessary but
occurs in the real harmonograph) the amplitudes can decay as follows,
where d is typically a suitable small positive number. This gives an exponential
decay function. |
everyone.mw2 14 KB |
Demonstrates starting turtles & music at the same time
to halt |
Last refreshed: December 23 2024. 06:31.36 am
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.