Fractal. Fractals. L- Systems 1/17/12

Similar documents
1 Turtle Graphics Concepts

Recursion with Turtles

Python 3 Turtle graphics. Lecture 24 COMPSCI111/111G SS 2017

In this project you will use loops to create a racing turtle game and draw a race track.

Writing Simple Procedures Drawing a Pentagon Copying a Procedure Commanding PenUp and PenDown Drawing a Broken Line...

Code, Draw, and 3D-Print with Turtle Tina

Package TurtleGraphics

PYTHON FOR KIDS A Pl ayfu l I ntrodu ctio n to Prog r am m i ng J a s o n R. B r i g g s

Turtle Ballet: Simulating Parallel Turtles in a Nonparallel LOGO Version. Erich Neuwirth

StarLogo Complete Command List (Edited and reformatted by Nicholas Gessler, 6 June 2001.)

Lecture 1: Turtle Graphics. the turtle and the crane and the swallow observe the time of their coming; Jeremiah 8:7

Recursion with Turtles

A Guide to the TurtleGraphics Package for R

CS108L Computer Science for All Module 7: Algorithms

Lab 5: Bumper Turtles

Reference Guide Playful Invention Company

The City School. Learn Create Program

COYOTES and FOXES. Final Report. - Chantilly Fulgham, - Gracie Sanchez,

Half-Lives of Antibiotics

Do the traits of organisms provide evidence for evolution?

Lab 7: Experimenting with Life and Death

Scratch. To do this, you re going to need to have Scratch!

Lab 10: Color Sort Turtles not yet sorted by color

AKC Rally More Advanced Signs

Finch Robot: snap level 4

Sketch Out the Design

Peace Of Mind. is worth pursuing. Curriculum Overview

Hello Scratch! by Gabriel Ford, Sadie Ford, and Melissa Ford. Sample Chapter 3. Copyright 2018 Manning Publications

6. 1 Leaping Lizards!

5 State of the Turtles

Professional Ultrasonic Dog Whistle Guide

GEOG 490/590 SPATIAL MODELING SPRING 2015 ASSIGNMENT 3: PATTERN-ORIENTED MODELING WITH AGENTS

Coding with Scratch Popping balloons

Finch Robot: snap levels 1-3

The Lost Treasures of Giza

The Cat Sentence-Building Exercise 1

Workbook. Version 3. Created by G. Mullin and D. Carty

Scratch Lesson Plan. Part One: Structure. Part Two: Movement

All Dogs Parkour Exercises (Interactions) updated to October 6, 2018

Grandparents U, 2018 Part 2

Geometry from Scratch

Part One: Introduction to Pedigree teaches students how to use Pedigree tools to create and analyze pedigrees.

mouse shapes F4F79BABB796794A55EFF1B Mouse Shapes 1 / 6

PIGEONETICS LAB PART 1

Welcome to the case study for how I cured my dog s doorbell barking in just 21 days.

Be Doggone Smart at Work

Biology 164 Laboratory

~~~***~~~ A Book For Young Programmers On Scratch. ~~~***~~~

LABRADOR RETRIEVER: LABRADOR RETRIEVER TRAINING - COMPLETE LABRADOR PUPPY TRAINING GUIDE, OBEDIENCE, POTTY TRAINING, AND CARE TIPS (RETRIEV

Econometric Analysis Dr. Sobel

INFO 1103 Homework Project 1

Army Community Recreation Reports Online (ACRRO) 2.0 Bulk Buy Requests Quick Reference Help Guide

Scratch Jigsaw Method Feelings and Variables

The Effect of Phase Shifts in the Day-Night Cycle on Pigeon Homing at Distances of Less than One Mile

Human Genetics: Create-a-Person

HALE SECURITY PET DOOR CAT GUARDIAN patent pending

How to draw. pets & farm animals. with basic shapes!

by Jennifer Oxley and Billy Aronson

Francis City Planning Commission Meeting Thursday May 5, 2016

internet in google, bing, yahoo and other mayor seach engine. This special edition completed with other document such as :

Animal Breeding & Genetics

Grade 5, Prompt for Opinion Writing Common Core Standard W.CCR.1

Competitors Guidelines

Lab 6: Energizer Turtles

The Shape Of My Turkey Packet

Our class had 2 incubators full of eggs. On day 21, our chicks began to hatch. In incubator #1, 1/3 of the eggs hatched. There were 2 chicks.

The DOG Sentence-Building Exercise 1

Sight word flashcards: species, weighs, echoloca6on, danger, camouflage The Reading Race, by Abby Klein Worksheets 17, 17a

B Y D O N A L D M. S I L V E R A N D J. W Y N N E NEW YORK TORONTO LONDON AUCKLAND SYDNEY MEXICO CITY NEW DELHI HONG KONG BUENOS AIRES

Who Wants to Live A Million Years? Objective: Students will learn about the process of natural selection through an online simulation.

CANINE COMPANION Reinforcing Negative Behavior Separation Anxiety

CAT MATH AN INTERMEDIATE LEVEL MATH LESSON ON CAT OVERPOPULATION

TE 408: Three-day Lesson Plan

Scratch Programming Lesson One: Create an Scratch Animation

Eggstravaganza School Pack

Story Points: Estimating Magnitude

Comparing DNA Sequences to Understand Evolutionary Relationships with BLAST

!"#$%&'()*&+,)-,)."#/')!,)0#/') 1/2)3&'45)."#+"/5%&6)7/,-,$,8)9::;:<;<=)>6+#-"?!

Identity Management with Petname Systems. Md. Sadek Ferdous 28th May, 2009

Evolution in Action: Graphing and Statistics

Life Under Your Feet: Field Research on Box Turtles

Section: 101 (2pm-3pm) 102 (3pm-4pm)

Blood Type Pedigree Mystery lab

COMPARING DNA SEQUENCES TO UNDERSTAND EVOLUTIONARY RELATIONSHIPS WITH BLAST

Primary Activity #1. The Story of Noir, the Black-footed Ferret. Description: Procedure:

Adaptations of Turtles Lesson Plan (Level 1 Inquiry Confirmation)

LOOKBOOK SUMMER/FALL Handcrafted goods for dogs and their loving humans

LIVING WITH WOLVES. They are creatures of legend,

Brinton & Fujiki Brigham Young University Social Communication Intervention Script for story book, The Pigeon Finds a Hotdog

Satisfying the Urge to Herd

6Measurement. What you will learn. Australian curriculum. Chapter 6B 6C 6D 6H 6I

LABORATORY EXERCISE 7: CLADISTICS I

Virtual Dog Program in Scratch. By Phil code-it.co.uk

The FCI Initiative for Young Dog Lovers Worldwide. Basic recomendations ORGANIZING YOUTH ACTIVITIES FOR CYNOLOGICAL VENUES.

Training To Help Your Grooming

THE MAINE COON CAT BY LIZA GARDNER WALSH DOWNLOAD EBOOK : THE MAINE COON CAT BY LIZA GARDNER WALSH PDF

Cats: Cat Care- Kitten Care- How To Take Care Of And Train Your Cat Or Kitten PDF

Visual Reward/Correction. Verbal Reward/Correction. Physical Reward/Correction

How to Solve Word Problems

Moving toward formalisation COMP62342

Transcription:

1/17/12 Fractal Fractal refers to objects which appear to be geometrically complex with certain characteris6cs They have a rough or complicated shape They are self- similar at different scales Fractals In other words, they appear just as complex when you zoom in and enlarge your view of them Self- similar means the small parts look like the whole object scaled down Some other commonly cited characteris6cs (there is no clear agreement that these are required to call something a fractal): A brief introduc6on detailed structure appears at arbitrarily small scale It is not easily described with ordinary geometry It is easily described using recursive (self- referen6al) terms It is described mathema6cally with frac6onal dimensions (the concept of a Hausdorff dimension) ~ frac6onal dimension is claimed to be the source of the term fractal in many sources Some objects seem to be easier to describe and understand as fractals than using conven6onal concepts of structure. 87 88 By Jon Sullivan [Public domain], via Wikimedia Commons By Jon Sullivan [Public domain], via Wikimedia Commons 89 By AndreasHeinemann at Zeppelinzentrum Karlsruhe, Germany h`p:// www.rad- zep.de (h`p://www.rad- zep.de) [GFDL (www.gnu.org/copylec/ fdl.html) or CC- BY- SA- 3.0 (www.crea6vecommons.org/licenses/by- sa/3.0/)], via Wikimedia Commons 90 L- Systems By Mark Charles Langdon, Waterloo, Ontario, Canada (Photographed by: Mark Charles Langdon) [CC- BY- 3.0 (www.crea6vecommons.org/licenses/by/ 3.0)], via Wikimedia Commons We will be using Lindenmeyer Systems (L- Systems) to explore some introductory ideas in Fractals Aris%d Lindenmayer (November 17, 1925 October 30, 1989) introduced L- Systems as a way of modelling biological growth L- Systems use groups of symbols (strings) and replacement rules which can be interpreted as (or given meaning as) geometric objects Before we can look at L- Systems, we need to look at Turtle Graphics the graphics used to interpret symbols in L- Systems We ll return to L- Systems once we ve looked at Turtle Graphics 91 92 1

Readings & Socware READINGS and SOFTWARE on turtle graphics BFOIT introduc6on h`p://www.bfoit.org/itp/defcmds.html Read sec6ons Commanding a Turtle Pseudocode Adding New Commands Itera6on Addi6onal readings: Seymore Papert popularized the use of turtle graphics for pedegogical purposes in his book MIndStorms h`p://books.google.ca/books? id=hhieagufghwc&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false The TG applet should run off your webpage if you have JAVA installed. The page for BFOIT turtle graphics is h`p://www.bfoit.org/intro_to_programming/tg.html Note this page has a summary of a lot of commands at the bo`om If you want Turtle Graphics on your own computer, so you don t need an internet connec6on, you can try NetLogo: h`p://ccl.northwestern.edu/netlogo/ This has many more features, and you may need a few hints to get going with NetLogo. Draw a square!repeat 4 [fd 100 rt 90]! 93 94 L- Systems socware Turtle Graphics There are lots of L- Systems socware We ll be using FractalGrower by Joel Castellanos, Department of Computer Science, University of New Mexico socware h`p://www.cs.unm.edu/~joel/paperfoldingfractal/ paper.html Note you need a JRE (Java Run6me Environment) installed on your computer to use this on your own. (If you don t want to use our labs). If you have difficul6es with this, we might be able to arrange some help. What is turtle graphics? Turtle => an early dome- shaped robot Issue commands to the turtle The turtle could trace its movements on paper Now we use an analog of a turtle robot on the screen DEMO 95 96 Basic Turtle Commands Addi6onal Helpful Commands Command Descrip%on Example FD FORWARD BK BACK LT LEFT RT RIGHT Moves the turtle forward, in the direc6on it is facing, by the specified number of turtle steps. FD 100 Moves the turtle backward, i.e., exactly opposite to the direc6on that it's facing, by the specified number of turtle steps. BACK 150 Turns the turtle counterclockwise by the specified angle measured by a number of degrees (1/360 of a circle). LEFT 180 Turns the turtle clockwise by the specified angle, measured in degrees (1/360 of a circle). RT 90 Command Description Example Moves the turtle to the center of the graphics canvas, HOME i.e., coordinates 0,0. PU Lifts the turtle's pen up so that it leaves no trace PENUP when the turtle moves. PD Puts the turtle's pen down so that it leaves a trace PENDOWN when the turtle moves. Erases (cleans) everything that the turtle has drawn on the graphics area (ClearGraphics). The turtle's CG state (position, heading, pen color, etc.) is not CLEAN changed. SETPC Sets the turtle's color - the color of its pen. Color is SETC expressed as a number. SETPENCOLOR SETPC 4 SETPS Sets the width of the turtle's pen, which determines SETPENSIZE the thickness of the trace it leaves, the line it draws. SETPS 5 HT HIDETURTLE Hides the turtle, makes it invisible. With these, try drawing a square, a triangle, an octagon and approximate a circle ST SHOWTURTLE Makes the turtle visible. SETH SETHEADING Set the turtles direction to a specified angle given in degrees SETH 0 97 98 2

Logo programming language LOGO was designed as a general programming language With turtle graphics commands added to the language, it became popular for teaching programming concepts (and therefore problem solving) to children. Cogni6ve aid ocen used with children: Pretend you are the turtle Use your body sense by ac6ng out the commands the turtle receives LOGO programming constructs: repeat Repe66on and Procedures are two LOGO program language constructs for combining commands that we will look at Repe66on (loop) is provided in LOGO with the repeat command: Repeats a block of commands a given number of 6mes Example: repeat 4 [fd 20 rt 45 bk 10]! 99 100 LOGO programming constructs: repeat Repe66on and Procedures are two LOGO program language constructs for combining commands that we will look at Repe66on (loop) is provided in LOGO with the repeat command: Repeats a block of commands a given number of 6mes Example: repeat 4 [fd 20 rt 45 bk 10]! Penta What does this draw? repeat 5 [fd 100 rt 144]! Number of repe66ons Block of commands to repeat 101 102 LOGO programming constructs: procedure LOGO programming constructs: procedure Procedures teach the turtle a new command to do something Example: to cross! fd 100! bk 20! rt 90! bk 40! lt 90! bk 80! end! Procedures teach the turtle a new command to do something Example: to cross! fd 100! bk 20! rt 90! bk 40! lt 90! bk 80! end! Name of new command Meaning of the new command (what to do) 103 104 3

What does this draw?!repeat 4[fd 100 rt 90]! Draw a circle Move a bit, turn a bit How would you draw a bigger circle repeat 10 [square rt 10]! to circle!!repeat 36 [fd 5 rt 10]! 105 106 Combining drawings What does this draw? to sunburst!!repeat 36 [fd 100 bk 100 rt 10]!! repeat 4 [fd 10 rt 90]! repeat 36 [fd 100 square bk 100 rt 10]! 107 108 In Class- Exercise: Challenges Using repeat, to and the basic turtle commands How many of these you can figure out? Which are Hard? Which are Easy? 109 110 4

Reviewing the exercise.. What makes a problem (a figure) hard? You can t figure it out It takes a lot of commands to finish It takes a lot of steps for the turtle It isn t possible to produce with these commands It isn t possible to produce with any commands Are there figures (drawings) that can t be created? This is like our earlier ques6on: are there things that can t be computed? Are there things that are hard? 111 5