Flakey Version of Recursion

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   hear noise   go to next page

Answer:

The new sharp points will start a new ice crystal.

Flakey Version of Recursion

A new snowflake picture is formed by drawing a small star at the end of each exposed line of the previous picture:

Here (again) are the two things that recursion does:

  1. If the problem is easy, solve it immediately.
  2. If the problem can't be solved immediately, divide it into smaller problems, then:
    • Solve the smaller problems.

Here are how this applies to the snowflake problem:

  1. To draw a tiny snowflake, draw a tiny star.
  2. To draw a large snowflake, draw a large star, then draw a half-sized snowflake at the end of each line.

This snowflake drawing procedure stops when the sub-snowflakes reach the smallest size. In nature, if the flake remains in the atmosphere for too long the ice crystals keep growing and the flake fills in. If flake reaches ground before this happens it has an open structure like our snowflake.

QUESTION 12:

Must each sub-snowflake be half the size of the parent flake?