Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Smiley Face Part I

Public visualization

Viewing a saved revision (read-only)

0879cfe90ab44b158462d93aed4ac64c

Smiley Face Part I

0 stars0🌍 Public
ZZoe
Last edited Aug 19, 2021
Created on Aug 19, 2021

A yellow smiley face rendered with React and D3 v7 draws a circle for the head, two smaller circles for eyes, and a mouth built using the `arc` generator. The SVG uses fixed pixel dimensions, with positions derived from `width`, `height`, and offsets like `eyeOffsetX` and `eyeOffsetY`, plus a stroke width for the face outline. The mouth arc spans from PI/2 to 3PI/2, creating a crescent shape, while the head’s radius is calculated from the SVG height minus half the stroke width. All shapes are drawn declaratively via React’s JSX, with D3 only supplying the arc path.

AI-generated description

Half way towards a smiley face.