At My Fingertips
Rapid Playground
Implement the tulip
function to recreate the following graphic.
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
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.
This activity has been created by LuCE Research Lab and is licensed under CC BY-SA 4.0.
Tulip
PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version c08406b (Wed, 20 Nov 2024 12:30:00 GMT)