# CSCA48H3 Lecture Notes - Lecture 4: Init, Operand, Alien 3

## Document Summary

Csc a48 intro to computer science ii. Recursion means defining something in terms of itself usually at some smaller scale, perhaps multiple times, to achieve your objective. Programming languages generally support recursion, which means that, in order to solve a problem, functions can call themselves to solve smaller subproblems: drawing fractals. For our purposes, a fractal is a drawing which also has self-similar structure, where it can be defined in terms of itself. Let us start by looking at the famous koch fractal. An order 0 koch fractal is simply a straight line of a given size. An order 1 koch fractal is obtained like this: instead of drawing just one line, draw instead four smaller segments, in the pattern shown here: Repeating our pattern again gets us an order 3 koch fractal: To draw a koch fractal of order 3, we can simply draw four order 2 koch fractals.