
Hi Maveryx,
A solution to last week’s challenge can be found here.
This week, we are diving deep into the realms of Math and Spatial tools by tackling the creation of Sierpinski’s triangle fractal. This challenge, designed by Roland van Leeuwen @RWvanLeeuwen, is an Expert-level task. If you are preparing for certification and plan to attempt an exam during Inspire, it is an excellent opportunity to hone your skills. Thank you, Roland, for crafting this challenge!
What is a Sierpinski triangle?
A Sierpinski triangle is a fractal shape composed of smaller triangles, each a scaled-down replica of the whole. It is created by repeatedly dividing an equilateral triangle into smaller triangles and removing the middle triangle at each iteration. This process results in a geometric pattern that exhibits self-similarity at different scales, forming a visually striking and intricate triangle-based fractal.
(This definition is sourced from https://en.wikipedia.org/wiki/Sierpi%C5%84ski_triangle.)
The provided input consists of the of latitude, longitude, and corners a, b, and c. (The corners are used to determine each point of the triangle.) Your output triangle will look like this:

For this challenge, we are providing additional guidance to simplify the tasks and help you build your Sierpinski’s triangle.
To construct a fractal triangle, follow these steps:
- Find the corners (points a, b, and c), and any random point within the triangle as a starting point.
- Select one of the corners of the triangle and form a line from the point to the corner.
- The center point of the line created is the one we will iterate with.
- Using the center point of the created line, pick another random corner, draw a line, and find its center.
- Repeat steps 2 to 4 for 100 iterations.
- Map all points as green diamonds and the first random centroid as black.
By repeating these steps, a fractal should appear in the shape of Sierpinski's triangle!
If you need a refresher on how to build an iterative macro or create spatial objects, review these lessons in Academy to gear up:
Good luck!
