flower
A flower with pointed petals and V-shaped valleys between them.
flower(x: Val, y: Val, outerRadius: Val, sides: Val, innerRatio: Val): Expr
Import shape from shaders/std and use shape.flower.
outerRadius is the distance from the centre to a petal tip, in uv. sides is the petal count. innerRatio (0–1) is the valley radius as a fraction of the tip radius.
Parameters
| Name | Type | Notes |
|---|---|---|
x | Val | |
y | Val | |
outerRadius | Val | |
sides | Val | |
innerRatio | Val |
Example
shape: {distance: ({x, y}, u) => flower(x, y, u('radius'), u('sides'), u('innerRatio')), …}
See also
star— A star with straight sides and sharp points.polygon— A regular polygon with any number of sides.