Logo or turtle drawing: Difference between revisions

From wikiluntti
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
=== Aim ===
=== Aim ===


Geometrical shapes, diameter of the circle, basic programming.
Geometrical shapes, diameter of the circle, basic programming. Proportionality.


Center of gravity, steering.
Center of gravity, steering.
Line 25: Line 25:
The Asimov 2/ Verne robot travels <math>2\pi 57</math> mm <math>358</math> mm on one full turn, as the diameter of the wheel is <math>57</math> mm. First design the plotting on a paper (or using computer, eg. [http://www.inkscape.org Inkscape] is a good program) and then convert the distances to rotations.  
The Asimov 2/ Verne robot travels <math>2\pi 57</math> mm <math>358</math> mm on one full turn, as the diameter of the wheel is <math>57</math> mm. First design the plotting on a paper (or using computer, eg. [http://www.inkscape.org Inkscape] is a good program) and then convert the distances to rotations.  


Usually it is easier to code if the speed is lower. Use only speed 10 or 15. The Asimov/ Verne 2 robot turns exactly (about) 90 degrees when XXXXX
Usually it is easier to code if the speed is lower. Use only speed 10 or 15. The Asimov/ Verne 2 robot turns exactly (about) 90 degrees when <code>Steering=100</code>, <code>Power=10</code>, <code>Angle=??</code> and <code>Brake=True</code>.
 
 


== Example Code ==
== Example Code ==
Line 33: Line 31:
== Exercises ==
== Exercises ==


* Draw a square.
* Draw a rectangle with distances 20 cm and 30 cm.
* Draw a house.
* Draw a house.
* Draw a giraffe.
* Draw a giraffe.

Latest revision as of 19:38, 25 October 2020

Introduction

Drawing on a large paper using a robot is funny and involving. Use a large paper and try to stay on the paper. Logo programming is oldie but goodie.

Aim

Geometrical shapes, diameter of the circle, basic programming. Proportionality.

Center of gravity, steering.

Robot

Almost any robot will do. We use Asimov 2/ Verne robot with a pen attached to the front part of the robot.

Sensors

No sensors is used, except the servo motor.

Example Video

Theory

The distance travelled by a rotating wheel is .

The Asimov 2/ Verne robot travels mm mm on one full turn, as the diameter of the wheel is mm. First design the plotting on a paper (or using computer, eg. Inkscape is a good program) and then convert the distances to rotations.

Usually it is easier to code if the speed is lower. Use only speed 10 or 15. The Asimov/ Verne 2 robot turns exactly (about) 90 degrees when Steering=100, Power=10, Angle=?? and Brake=True.

Example Code

Exercises

  • Draw a rectangle with distances 20 cm and 30 cm.
  • Draw a house.
  • Draw a giraffe.
  • Note that the pen draws a wrong line when the robot rotates. How fix to that?
  • Try to implement gyroscope to better stay in the given direction.


Back to Mahtavaa Matematiikkaa 2020