At My Fingertips

Rapid Playground

Documentation

Tulip

Implement the tulip function to recreate the following graphic.

tulip

Use the hue parameter and the pytamaro function PyTamaro iconhsv_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 PyTamaro iconcircular_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 754785f (Fri, 03 May 2024 12:21:44 GMT)