At My Fingertips

Mandala Flower

Let's create a mandala that looks like a flower.

Dot

The mandala flower is made up of many dots. The larger dots are not just plain circles, but they have a bit of a 3-d effect:

dot

Loading...

Ring

Let's create a function that can compose a ring of dots. If you are not sure how to implement this function, check the Sliced Pitaya activity.

Loading...

Mandala

Now let's compose a mandala from multiple concentric rings of dots.

Here is a function to compose a list of graphics. We will use this to compose a list of concentric rings into a mandala.

Loading...

Now implement the mandala function below to compose a mandala like this:

mandala

This mandala consists of 6 outer rings, 6 middle rings, 2 inner rings, and a central circle. The outer and middle rings consist of 20 dots. The 2 inner rings consist of 20 circles. The color of the outer rings has a saturation of 1.0, the middle rings of 0.75, and the inner rings and circle of 0.5.

You can compute the diameter of the i-th ring with largest_ring_diameter * base ** i, where the largest ring is the 0-th ring, and base is a number smaller than 1 (e.g., 0.875).

Loading...

This activity has been created by LuCE Research Lab and is licensed under CC BY-SA 4.0.

Mandala Flower

Logo of PyTamaro

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy PolicyPlatform Version c3a8286 (Mon, 14 Oct 2024 13:30:28 GMT)