Fractal Geometry: Enhancing Computational Thinking with ...
Transcript of Fractal Geometry: Enhancing Computational Thinking with ...
Fractal Geometry: Enhancing Computationalthinking with MIT Scratch
Vinayakumar R∗, Soman KP∗and Pradeep Menon†∗center for Computational Engineering and Networking (CEN), Amrita School of Engineering, Coimbatore,
Amrita Vishwa Vidyapeetham, India†Lakhshya Cyber Security Labs Pvt Ltd, Coimbatore
Email: [email protected]
Abstract—Recent developments in pedagogy have focused uponcomputational thinking. Computational thinking provides a wayto solve the problem and it is a key practice of science education.The importance of computational thinking is rarely found in K-12 education. Computational thinking is a an important skilleveryone needs and it is correlated with many other concepts.These factors have made the development of new tools andsyllabus. In this paper, we aim to show the experiments of fractalgeometry using MIT Scratch. These computational exercisesfacilitate to learn many of computational thinking skills that arevery important for the people in the near future. Based on ourexperience with students, we claim that the concept of fractaland its implementation in MIT Scratch is the best practices toimprove computational thinking in K-12 school level students.
Index Terms—Computational thinking, fractal geometry,Scratch, K-12 education, block based programming, 21st centurylearning skills
I. INTRODUCTION
Computational thinking is very much required skill for
everyone in 21st century[1]. It can bit each and all people’s in-
tellect implicitly or explicitly. This is applicable for every user
to easily solve current world problems. The recent problems
have identified and reinforced the importance of computational
thinking to solve the problems. Seeing that the e-newsletter
of Wing’s essay, there was colossal curiosity in, and study
dedicated to, incorporating computational Thinking into K-12
education curriculum[2].
There are various approaches and attempts made by K-12
researchers to impart the term computational thinking into K-
12 education[3]. Many of them investigated the importance of
the term visualization in the process of computational thinking.
John Jungck discusses the importance of visualization in bio-
logical process to enhance computational thinking[4]. Robert
tinker[5] gave importance for visualization in temperature,
light and force to teach computational thinking.
People often have a little confusion between computational
thinking and ICT education. The problem is handled by
introducing block based programming languages to enhance
computational thinking. The LOGO[6] programming took a
part of this, but it was not that much successful. After that
there are a lot of developments with just remixing the existing
technology to impart computational thinking to K-12 educa-
tion by K-12 educational researchers[7],[8],[9],[10],[11],[12].
MIT Scratch is considered as a powerful tool to impart
computational thinking in K-12 education[13]. Scratch is a
visual and media rich programming environment which allows
users to create games, stories, greeting card design and more
by snapping different blocks together. Scratch puts user into
the computational world without having much programming
experience. This also can be used to introduce programming
to young children in the ages of 6 to 13. They feel more
enjoyable in the process of learning programming.
Integrating the term computational thinking to K-12 ed-
ucation is not only meets the required goals but also the
assessments. Course materials and software plays an important
role. Preparation of computational experiments is often consid-
ered as difficult task. In this paper, we propose computational
exercises related to fractal geometry using MIT Scratch. These
exercises and its documentation in Kannada language have
been used in practice to impart computational thinking to K-
12 education.
II. MIT SCRATCH
Scratch is a graphical and media rich programming environ-
ment developed by MIT for children in the ages of 6 to 13. It
allows the user to create stories, games, simulations, arts etc.
Scratch provides a visual appealing programming environment
for users where they can simply drag block and stack their
blocks on script area in Scratch programming environment.
Each blocks execution can be seen by the user. This stimulates
the user to understand the complex problems and find methods
to solve it in an easy manner. The design based environment
of Scratch attracts the user and enables the user to transform
their ideas for solving real time problems easily. When they
are getting into this, they will be into abstract thinking process.
Scratch has a media rich programming environment for
creating design based learning activities. This makes students
to express themselves. It is an easy to use environment for the
user who doesn’t have prior programming experience because,
user no need to worry about the syntax of the language. Instead
user is going to think logic behind the problem. This property
increases the user attention. It is a graphical and control flow
language which enables the user to see what each block is
exactly doing. This makes programming more understandable
to the novices. In Scratch, commands are run in a sequence
and a program counter keeps track of these commands to point
to the next command to be run.
IEEE - 43488
9th ICCCNT 2018 July 10-12, 2018, IISC, Bengaluru
Bengaluru, India
Fig. 1: Scratch GUI(Graphical user interface)
You can see from Fig 1, the MIT Scratch GUI is divided
into 5 basic parts
1) Palette: MIT Scratch contains 8 different block category
and each category has its own set of blocks. For exam-
ple, variables block has blocks related to data structures.
2) Blocks: Scratch contains more than 100 preprogrammed
blocks, which are grouped into 8 different blocks cat-
egory. This you can see from the top right side of the
Scratch GUI and by clicking on these blocks category
you can also find blocks related those categories. These
blocks are used to control the sprite. For example, using
’Move 10 steps’, a sprite can be moved 10 steps forward.
Scratch provides an immediate effect whenever a user
clicks on a block and outputs visible result to the user.
This makes learning process more tinker, where users try
out different things by easily clicking on different blocks
to know what exactly doing. Scratch provides different
shape and color of blocks to easily identify blocks and to
make learning process easier. In Scratch, blocks include
connectors at top and right to snap together. This makes
construction of program is easier. It follows the ’fail
soft’ principle, which means the parameter of block has
default values. This value will be taken in a program
even a value is not given by the user at run time. These
blocks also avoid the most common error ’Syntax error’
i.e. the set of blocks in a stack provides output even if
it is not logically correct.
3) Script area: Blocks are drag and drop into script area by
the user.
4) Stage: Output screen of the Scratch.
5) Sprite information area: Displays information about
sprite which user uses in project activity. By right
clicking on it, a user can export it to other projects,
delete, and also make a copy of it.
With Scratch, novices can clicks on a block and see its
reaction. Next, they combine blocks and execute it. This
creates a concept of procedure. This sequence of blocks
creation enables the user to test their actions and find their
pattern. If they don’t get they can test it again and it is going
to create playful activity. For example, drawing a square in
MIT Scratch. In Fig 2, the instructions are serialized by 30
steps 4 times and by turning the degrees.
A. Scratch online community
’Excellent programmers know what to jot down. Quality
ones understand what to rewrite (and reuse)’ Raymond (1999).
This introduces the term remixing. Remixing is the process of
creating new resource based on the existing one. In order to
support this, Scratch has a website[14] where young people
can share their creations and connect with other member’s
online. Currently, Scatch website contains millions of projects.
We found many remix of the projects that are curated by
Scratchers. The process of remixing forces the user indirectly
to read the existing property and tries to add other features.
MIT Scratch website helps to solve individual problems by
communicating with others on the internet.
IEEE - 43488
9th ICCCNT 2018 July 10-12, 2018, IISC, Bengaluru
Bengaluru, India
Fig. 2: Scratch GUI(Graphical user interface)
MIT Scratch online community allows all ages of people to
create and play together. Scratch community member can share
their projects, they can download others projects, remix it and
share it to the outside world and they also write comments
on other projects. This also provides discussion forums where
community members can ask question related to Scratch. This
has launched in 2007 and now avilable as a vibrant online
community. Moreover, Scratch acts like a social computing
network via the Scratch online community.
III. ACADEMIC SUPPORTS TO EDUCATORS
ScratchEd[15] is a website where it provides support to
Scratch. The educators and students can share Scratch tu-
torials. It provides an online support and conversation, and
provides help for everyone.
IV. EXPERIMENTS: TREE DRAWING
The tree is drawn by repeatedly changing its size, shown
in Fig 4. Most commonly drawn fractals in Scratch online
community is shown in Fig 3. The steps of tree drawing
process stimulate the learner to think computationally. Each
steps of tree drawing is visually seen by the user. Once the tree
is drawn, the message can be transferred to flower blooming,
this initiates how to avoid collision detection. At a time
the flower may bloom and fall, programming this sequence
introduces user into the concept of ’parallelism’. This gives
the concept of conditionals, operators and data.
A. Fractal geometry iterative process
Chaos game is a well-known example where it intro-
duces the concept of iterative process[10]. Iterative process
is everywhere from simple shapes to complex fractals. The
below examples are all based on the concept of chaos game
experiment.
To create a fractal, the computation is mapped into Scratch.
Most commonly used blocks for fractal creation are shown
Fig. 3: Frequently used Scratch programming blocks for
Fractal Drawing
Fig. 4: Scratch GUI(Graphical user interface)
in Fig 4. In chaos game throwing a dice can be mapped
using ’pick random block’ in Scratch. The next point is to
find the required x and y coordinates. These are based on
the ’pick random’ block for example if it is one, it chooses
first coordinate and vice versa. Using ’pen block’ the point is
placed for the newly calculated x and y coordinates. These all
blocks will be placed inside the ’forever’ block, because once
the iteration increases you will be able to get the complex
fractal. The iterative process of each step calculation gets the
user into computational process.
Fractals are self-similar in nature, a mixture of art and
geometry. They are recursively outlined and small sections of
them are similar to colossal ones. They can be created using
complex mathematical concepts, Iterated function systems
(IFS) and Lindenmayer system (L-systems). In this context,
we use IFS concept to create fractals.
B. Iterated function system (IFS)
IFS Fractals have been first explored by Michael Barnsley
and his co-employees at Georgia Institute of technology in
the eighties. They are used to create complex shapes such as
mountains, clouds, trees and more. The IFS fractal is made up
of a couple of almost certainly overlapping smaller copies of
itself (self-similarity), each of which can be made of copies
of itself.
{fi : X → X|i = 1, 2, · · ·N}, N ∈ N (1)
IEEE - 43488
9th ICCCNT 2018 July 10-12, 2018, IISC, Bengaluru
Bengaluru, India
TABLE I: Comparison of Educational Tools
Feature LOGO KTurtle Kojo Alice MIT Scratch
Application Development technologies LISP and PDP-1 (First version) Based on LOGO programming Scala and Java/Swing Java
Squeak,
Action Script
(Scratch 2.0)
Open source code Yes Yes Yes Yes Yes
Open to public Yes Yes Yes Yes Yes
Block based programming NO NO NO Yes Yes
Web application No No No No Yes
Supports local language (Indian languages) No Yes Yes No Yes
Project activities documentation in local
languages (Indian languages)No No No No Yes
Supports fractal creation No Yes Yes No Yes
Supports fractals creation based on recursion No No No Yes Yes
Each fi is a contraction on the complete metric space X .
Each IFS has a set of affine transformations such as rotations,
scaling and translations. All these are represented by following
the matrix form.
[xn+1
yn+1
]=
[a bc d
] [xn
yn
]+
[ef
](2)
The above matrix can also be represented as,
xn+1 = axn + byn + e (3)
yn+1 = cxn + dyn + f (4)
The concept ’Recursion’ is not used for creating fractals
but it often makes learning process difficult for novices.
Instead, we have followed the following steps to create fractals
using MIT Scratch. Creation of fractals application using
MIT Scratch and its documentation in ’Kannada’ language
is available at[16].
Step 1: Use ’When green flag is clicked’ block. This triggers
other scripts whenever a user click green flag on MIT Scratch.
Step 2: Before starting to draw a point on stage, clear the
stage using ’clear’ block and make it pen up, so do not draw a
line on stage whenever we move from old point to the newly
estimated point.
Step 3: Declare variables x, y, xn+1, yn+1 and a list of
functions and initialize to zero.
Step 4: Add 100 values (1, 2 and 3) and the repetition
of these values is taken from probability in IFS table (used
’repeat’ block in MIT Scratch).
Step 5: Within a ’forever’ loop
• Pick random values from 1 to 100, used as an index for
list function and get the corresponding value of the index.
• The previous result is checked and find out new points
using eqn (3) and (4) ,where a, b, c, d values are taken
from IFS Table. xn and yn are previously calculated xand y values, e and f are previous result values.
• Assign xn+1, yn+1 values to x and y respectively. Using
this values plot a single point.
The scripts and it’s output is displayed in Fig 5, and Fig 6
respectively.
V. ACTIVITIES WITH STUDENTS
The above examples are shown to different levels of stu-
dents. When it is shown to primary level students they are
try to remix the projects by adding sound, changing the color
of a pen etc. but when it is shown to middle level students,
they tried to get the main concept behind this. They started
to understand the concept of chaos game and they find out
the whole concept of fractal tree drawing and they started to
create other fractals which are more complex. Finally, they
started to use the concept of ’recursion’ in order to eliminate
the duplication of codes.
VI. RELATED FRACTALS CREATION TOOLS
LOGO: LOGO is a computer programming language de-
veloped by Seymour Papert and a colleague in the 1960’s
which was invented to bring the students into the world
of programming[6]. This has influenced others to develop
new educational platforms for K-12 education. Using LOGO,
complex mathematical fractals can be created but this suffers
to provide block based commands and visual environment to
the user. This factors have made the environment not familiar
among kids. This also not been designed to learn computa-
tional thinking skills by creating programmable media. Now,
people are often remembered because of ’Turtle graphics’.
KTurtle: It is an educational programming language de-
signed for creating ’Turtle graphics’[17]. The environment
is developed based on LOGO programming language. This
provides localized programming environment. Kturtle provides
a programming environment similar kind of LOGO which can
be used for creating complex fractals. This environment is only
for the users who have prior programming experience
Alice: Alice is an object oriented, visual and innovative
programming environment that allows the user to create
animation, games, fractals and more. It was designed and
developed by late Randy Pausch team at University of Virginia,
IEEE - 43488
9th ICCCNT 2018 July 10-12, 2018, IISC, Bengaluru
Bengaluru, India
Fig. 5: Script for sierpinski triangle
then Carnegie Mellon (from 1997)[18]. Alice is primarily de-
veloped for teaching object oriented concepts to the user with
the help of programmable media (i.e. using story telling). The
platform also provides block based programming environment
to the user to make programming more easy and accessible
without using complex semantics of languages, C, C++ and
more. The key differences in comparison with Scratch are (1)
primarily Alice is not designed and developed with keeping
in mind ’computational thinking’ (2) It doesn’t support local-
ization (3) It doesn’t contains complex data structure and it is
often difficult to create complex fractals.
Kojo: kojo is an educational programming environment
Fig. 6: Sierpinski triangle
developed by Lalit Pant[19]. It provides block based and
visual programming environment for users to create animation,
games, fractals, simulations and more. It draws suggestions
from LOGO and Processing and developed using Scala in-
terface using Java Swing. This also does not meet Mitchell
Resnick design concepts such as low-floor, high ceiling and
wide walls.
MIT Scratch: Scratch is a block based and visual program-
ming language developed by Lifelong kindergarten (LLK)
group at MIT media lab that team led out by Mitchell
Resnick[13]. Scratch is primarily developed for the children in
the ages of 6 to 13. It provides computational thinking skills
to the students by creating design based learning activities
particularly programming interactive media. We are interested
towards computational thinking using fractals. The visual and
block based property of MIT Scratch makes user to get
easily started programming fractals by understanding complex
mathematics. Scratch is a control-flow language which shows
each step of program execution pictorially. Another unique
property of Scratch is to add media to the project activities.
This makes learning process more enjoyable to young students.
The comparision of the above discssed educational tools are
reported in Table I.
VII. CONCLUSION
Computational thinking is a crucial conception to be studied
in current education. The introduction of Scratch facilitates to
practice computational thinking for childrens in the ages of
6 to 13 at an early age. The tool and activities discussed in
this paper are employed in conjunction with computational
thinking and geometry learning course. The development of
fractals provides the way to grasp the mathematical ideas. Con-
sequently incorporating computational thinking into schooling
in an early stage tries to get computational abilities which
might be very essential for the long run. This transformational
skill appears poised to contribute to a revolution in education.
IEEE - 43488
9th ICCCNT 2018 July 10-12, 2018, IISC, Bengaluru
Bengaluru, India
ACKNOWLEDGMENT
This research was supported in part by Paramount Computer
Systems and Lakhshya Cyber Security Labs Pvt Ltd. We are
grateful to Computational Engineering and Networking (CEN)
department for encouraging the research.
REFERENCES
[1] Y. TABESH, “Computational thinking: A 21st century skill,” 2017.[2] J. M. Wing, “Computational thinking,” Communications of the ACM,
vol. 49, no. 3, pp. 33–35, 2006.[3] V. Barr and C. Stephenson, “Bringing computational thinking to k-12:
what is involved and what is the role of the computer science educationcommunity?” Acm Inroads, vol. 2, no. 1, pp. 48–54, 2011.
[4] N. R. Council et al., A framework for K-12 science education: Practices,crosscutting concepts, and core ideas. National Academies Press, 2012.
[5] C. Selby and J. Woollard, “Computational thinking: the developingdefinition,” 2013.
[6] R. D. Pea, “Logo programming and problem solving,” 1987.[7] S. Se, B. Ashwini, A. Chandran, and K. Soman, “Computational thinking
leads to computational learning: Flipped class room experiments inlinear algebra,” in Innovations in Information, Embedded and Commu-nication Systems (ICIIECS), 2015 International Conference on. IEEE,2015, pp. 1–6.
[8] K. P Soman, M. Unni V G, P. Krishnan, and V. Sowmya, “Enhancingcomputational thinking with spreadsheet and fractal geometry: Part 4plant growth modeling and space filling curves,” International Journalof Computer Applications, vol. 55, no. 14, pp. 24–29, 2012.
[9] K. Soman, M. U. VG, P. Krishnan, and V. Sowmya, “Enhancingcomputational thinking with spreadsheet and fractal geometry: Part 2root-finding using newton method and creation of newton fractals,”International Journal of Computer Applications, vol. 55, no. 14, pp.9–15, 2012.
[10] M. U. Soman, KP VG, P. Krishnan, and V. Sowmya, “Enhancingcomputational thinking with spreadsheet and fractal geometry: Part 1,”International Journal of Computer Applications, vol. 55, no. 14, 2012.
[11] K. Soman, M. U. VG, P. Krishnan, and V. Sowmya, “Enhancingcomputational thinking with spreadsheet and fractal geometry: Part 3mandelbrot and julia set,” International Journal of Computer Applica-tions, vol. 55, no. 14, pp. 16–23, 2012.
[12] P. Amitha, G. Joy, G. S. Pillai, L. Tharakrishnan, and K. Soman,“Innovative use of what if analysis for visualization.”
[13] K. Brennan and M. Resnick, “New frameworks for studying andassessing the development of computational thinking,” in Proceedingsof the 2012 annual meeting of the American Educational ResearchAssociation, Vancouver, Canada, 2012, pp. 1–25.
[14] “Mit scratch,” available at https://Scratch.mit.edu/.[15] “Scratched,” available at http://Scratched.gse.harvard.edu/.[16] “Digital story telling using scratch: Engaging children towards digital
story telling,” available at http://nlp.amrita.edu/edu/Digital-storytelling/.[17] O. Ristic, D. Milosevic, and V. Urosevic, “The importance of pro-
gramming languages in education,” URL: http://www. ftn. kg. ac.rs/konferencije/tio2016/Radovi% 20TIO, vol. 202016, 2016.
[18] W. P. Dann, S. Cooper, and R. Pausch, Learning to Program with Alice(w/CD ROM). Prentice Hall Press, 2011.
[19] B. Regnell, L. Pant, and D. Kogics, “Teaching programming to younglearners using scala and kojo,” LTHs Pedagogiska Inspirationskonferens,vol. 8, p. 4, 2014.
IEEE - 43488
9th ICCCNT 2018 July 10-12, 2018, IISC, Bengaluru
Bengaluru, India