0% found this document useful (0 votes)
74 views5 pages

How To Graph Motion: (A Squeak Etoys Project)

Squeak provides tools for creating real-time graphs of object motion. The document describes how to: 1) Paint an object whose motion you want to graph, such as a basketball. 2) Set up a graphing area by placing two playfields side by side and painting a dot in one to serve as the grapher. 3) Write a script to move the grapher dot according to the y position of the basketball, linking their y values. 4) Run the script to graph the basketball's motion as you move it.

Uploaded by

smswamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views5 pages

How To Graph Motion: (A Squeak Etoys Project)

Squeak provides tools for creating real-time graphs of object motion. The document describes how to: 1) Paint an object whose motion you want to graph, such as a basketball. 2) Set up a graphing area by placing two playfields side by side and painting a dot in one to serve as the grapher. 3) Write a script to move the grapher dot according to the y position of the basketball, linking their y values. 4) Run the script to graph the basketball's motion as you move it.

Uploaded by

smswamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

How to Graph

Motion
(A Squeak Etoys Project)
1 2
How to Graph Motion: Paint an object to graph:
Pull the paint utility from the navigation flap.
Squeak provides the tools for making graphs Paint an object whose motion you want to
that draw in realtime and make it possible to graph. (We made a basketball.)
analyze the motion and behavior of objects
you create. Using these graphs you can see
how "math" works. Once you know how to
make a graph you may want to use graphs to
look at all kinds of functions and phenomena.

This project will be easier if you have some


experience with:

● drawing objects
● moving objects
● scripting

3 4
Set up a Graph:
Bring up a viewer for your object and rename it: We have and object, now we must set up a way to graph it.
Go to the supplies flap, drag out two playfields. Drop the
basketball into one of them.
5 6
Bring up the "Halo of Handles" on the other playfield and
click on the menu handle. From the menu that appears,
select "playfield options". From the submenu that appears
select "use standard texture". This will give you a pale
yellow and blue graph-paper background.
Bring out the paint box and paint a simple black dot. "Keep" it
and drop it onto your graph-paper.

7 8
Bring up a viewer for the black dot and rename it. (we took a
vote and named ours "grapher" though the name "Jerry" got a
lot of votes.)
Prepare to Draw:
We need to write a script for our
"grapher" to follow.
From the "grapher" viewer
Drag out an empty script.
Name it "graphing" if you like.

Make sure the "grapher's heading"


is set to 90.
9 10
Drag out a "grapher forward by" tile and
drop it on the "graphing" script.
Drag out a "grapher's y <=" tile and drop it
on the "graphing" script.

Set the value to "1"

11 12
Go back to the "grapher" viewer
and from the "pen use" category
grab a "grapher's penDown" tile
and drop it in the "grapher"
Now for the crucial part, go to the script.
"basketball" viewer, drag out a
"basketball's y" tile and drop it on
the value of the "grapher's y" tile.

Make sure the value


"grapher" and "basketball" is set to "true"!
are now linked!

Drag by the green


"assignment arrow".
13 14
Draw a graph:
CHALLENGES:
Click the "graphing" ticker to
run the script.
Now you have enough information
Move the basketball up, down to begin making all kinds of graphs.
and around with your mouse.
Can you graph motion onthe "x" axis?

Can you graph speed?

Heading?

Note that "basketball's" y axis Try it and don't forget to have fun!
motion is being graphed for
future analysis.

www.squeakland.org

You might also like