Skip to main content
100%

Smiley Face Part I

✓ Published1🌍 Public
CCurran Kelleher
Last edited Sep 11, 2019
Created on Aug 28, 2019

This example shows a stylized smiley face rendered as SVG in React, with features including a rounded-tip mouth, eyes, nose, blush, and decorative arcs. The mouth is created using d3.arc() with cornerRadius() to round the stroke ends, while other facial elements are positioned using SVG circles, rectangles, ellipses, and paths. The code sets explicit dimensions and coordinates, and uses React to render the SVG output within a d3.v5 environment.

AI-generated description

This example shows how to make an arc with rounded tips, the mouth, using d3.cornerRadius().

The original work was done in this face by Xinting Yao

MIT Licensed

Similar vizzes