Skip to main content
100%

Ju's smiley face

✓ Published0🌍 Public
JJulia Múgica
Last edited Apr 17, 2021
Created on Apr 17, 2021
Forked from HTML Starter

This example shows a cheerful, cartoon-like smiley face built entirely with SVG shapes: a yellow circle for the face, two smaller circles for eyes, and a D3 arc path for the mouth. The code uses React to compose the SVG elements declaratively, translating the origin to the canvas center to simplify positioning. It leverages the D3 `arc` method with method chaining to generate the mouth’s path geometry, calculating its inner and outer radii and angular range. The face is rendered within a 960×500 viewport, with a black stroke outlining the main circle.

AI-generated description

Let's make a face

MIT Licensed

Similar vizzes