Skip to main content
100%

Multiple faces and mutliple variations

✓ Published0🌍 Public
SShashwat Kumar
Last edited Jul 15, 2021
Created on Jul 15, 2021

A grid of eighteen cartoon faces displays the visual variety possible when randomizing six facial parameters: stroke width, eye offset, eye radius, mouth radius, and mouth width. Each face renders as an SVG circle with two eyes and an arc-based mouth, positioned via a shared face container that translates to the center of its cell. The example uses React to map over a range of numbers, generating each face component with randomized values from D3’s `random` API. The `Mouth` component leverages D3’s `arc` generator to create the half-circle smile.

AI-generated description

Half way towards a smiley face.

MIT Licensed

Similar vizzes