At My Fingertips

Documentation

Tulip

Implement the tulip function to recreate the following graphic.

tulip

Use the hue parameter and the pytamaro function hsv_color to make tulips of any color with the back leaf brighter (saturation of 1.0) and the front leaves darker (saturation of 0.8). Keep the value (the v in hsv) at 1.0.

You can start by implementing a semicircle function to help you with the construction of the tulip. Use the pytamaro circular_sector function

Loading...

Now you can work on the tulip function, that takes a radius and a hue as parameters. The hue must be a value between 0 and 359 and will affect the color of the tulip.

Loading...

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

Tulip

Logo of PyTamaro

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

Privacy PolicyPlatform Version 1cd5229 (Tue, 05 Nov 2024 16:55:57 GMT)