Skip to main content

About this free course

Download this course

Share this free course

Algorithmic Design
Algorithmic Design

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

5.2 Skill 5: Create your pattern

In this skill, you will create your own unique pattern using the tiles that you previously designed and saved in your codesnippet text file.

If you skipped ahead and don’t have those tiles, go back to Skill 3: Design 4 tiles to create the four tiles.

If you already tried to make the four tiles and found it difficult, don’t worry. You can work through this skill by tweaking the tiles provided in Program 14.

Active content not displayed. This content requires JavaScript to be enabled.
Program 14  Pattern maker
Interactive feature not available in single page view (see it in standard view).

Video 9 explains how to insert your codesnippets text into the pattern maker.

Download this video clip.Video player: Video 9
Copy this transcript to the clipboard
Print this transcript
Show transcript | Hide transcript
Video 9  Adding codesnippets to the pattern maker
Interactive feature not available in single page view (see it in standard view).

Now try making a pattern using your tiles.

Activity 9  Insert your tiles to make a pattern

Timing: Allow 40 minutes to complete this activity

You are going to use the four tiles that you generated in Skill 3: Design 4 tiles to make a pattern using Program 14 Pattern maker. You will replace the existing code with the code that you saved into your codesnippet text file.

To generate your own pattern:

  1. Copy the code for your first tile from your codesnippet text file and paste it into the function Tile1(), replacing the code that is there.

  2. Repeat this action for your remaining tiles, pasting the respective code into Tile2(), Tile3(), and Tile4().

    Your code will look similar to what was there before, but it may not be as neatly aligned. Don’t worry, that won’t affect anything as long as you have pasted the code within the curly brackets { } of the tile functions.

  3. Press Play and you should see your own tiles arranged in a pattern. Hurray!

    If you encounter a problem, simply press Revert and start again. The most likely cause is that you have accidentally pasted your code over some of the function code.

  4. Play around with the arrangement of your tiles by tweaking the tileSequence array.