fbpx
Skip Navigation

Coding The Solar System

By Jennifer O'Driscoll
Key Coding Concepts
  • Algorithms
  • Debugging
  • Functions
  • Loops
  • Sequences
Terminology

Algorithms

A step-by-step set of operations to be performed to help solve a problem

Debugging

Finding problems or ‘bugs’ in code and solving them

Function

A type of procedure or routine that performs a distinct operation. There are often ‘canned’ functions that exist already like the ‘jump’ block

Loops

Running the same sequence multiple times i.e. repeat or forever blocks

Sequences

Identifying a series of steps for a task. Computers and Scratch read and perform commands in order from top to bottom

Level Grades 9-12
Subjects Science and Technology
Provinces / Territories Across Canada

Overview

Today, learners will use OpenProcessing to create a digital model of the solar system. Learners will use what they know about the distance between planets and the diameter of each to create a to-scale model in OpenProcessing.

Learners will need prior knowledge of the structure of our solar system - the distance between each planet, and the diameter of each (this will be a follow up to a 'Properties of Planets in Our Solar System' lesson where these things are covered).

Learners will need access to a computer and a login for OpenProcessing: https://www.openprocessing.org/

The teacher can create a sketch that the learners will fork once the lesson begins (if using modifications) or use the provided starter project.

It is recommended that the Code-moji lesson is completed prior to this lesson - as an introduction to Processing.

Learners will log into OpenProcessing and fork the sketch: http://bit.ly/processing-code-along

In a 'Code-Along' environment, walk the learners through how to:

  • Increase the size of the sketch to fit the entire model
  • Resize the ellipse to be a scaled down version of the sun

Work with the learners to come up with a ratio that they will use to scale down their model. Explain that they will use the same ratio on the diameters of all of the planets to complete their model.

Once learners have a firm understanding of how to create an ellipse, explain that they will repeat this process with the rest of the planets, making each their appropriate size.

Demonstrate how to use the Processing reference guide and show them where they can look up explanations for ellipses, walk them through how to 'fill' their shape with RGB values.

Show them the Google colour picker and allow them to choose their own shade for the sun.

Finally, discuss with learners how they need to use a ratio to scale down the distance between each planet. Discuss how coordinates on a computer screen are measured in pixels, and we will be changing the km or AU distances into pixels. Have learners try to determine the appropriate distances/scale on their own.

Learners will need to reference their notes (or research) the distance between planets and decide which unit (km or AU) they will scale, and what scale they will use to represent that distance in pixels for their final display. Here’s a great website for reference:
https://theplanets.org/distances-between-planets/

Success Criteria
Learners can describe the major components of the solar system and the universe (e.g., planets, stars, galaxies), using appropriate scientific terminology and units (e.g., astronomical units, scientific notation, light years)
[D2.5]

Learners are able to compare and contrast properties of celestial objects visible in the night sky, drawing on information gathered through research and using an appropriate format (e.g., compare the size of planets) [D3.3]

Learners can add additional ellipses/shapes to create dimensions/colours on their planets (i.e. Jupiter's red spot).

Learners can include moons with the planets that have them, or even include rings using arcs (sequence would become important here).

Modifications

The teacher can create a starter project that provides ellipses already made to be the correct diameter - have students simply line them up to scale and change the colours.

Lunar Eclipse photo by Johannes Plenio from Pexels
https://www.pexels.com/photo/lunar-eclipse-1114900/

Distance Between Planets
https://theplanets.org/distances-between-planets/

More Lesson Plans

View All Lesson Plans