Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Let's Make a Face Part I

Public visualization

Fork of Let's Make a Face Part I

0 stars0🌍 Public
Ddeep1358
Last edited Apr 10, 2021
Created on Apr 10, 2021

This example uses React and D3 to draw a smiley face with SVG primitives. It shows a yellow circle head with two black eyes and a curved mouth rendered as an arc. The code constructs the mouth using the `d3.arc()` generator, setting inner and outer radii and start and end angles for a half-circle opening. The fixed dimensions are centered in a 960×500 viewport, with all facial features positioned relative to the center using SVG’s `transform` attribute and D3’s arc path output. The implementation uses React 16.9 and D3 v6.

AI-generated description

Half way towards a smiley face.

Comments

Sign in to join the discussion.

MIT Licensed