ScratchData LogoScratchData
Back to AlSweigart's profile

Line Following Algorithm

ALAlSweigart•Created September 9, 2022
Line Following Algorithm
49
49
1540 views
View on Scratch

Instructions

Click the green flag. Then draw a red line by dragging the mouse around the stage. You can move the beetle to the start of the line with the arrow keys. Put the red line in between the beetle's yellow antenna. Press space to start autopilot mode and have the beetle follow the red line. Notice that if you make the curve too sharp or crossing over itself, the beetle's algorithm doesn't work.

Description

I've update this so that you can see the turning animation easier.

Project Details

Project ID730047701
CreatedSeptember 9, 2022
Last ModifiedDecember 30, 2023
SharedSeptember 9, 2022
Visibilityvisible
CommentsAllowed