98
Session Outline: Oct. 14, 2017 Coding for the Love of Mathematics Richard A. Clausi 17/10/2017 Slides (c) 2017 Richard A. Clausi 1 **cartoon IMAGES are courtesy of New Vision Technologies Task Force ClipArt © 1995 (wannapik.com) Other images are acknowledged in the Resource list and in context.

Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Session Outline: Oct. 14, 2017Coding for the Love of Mathematics

Richard A. Clausi 

17/10/2017 Slides (c) 2017 Richard A. Clausi 1

**cartoon  IMAGES are courtesy of New Vision Technologies Task Force ClipArt © 1995 (wannapik.com) Other images are acknowledged in the Resource list and in context.

Page 2: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Session 3 • Title: Coding, For the Love of Mathematics

Presenter: Richard Clausi, OCT – Elmira District S.S. (retired 2012)• Currently: Instructor, EU420D, Faculty of Education, Wilfrid Laurier University• :  Owner, RC Software and Data (registered 1981)• Slides will be available at: http://www.kw.igs.net/~raclausi/coding.pdf

Session Description: Coding, a new player in the elementary school curriculum, offers teachers and students a new way to explore mathematics. This session is a light overview of entry‐level programming (code.org, scratch and LOGO) as a way to engage and nurture mathematical thinking. This new tool for problem solving allows us to use simple programming to understand and apply “tough” concepts such as recursion, modularity and multi‐tasking to ARDUINO programming and Mouse Mazes, calculating TT, Newton’s Method for Square Roots, Fractals and Mandelbrot Set. • I hope that you will leave with inspiration and ideas that you can use to explore 

your own personal mathematical adventures.

• ** This slide will be the last slide in my presentation so you can copy down the web address, later,  if you wish.

17/10/2017 Slides (c) 2017 Richard A. Clausi 2

Page 3: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Warnings…

• An intelligent, silicon‐based life‐form…..

• And of Websites that evaporate…

17/10/2017 Slides (c) 2017 Richard A. Clausi 3

Page 4: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

A code….

“In a code, a word or phrase is replaced with a word, number or symbol. For example, secret agents have codenames, words that are used instead of their real names in order to mask their identities. Similarly, the phrase ‘Attack at Dawn’ could be replaced by the codeword ‘Jupiter’ and this word would be sent to the commander in the field” from: 

The Code Book by Simon Singh, page xvi ISBN 0‐385‐49532‐317/10/2017 Slides (c) 2017 Richard A. Clausi 4

Page 5: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

17/10/2017 Slides (c) 2017 Richard A. Clausi 5

Page 6: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• From a fund‐raising letter,  June 2017:

• Richard. Look at this:• You're looking at the Pong inspired game that Justin Trudeau created at Code.org's 

"Hour of Code" event back in December. Built using a beginner‐friendly block based approach, this technique is commonly used to teach new programmers (youth and university students alike) how to write code.

• It may look simple, but the reality is that, by 2021, the Information and Communications Technology Council forecasts that over 200,000 digital jobs could go unfilled by Canadian talent – and that's something we need to fix, because the global economy is becoming increasingly digital. 

• From buying groceries, and managing our kid's sports teams, to the computer programs and technology used in workplaces across Canada, more and more aspects of our lives are touched by technology on a daily basis. 

• It is important that Canadians of all walks of life have the skills needed to navigate this new economy, so they are prepared for the jobs of today, and tomorrow.

17/10/2017 Slides (c) 2017 Richard A. Clausi 6

Page 7: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Session Description: 

Coding, a new player in the elementary school curriculum, offers teachers and students a new way to explore mathematics. This session is a light overview of entry‐level programmingcode.orgOrhttp://code.org

Scratch and LOGOas a way to engage and nurture mathematical thinking. 

• So, let us start with code.org and the “Hour of Code”• ( that is, just tap on the code.org address, above)

17/10/2017 Slides (c) 2017 Richard A. Clausi 7

Page 8: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• https://studio.code.org/projects/playlab/G4by28DEj‐Yqhe_Z06tSU1aOZU5NjeVsN4‐EDNX7FNc/view

17/10/2017 Slides (c) 2017 Richard A. Clausi 8

Page 9: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• What about “Scratch”?

17/10/2017 Slides (c) 2017 Richard A. Clausi 9

Page 10: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Getting‐Started‐Guide‐Scratch2.pdf

• http://scratch.mit.edu

Address:• http://scratch.mit.edu 

17/10/2017 Slides (c) 2017 Richard A. Clausi 10

Page 11: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Getting in the mood…..

17/10/2017 Slides (c) 2017 Richard A. Clausi 11

Page 12: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

The Beaver Computer Contest for grades 7,8,9,10 sponsored byUniversity of Waterloo, CEMC

http://www.cemc.uwaterloo.ca/contests/bcc.html

17/10/2017 Slides (c) 2017 Richard A. Clausi 12

Page 13: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Frog JumpA frog gets exercise by jumping around a pond. It jumps from lily pad to lily pad in the sequence shown in the picture below. It starts at the lily pad labelled S. It ends on the lily pad as shown (i.e., the frog shown has finished jumping). Each black dot marks a lily pad on which the frog has landed.The legend below labels each of the 8 possible directions of a jump with an integer from 0 to 7.

Which sequence describes the frog's path? 

17/10/2017 Slides (c) 2017 Richard A. Clausi 13

Page 14: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Samplers....

http://www.cemc.uwaterloo.ca/contests/computing/bcc_sample_problems/frogjump.html

17/10/2017 Slides (c) 2017 Richard A. Clausi 14

Page 15: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• The thinking is “algorithmic” and “sequence” thinking… Like creating a recipe that a mindless (??) machine can follow.

• PS: This aligns nicely with the problem‐solving frame of mind we want students to acquire.

17/10/2017 Slides (c) 2017 Richard A. Clausi 15

Page 16: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• This session is a light overview of • entry‐level programming (code.org, scratch and LOGO) • as a way to engage and nurture mathematical thinking. 

• This new tool for problem solving allows us to use simple programming to understand and apply “tough” concepts such as recursion, modularity and

• multi‐tasking to ARDUINO programming and Mouse Mazes, • calculating TT, Newton’s Method for Square Roots, Fractals and Mandelbrot Set

17/10/2017 Slides (c) 2017 Richard A. Clausi 16

Page 17: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• http://www.alexshen.ca/maze‐bot/

17/10/2017 Slides (c) 2017 Richard A. Clausi 17

This web access is courtesy of Alex Shen, a finalist in the Canadian Competition Contest Round 2, May 2017

Page 18: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

17/10/2017 Slides (c) 2017 Richard A. Clausi 18

Page 19: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Putin reveals fears that robots with artificial intelligence will one day 'eat us' and asks head of Russia's largest tech firm how soon it will happen

• Russian president was speaking to Arkady Volozh, chief of internet firm Yandex• He baffled Volozh by asking how long it will be till artificial intelligence 'eats us'• Volozh said he hopes 'never' and sounded optimistic note but Putin unconvinced• Earlier this month, Putin said whoever becomes master of AI will rule the world• By Iain Burns For Mailonline• PUBLISHED: 09:12 BST, 22 September 2017 | UPDATED: 11:40 BST, 22 September 

2017

• From the Daily Mail, UK• The Russian president was speaking to Arkady Volozh, chief of internet firm Yandex, during a tour at the company's Moscow 

HQ. It comes after Putin said whoever masters AI will rule the world. •

http://www.dailymail.co.uk/news/article‐4909172/Putin‐reveals‐fears‐robots‐one‐day‐eat‐us.html

17/10/2017 Slides (c) 2017 Richard A. Clausi 19

Page 20: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Milton Bradley was cranking out the electronic toys in the late 70s and Big Trak hit the shelves in early 1979. This was the latest and most advanced toy ever released in mass to date and it was an instant hit.  You could enter up to 99 commands ranging from simple movements like forward, back, turn left, turn right to more complicated things like a kind of "stealth mode" where it would delay commands, fire it's weapons or navigate an obstacle avoidance.

2017/10/2017 Slides (c) 2017 Richard A. Clausi

Page 21: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Approx. 2 feet long…$60

2117/10/2017 Slides (c) 2017 Richard A. Clausi

Source: Wikipedia

Page 22: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

17/10/2017 Slides (c) 2017 Richard A. Clausi 22

Page 23: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

2317/10/2017 Slides (c) 2017 Richard A. Clausi

Page 24: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

17/10/2017 Slides (c) 2017 Richard A. Clausi 24

Page 25: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

17/10/2017 Slides (c) 2017 Richard A. Clausi 25

Page 26: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Arduino– Physical Computing

• “Tinkering is what happens when you try something you don’t quite know how to do, guided by whim, imagination and curiousity. When you tinker, there are no instructions‐but there are also no failures, no right or wrong ways of doing things. It’s about figuring out how things work and reworking them.”

(Getting Started with Arduino, Massimo Banzi, preface: vi)

2617/10/2017 Slides (c) 2017 Richard A. Clausi

Page 27: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• // provided ARDUINO sample program from the downloadabe and free  IDE

• /*• Blink• Turns on an LED on for one second, then off for one second, repeatedly.•• This example code is in the public domain.• */•• // Pin 13 has an LED connected on most Arduino boards.• // give it a name:• int led = 13;

• // the setup routine runs once when you press reset:• void setup() {                • // initialize the digital pin as an output.• pinMode(led, OUTPUT);     • }

• // the loop routine runs over and over again forever:• void loop() {• digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)• delay(1000);               // wait for a second• digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW• delay(1000);               // wait for a second• }

17/10/2017 Slides (c) 2017 Richard A. Clausi 27

Page 28: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Other possibilities (to Google)…

• These are very powerful, hands‐on platforms:• Raspberry Pi

• Parallax Propeller (especially neat with 8 parallel cores running in tandem… multi‐processing and parallel processing)

• Beaglebone Black 

17/10/2017 Slides (c) 2017 Richard A. Clausi 28

Page 29: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

•Session Description: Coding, a new player in the elementary school curriculum, offers teachers and students a new way to explore mathematics. This session is a light overview of entry‐level programming (code.org, scratch

• and LOGO) • as a way to engage and nurture mathematical thinking. This new tool for problem 

solving allows us to use simple programming to understand and apply• “tough” concepts such as recursion, modularity and multi‐tasking • to ARDUINO programming and Mouse Mazes, calculating TT, Newton’s Method for 

Square Roots, Fractals and Mandelbrot Set

17/10/2017 Slides (c) 2017 Richard A. Clausi 29

Page 30: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

3017/10/2017 Slides (c) 2017 Richard A. Clausi

Page 31: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• LOGO is a philosophy of education.

• It embodies the insights of Jean Piaget andSeymour Papert.

3117/10/2017 Slides (c) 2017 Richard A. Clausi

Page 32: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Logo from WikipediaPapert used Piaget's work in his development of the Logo programming language while at MIT. He created Logo as a tool to improve the way children think and solve problems. A small mobile robot called the "Logo Turtle" was developed, and children were shown how to use it to solve simple problems in an environment of play. 

3217/10/2017 Slides (c) 2017 Richard A. Clausi

Page 33: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

3317/10/2017 Slides (c) 2017 Richard A. Clausi

Page 34: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Jean Piaget: born 1896

• He theorized that intelligence is a form of evolutionary adaptation‐ humans adapt to their environment through strategies that he called assimilation and accommodation.

• Children actively construct knowledge as they explore and manipulate the world around them.

3417/10/2017 Slides (c) 2017 Richard A. Clausi

Page 35: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Seymour Aubrey Papert (February 29, 1928 â€“ July 31, 2016) was a South African‐born American mathematician, computer scientist, and educator, who spent most of his career teaching and researching at MIT.

• He was one of the pioneers of artificial intelligence, and of the constructionist movement in education.

• He was co‐inventor, with Wally Feurzeig, of the Logo programming language.

17/10/2017 Slides (c) 2017 Richard A. Clausi 35

Source: Wikipedia

Page 36: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Seymour Papert (1928‐2016)

• Using computers,students can explore and assimilate/personalize their environment. 

• Papert uses the image of a “Mathland” where mathematics becomes a natural vocabulary to develop Turtle Geometry: A Mathematics made for Learning (Mindstorms: chapter 3)

3617/10/2017 Slides (c) 2017 Richard A. Clausi

Page 37: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Constructionism (learning theory) Seymour Papert         From Wikipedia, the free encyclopedia

• Constructionist learning is inspired by the constructivist theory that individual learners construct mental models in order to understand the world around them. 

• Papert's ideas became well known through the publication of his seminal book Mindstorms: Children, Computers, and Powerful Ideas (Basic Books, 1980).

• Papert described children creating programs in the Logo educational programming language. He likened their learning to living in a "mathland" where learning mathematical ideas is as natural as learning French while living in France.[

3717/10/2017 Slides (c) 2017 Richard A. Clausi

Page 38: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Euclid’s geometry is a logical style

• Descartes’ is an algebraic style.

• Turtle geometry is a computational style.( from MindStorms page 55)

3817/10/2017 Slides (c) 2017 Richard A. Clausi

Page 39: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Let us look at  a few examples:• NOTE: sample source code is included in the resources section of this slide set;

• but,  the compiled programs are not included in the package.

17/10/2017 Slides (c) 2017 Richard A. Clausi 39

Page 40: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• MSWLogo2\logo32.exe

17/10/2017 Slides (c) 2017 Richard A. Clausi 40

Page 41: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Running MSWlogo

• Running the Program: you need to download a copy of the program ‐> ie MSWLOGO

• Recall The Demo: • The Square Spin, The triangle,  Procedures,• Recursion, Multi‐tasking, Use of Parameters• Fractals: a shape recursively similar to itself• PS: Several versions of the LOGO program are referenced in the Resources list at the end.

4117/10/2017 Slides (c) 2017 Richard A. Clausi

Page 42: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

4217/10/2017 Slides (c) 2017 Richard A. Clausi

Page 43: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Things to remember….• The Essentials of Recursion:• ‐it “calls” itself or repeats itself• ‐it changes something along the way• ‐it knows when to stop

• Modules tackle each building block of the problem

• Multi‐taskingmeans many processes are at work at once or they run in parallel

17/10/2017 Slides (c) 2017 Richard A. Clausi 43

Page 44: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

A drawing exercise for pupils….

• Draw an equilateral triangle.• Build an equilateral triangle on the middle third of each side.

• Repeat infinitely……

• What do you get…?????

4417/10/2017 Slides (c) 2017 Richard A. Clausi

Images Courtesy of Wikipedia

Page 45: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

4517/10/2017 Slides (c) 2017 Richard A. Clausi

Page 46: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

The Koch Snowflake

46

This is a Fractal– a shape that is self‐similar at every level.

17/10/2017 Slides (c) 2017 Richard A. Clausi

Page 47: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

47

• A fractal is an object or quantity that displays self‐similarity, in a somewhat technical sense, on all scales. 

17/10/2017 Slides (c) 2017 Richard A. Clausi

Page 48: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• A fractal is an object or quantity that displays self‐similarity, in a somewhat technical sense, on all scales. The object need not exhibit exactly the same structure at all scales, but the same "type" of structures must appear on all scales.

• The prototypical example for a fractal is the length of a coastline measured with different length rulers. The shorter the ruler, the longer the length measured, a paradox known as the coastline paradox.

4817/10/2017 Slides (c) 2017 Richard A. Clausi

Page 49: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Illustrated  are the fractals known as the Gosper island, Koch snowflake, box fractal, Sierpinski sieve/gasket,Barnsley's fern, and Mandelbrot set.

4917/10/2017 Slides (c) 2017 Richard A. Clausi

Page 50: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Each “ornament” is similar to the larger shape it is a part of.

5017/10/2017 Slides (c) 2017 Richard A. Clausi

Page 51: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

The Gosper island (Mandelbrot 1977), also known as a flowsnake (Gardner 1989, p. 41), is a fractal that is modification of the Koch snowflake. The term "Gosper island" was used by Mandelbrot (1977) because this curve bounds the space filled by the Peano‐Gospercurve. 

5117/10/2017 Slides (c) 2017 Richard A. Clausi

Page 52: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Worth pinning up….

• Math Mandelbrot pin‐up Calendars!!!!!

( see 1991 Fractals Calendar R.F. Voss—June)

5217/10/2017 Slides (c) 2017 Richard A. Clausi

Page 53: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

5317/10/2017 Slides (c) 2017 Richard A. Clausi

Page 54: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

5417/10/2017 Slides (c) 2017 Richard A. Clausi

Page 55: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

5517/10/2017 Slides (c) 2017 Richard A. Clausi

Page 56: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Code snippets are attached at the end of this slide sequence for your reference.

17/10/2017 Slides (c) 2017 Richard A. Clausi 56

Page 57: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Session Description: Coding, a new player in the elementary school curriculum, offers teachers and students a new way to explore mathematics. This session is a light overview 

• of entry‐level programming (code.org, scratch and LOGO) as a way to engage and nurture mathematical thinking. This new tool for problem solving allows us to use simple programming to understand and apply “tough” concepts such as recursion, modularity and multi‐tasking to ARDUINO programming and Mouse Mazes, 

• calculating TT, • Newton’s Method for Square Roots,• Fractals and• Mandelbrot Set

17/10/2017 Slides (c) 2017 Richard A. Clausi 57

Page 58: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Stephan Hawking• “No matter how many times the results of experiments agree with some theory, you can never be sure that the next time the result will not contradict the theory. On the other hand, you can disprove a theory by finding even a single observation that disagrees with the predictions of the theory”*

* Hawking, Stephan  ,”A Brief History of Time”, Updated and Expanded Tenth Anniversary Ed.   (ISBN: 0‐553‐10953‐7) page 1017/10/2017 Slides (c) 2017 Richard A. Clausi 58

Page 59: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• You cannot prove a rule by example; however, you can disprove it with a counter example.

• That means that interation through many numeric examples, no matter how many, cannot “prove” anything, but it may provide an insight or starting point for investigation.

17/10/2017 Slides (c) 2017 Richard A. Clausi 59

Page 60: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Mathematics is our way of “touching”  the Universe ‐‐ attempting to understand who “we” are!      Are we Unique among the species?

17/10/2017 Slides (c) 2017 Richard A. Clausi 60

Source: Wonderful World of Mathematics: Hogben, Lancelot

Page 61: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Imagine the awe of looking into the sky and seeing the sun and the moon

17/10/2017 Slides (c) 2017 Richard A. Clausi 61

Source: Wonderful World of Mathematics: Hogben, Lancelot

Page 62: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• This book is out of print, dated 1957, but it is still a great way to appreciate the development of Mathematics to the twentieth century… Ideal for elementary students…Get it here… accurate to 1957!!!!!!!

• Wonderful World of Mathematics: Hogben, Lancelot. Read online or purchase (62 pages) https: //www.scribd.com/doc/249657660/Lancelot‐Hogben‐The‐Wonderful‐World‐of‐Mathematics‐1955

• Also consider this related great resource:  Mathematics for the Million by Lancelot Hogben for a more advanced examination of Mathematics from its’ beginnings to the (almost) present. This is appropriate to secondary school and beyond.

17/10/2017 Slides (c) 2017 Richard A. Clausi 62

Page 63: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• And recording “stuff” by counting … with stones, sticks, a counting stick with notches, a number line….

• PS: the number line is a “model” for the continuity of numbers and is meant to be a visual representation… it does not “exist” and it has gaps and inconsistencies in it..

• Perhaps, we are on the wrong track???

17/10/2017 Slides (c) 2017 Richard A. Clausi 63

Page 64: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Progress is driven by curiousity

17/10/2017 Slides (c) 2017 Richard A. Clausi 64

Source: Wonderful World of Mathematics: Hogben, Lancelot

Page 65: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Where is the zero…?

17/10/2017 Slides (c) 2017 Richard A. Clausi 65

Page 66: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Enigma Encryption Machine                                 Lorentz Encryption Machine

17/10/2017 Slides (c) 2017 Richard A. Clausi 66

Source: Wikipedia

Page 67: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Programming arithmetic to explore and gain insights…….

17/10/2017 Slides (c) 2017 Richard A. Clausi 67

Page 68: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Calculation of TT using …..

17/10/2017 Slides (c) 2017 Richard A. Clausi 68

Page 69: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• PIE.exe

17/10/2017 Slides (c) 2017 Richard A. Clausi 69

Page 70: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

“Numeric Fractals” by Iteration….

2  x  =   2  x

7017/10/2017 Slides (c) 2017 Richard A. Clausi

Page 71: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Newton’s Method for the calculation of Square Roots

7117/10/2017 Slides (c) 2017 Richard A. Clausi

Page 72: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

17/10/2017 Slides (c) 2017 Richard A. Clausi 72

Page 73: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Running  newton.bas under Watcom Basic (wbas)that is, back to 1984…. 

• DOS\DOSBox‐0.74\DOSBox.exe

Under this “DOS” emulator, you need to Mount c:  g:\dosC:Cd dosWbas newton.bas

17/10/2017 Slides (c) 2017 Richard A. Clausi 73

Page 74: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Here is a bare‐bones version of the Newton program written for Watcom Basic. Surprisingly, it even converges to the correct answer if you guess ZERO as your bad guess for the square root of 25 

10 input "your number ", sq20 input "your first bad guess ",g30 35 loop 40 newguess = .5 *( sq / g + g )45 print newguess50    if (newguess = g ) then stop 55 g = newguess60 endloop

17/10/2017 Slides (c) 2017 Richard A. Clausi 74

Page 75: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• How about

• 2• X        +       1    =    0

• Or……..

17/10/2017 Slides (c) 2017 Richard A. Clausi 75

Page 76: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

..on an imaginery grid with coordinates (x,y)

• The Argand Plane  with a Real Axis (x) and an  Imaginery Axis (y)

7617/10/2017 Slides (c) 2017 Richard A. Clausi

Page 77: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Can we add, subtract and multiply complex numbers……

• ‐collect like terms ?• ‐just use F O I L ?

17/10/2017 Slides (c) 2017 Richard A. Clausi 77

Page 78: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Let’s check in on our running mandel3.basand, look, it is still working hard and slow!!

17/10/2017 Slides (c) 2017 Richard A. Clausi 78

Page 79: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Executing mandel1.c 

• See Sample program  mandel1.c

• Input coordinates (‐2, 2)   ;that is,The complex number,

‐2 + 2 I

P.S. for coders‐ you will have to add your own video calls to plot the point in the sample code

7917/10/2017 Slides (c) 2017 Richard A. Clausi

Page 80: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

This program is compiled in C++

• mandelcpp.exe

Page 81: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

A challenge: Translate it to LOGO

• The key elements in the calculation are:

• 2          2X     ‐ Z

2          2

And   2 X Y  giving coordinates (x – z,   2xy)A keen student could program this into LOGO!PS: Research continues on the Mandelbrot Set

8117/10/2017 Slides (c) 2017 Richard A. Clausi

Page 82: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• FIRST, a reminder of what we have looked at today…….

• Title: Coding, For the Love of Mathematics•

Slides for this talk and with additional pages of reference resources are at: http://www.kw.igs.net/~raclausi/coding.pdf

Session Description: Coding, a new player in the elementary school curriculum, offers teachers and students a new way to explore mathematics. This session is a light overview of entry‐level programming (code.org, scratch and LOGO) as a way to engage and nurture mathematical thinking. This new tool for problem solving allows us to use simple programming to understand and apply “tough” concepts such as recursion, modularity and multi‐tasking to ARDUINO programming and Mouse Mazes, calculating TT, Newton’s Method for Square Roots, Fractals and Mandelbrot Set. 

• I hope that you will leave with inspiration and ideas that you can use to explore your own personal mathematical adventures

• Now…. Here are references and acknowledgements…….

17/10/2017 Slides (c) 2017 Richard A. Clausi 82

Page 83: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Acknowledgements and Resources

17/10/2017 Slides (c) 2017 Richard A. Clausi 83

Page 84: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

LOGO and Seymour Papert• The Children's Machine: Rethinking School In The Age Of The Computer 

Paperback – Seymour Papert Apr 29 1994 A recommended reference for TECs

•• Mindstorms: Children, Computers, And Powerful Ideas Paperback – Aug 4 

1993 by Seymour A. Papert A recommended reference for TECs

• Access MSWlogo for Windows at:http://mswlogo.en.softonic.com/

• Here is a link to download xLOGO for Mac users in the class who can't run MSWlogo: 

• https://sourceforge.net/projects/xlogo/?source=typ_redirect

8417/10/2017 Slides (c) 2017 Richard A. Clausi

Page 85: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

Another version of LOGO

• For more information on Berkeley LOGO go to WIKIPEDIA  and look at UCBlogo

• Or• Google “Berkeley Logo commands”

and watch the videos 

17/10/2017 Slides (c) 2017 Richard A. Clausi 85

Page 86: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• UCBLogo, also known as Berkeley Logo, is closest to a de facto• standard Logo programming language with its facilities for handling• lists, files, I/O, and recursion in scripts,[2] and can be used to teach• most computer science concepts, as UC Berkeley lecturer Brian• Harvey did in his Computer Science Logo Style trilogy.[3] For tertiary• level teaching, however, Logo has been superseded by Scheme, and• scripting languages.

• GUI• UCBLogo has only a rudimentary graphical user interface, so several• projects exist that provide a better interface. MSWLogo and its• successor FMSLogo, for Microsoft Windows, are commonly used in• schools in the United Kingdom and Australia

17/10/2017 Slides (c) 2017 Richard A. Clausi 86

Page 87: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• // originally from pp550 of The Waite Group's Microsoft C               NOTE: video calls are for older DOS  C units and so may not compile under C++• // programming for the PC  ISBN 0‐672‐22738‐X• // by Robert Lafore (SAMS publishing)

/* mandel.c */• /* generates the mandelbrot set */• #include <graph.h>• #define XMAX 1000• #define YMAX 1000• #define MAXCOUNT 16• main ()• {• int x, y;    float xscale, yscale;    float left, top;    float xside, yside;    float zx, zy;    float cx, cy;    float tempx;    int count;

• left = ‐2.0;    printf("\n type in the left value \n");    scanf("%f",&left);

printf("\n type in the top value \n");    scanf("%f",&top);

• xside = 20.0;    yside = ‐20.0;    xscale = xside / XMAX;    yscale = yside / YMAX;• if(_setvideomode(_ERESCOLOR)==0)    { printf ("can't set mode"); exit(1); }• _rectangle(_GBORDER, 0, 0, XMAX+1, YMAX+1);

• for(y=1; y<=YMAX; y++)• {• for(x=1; x<=XMAX; x++)• {• cx = x*xscale+left;        cy = y*yscale+top;        zx = zy = 0;        count = 0;

• while( zx*zx ‐ zy*zy<4 && count<MAXCOUNT )• {• tempx = zx*zx ‐ zy*zy +cx;            zy = 2*zx*zy + cy;            zx = tempx;            count++;• }• if( count <MAXCOUNT )

• {                _setcolor(count);                _setpixel(x, y);                }          ; THIS IS THE CALL TO TURN ON THE POINT (X,Y) WITH COLOUR COUNT• if( kbhit() )                break;• }• }• getche();• _setvideomode(_DEFAULTMODE);}

87

Sample C Code for WATCOM 10.0 

17/10/2017 Slides (c) 2017 Richard A. Clausi

Page 88: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• 10   REM Mandelbrot Program  IN QBASIC….• 20   SIDE = 3• 30   ACORNER = ‐2• 40   BCORNER = 2• 60   REM INITIALIZE THE SCREEN• 70   SCREEN 1• 80   COLOR 0, 0• 100  DELTAY = SIDE / 200• 110  DELTAX = SIDE / 240

• 120  REM SCANNING ROUTINE• 130  FOR M = 1 TO 200• 140    FOR N = 1 TO 320• 150       AC = (N * DELTAX) + ACORNER• 160       BC = ‐(M * DELTAY) + BCORNER• 170       COUNT = ‐1• 180       WHILE SIZESQ < 4 AND COUNT < 100• 190                               AX = AZ ^ 2 ‐ BZ ^ 2 + AC• 200                                BX = 2 * AZ * BZ + BC• 210                                           AZ = AX• 220                                           BZ = BX• 230           REM FINDS Z^2• 240                                             SIZESQ = AX ^ 2 + BX ^ 2• 250           COUNT = COUNT + 1• 260        WEND• 280        REM ASSIGN COLOR CYCLE• 290        IF COUNT < 64 THEN V = 0• 300        IF COUNT < 32 THEN V = 1• 310        IF COUNT < 16 THEN V = 2• 320        IF COUNT < 8 THEN V = 3• 330        IF COUNT < 4 THEN V = 4• 340        IF COUNT < 3 THEN V = 1• 350        IF COUNT < 2 THEN V = 2• 360        IF COUNT = 1 THEN V = 3• 390        IF SIZESQ >= 4 THEN PSET (N, M), V• 400        AZ = 0• 410        BZ = 0• 420        ZZ$ = INKEY$• 430        REM CHECK FOR THE QUIT SIGNAL• 440        IF ZZ$ = "Q$" OR ZZ$ = "q" THEN END• 460        AC = 0• 470        BC = 0• 480        SIZESQ = 0• 490      NEXT• 500    NEXT• 510    REM THE PLOT IS FINISHED• 520    LOCATE 1, 1, 1• 530    END

8817/10/2017 Slides (c) 2017 Richard A. Clausi

This program is written for Qbasic. While it may not run on your computer, the code is easy enough to follow so you can adapt it to your machine or language.

Page 89: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• // CALCULATION OF TT  USING TT/4 =  1‐1/3+1/5‐1/7+1/9 … using C++• #include <stdio.h>• #include <time.h>• #include <dos.h>• #include <math.h>

• double  TT,n,p,sub,term;

• main()• {

• long int tim=0;

• n=1.0;• p= 1.0;• TT=0;• sub=0.0;• term=1/n;• // generate each term and put it in the subtotal x 4• while (1)• {• sub = sub + (1.0/n)*p;• TT=4*(sub);• printf("\n RC: shhhhh I am calculating TT=   %19.16f  using Gregory's method.",TT);• // update sign and denominators• p=p*(‐1);   n+=2;• // Slow down the display by counting to 2 million• while(tim++   <20000000); tim=0;• };

• }

17/10/2017 Slides (c) 2017 Richard A. Clausi 89

Here is a TT program with a delay in the loop so you can watch the values as they struggle to emerge. Note: each additional fraction is so small as to not affect earlier digits, and it takes 10 times as much effort to stabilize each succeeding decimal place. COOL!

Page 90: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• LOGO SNIPPETS of  CODE:      01square.lgo  will draw a square with sides that grow and rotate•• to aaa• ! this is a test• end• ===================================• to square :side• repeat 4 [fd :side rt 90]•• rt 10• if :side > 500 [stop]• square :side + 1• end•• 02triang.lgo will draw a triangle with side  angle  a twist and an ang3•• to triangular :side :angle :twist :ang3•• ht• cs• fd :side• rt 180 ‐ :angle•• fd :side• rt 180 ‐ :twist•• fd :side•• end

17/10/2017 Slides (c) 2017 Richard A. Clausi 90

Here are samples of LOGO code that you can use to build your own program and explore.

Page 91: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• 03spiral.lgo  with do a spiral •• to spiral :num :side :angle :twist :count• repeat :num [fd :side rt :angle]• rt :twist• if :count >100 [stop]• spiral :num :side :angle :twist :count + 1•• end•• 06recur01.lgo will demonstrate recursion• to recur :side• repeat 4[fd :side rt 90]• rt 2• recur :side + 1•• end••• 08recustop• to pass2 :side :angle• ht• repeat 4 [fd :side rt :angle]• repeat 10000[ rt 360]• if :side >100 [stop]• pass2 :side + 10 :angle• end•• to passage :side :angle• ht• repeat 4 [fd :side rt :angle]• repeat 10000[ rt 360]• passage :side + 10 :angle• end

17/10/2017 Slides (c) 2017 Richard A. Clausi 91

Page 92: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• 10waiter01.lgo will demonstrate  multitask•• to aa• ; set resolution to zoom out• ; run waiter to see multitasks• end•• to multitask•• setturtle 1• setpc 3• fd 100•• setturtle 2• setpc 5• fd 50•• setturtle 3• setpc 6• fd 60•• setturtle 1• rt 90•• setturtle 2• rt 120•• setturtle 3• rt 60•• setturtle 1• rt 2•• setturtle 2• rt 5•• setturtle 3• rt 10•• slowmedown• multitask• end17/10/2017 Slides (c) 2017 Richard A. Clausi 92

Page 93: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• to slowmedown• repeat 5000 [st ht]• end•• to waiter• cs• setturtle 1• setpc 3• pu• fd 100• pd• ht•• setturtle 2• setpc 5• pu• bk 100• pd• ht•• setturtle 3• setpc 6• pu• bk 100• rt 90• fd 100• pd• ht••• multitask• end

17/10/2017 Slides (c) 2017 Richard A. Clausi 93

Page 94: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• 12sierpi.lgo  demonstrates the  sierpinski………………………..•• to push• ; try push followed by• ; sierpinski 25 then 50, 100, 200 800• cs• pu• bk 300• rt 90• bk 400• lt 90• pd• end•• to sierpinski :size• if :size < 10 [stop]• repeat 3 [ sierpinski :size / 2• fd :size• rt 120• ]• End••• 14sieslow.lgo•• to push• ; try push followed by• ; sierpinski 25 then 50, 100, 200 800• cs• pu• bk 300• rt 90• bk 400• lt 90• pd• end•• to sierpinski :size• if :size < 10 [stop]• repeat 3 [ sierpinski :size / 2• fd :size• rt 120•• repeat 1000 [st ht ]• ]• End

17/10/2017 Slides (c) 2017 Richard A. Clausi 94

Page 95: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• 16face01.lgo    DRAW a face to demonstrate modules•• to aface• head• eyes• nose• mouth• cigar• end•• to cigar• pu• bk 20• rt 90• fd 20• rt 90• pd• fd 30• lt 90• fd 20• lt 90• fd 30• bk 20• lt 90• fd 20• end•• to eyes• ETC.   To complete the eyes, nose, mouth etc.

17/10/2017 Slides (c) 2017 Richard A. Clausi 95

Page 96: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• 20arith01.lgo  demonstrates arithmetic•• to assign• Make "foo [hello]• show :foo• make "x 3+4*2• show :x•• end•• to darith :x :y• repeat 4 [ make "x :x + :y]• show :x• end

17/10/2017 Slides (c) 2017 Richard A. Clausi 96

LOGO is built on other powerful languages such as LISP. LOGO can do arithmetic and list processing as well as graphics. FUN!!!!

Page 97: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• "Education provides one of the greatest hopes for repairing cultural attitudes, redressing the legacy of Indian Residential Schools, and advancing the process of reconciliation." –Senator Murray Sinclair, Chair of the Truth and Reconciliation Commission of Canada

• ”Those who do not remember historyare condemned to repeat it”‐George Santayama, American Philosopher and Poet

17/10/2017 Slides (c) 2017 Richard A. Clausi 97

Page 98: Session Outline: Oct. 14, 2017 for the of Richard A. Clausi€¦ · • // provided ARDUINO sample program from the downloadabe and free IDE • /* • Blink • Turns on an LED on

• Session 3 • Title: Coding, For the Love of Mathematics•

Slides for this talk and with additional pages of reference resources are at: http://www.kw.igs.net/~raclausi/coding.pdf

Session Description: Coding, a new player in the elementary school curriculum, offers teachers and students a new way to explore mathematics. This session is a light overview of entry‐level programming (code.org, scratch and LOGO) as a way to engage and nurture mathematical thinking. This new tool for problem solving allows us to use simple programming to understand and apply “tough” concepts such as recursion, modularity and multi‐tasking to ARDUINO programming and Mouse Mazes, calculating TT, Newton’s Method for Square Roots, Fractals and Mandelbrot Set. 

• I hope that you will leave with inspiration and ideas that you can use to explore your own personal mathematical adventures.

• ** This slide is the last slide in my presentation so you can copy down the web address. The Additional slides in my web site contain additional Resource slides. 

17/10/2017 Slides (c) 2017 Richard A. Clausi 98