ScratchData LogoScratchData
Back to popswilson's profile

Ant & Mouse-pointer

POpopswilson•Created January 7, 2014
Ant & Mouse-pointer
7
3
408 views
View on Scratch

Instructions

Click on the green flag and as you move the mouse-pointer around the screen, the distance formula for the Cartesian plane from analytic geometry is used to compute the distance between the ant and the mouse=pointer. In my project One Blind Mouse (http://scratch.mit.edu/projects/359914/), I use the distance formula to simulate the motion of a blind mouse that can smell (but not see) a piece of cheese. As the distance between the blind mouse and the cheese decreases, the smell gets stronger. As the distance increases, the smell gets weaker. The strategy of the blind mouse is to move to make the smell stronger.

Description

See inside and note that the distance formula for the Cartesian plane, D = √(x2–x1)^2 + (y2–y1)^2, is the only computational step in the code.

Project Details

Project ID16266075
CreatedJanuary 7, 2014
Last ModifiedJanuary 21, 2014
SharedJanuary 7, 2014
Visibilityvisible
CommentsAllowed