Create with code
Change one instruction. See what happens. Understand why.
const petals = 8;for (let i = 0; i < petals; i++) { petal(i * 360 / petals);}petal(angle) draws one petal at that angle.Change. Observe. Understand.
Keep all 8 petals. Change their length. See exactly what your instruction does.
Longer petals. More room to bloom.
const length = 160;Same 8 petals. Same starting point.
In this example, length controls how far each petal grows.A little guidance
Find the detail you missed. Make the next move yourself.
Colorina
One petal is missing. Where would you look first?
Try a small challenge
for (let i = 1; i < petals; i++) { petal(i * 360 / petals);}Explore the courses. Start with what makes you curious.
Explore coding courses