### Present Remotely

Send the link below via email or IM

• Invited audience members will follow you as you navigate and present
• People invited to a presentation do not need a Prezi account
• This link expires 10 minutes after you close the presentation

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

# [EN] B_VI_10_NEW

No description
by

## My Logiscool

on 22 March 2018

Report abuse

#### Transcript of [EN] B_VI_10_NEW

scoolcode
course
recursion, 1st lesson
which means recursion
It was a pleasure working with you
which means recursion
which means recursion
which means recursion
paintings and of drawings of M.C. Escher
infinite mirrors
Matryoshka dolls
Examples
if the facing walls are covered with mirrors, it looks as they are going to infinity, this is called infinite recursion
We will drawing something like these below
Fibonacci sequence
The Fibonacci Sequence is a series of numbers that is quite common in nature:

The rule is that the next number is found by adding up the two numbers before it. This is an infinite series and its limit value is infinite.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144...
the Golden Ratio
In the spiral below the Fibonacci numbers are used as the lengths of the adjacent sides of the rectangle.
We put the rectangle next to each other and connect the corners, so we get the golden spiral.
Does this shape look familiar?
This sound great!
but how are we going to use it?
iterative function
function
R1()
{
let len = 300;
while (
len > 1
){
for(let i = 1; i <= 4; i++)
{
this.move(len);
this.turnRight(90);
}
len =
len / 1.5
;
}
}
the same function written recursively
function
R1_rek(
len
)
{
for(let i = 1; i <= 4; i++)
{
this.move(len);
this.turnRight(90);
}
if(
len > 1
) {
R1_rek(
len / 1.5
)
;
}
}
note that the function became shorter, once it is written recursively.
Also we managed to replace a loop to an if-statement.
Koch curve
binary tree
Let's start coding
inside of each doll there is a smaller one, this is called finite recursion
abstract artists have been using recursion for a long time now
which means recursion
it means recursion
recursion
Full transcript