Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Let's make a face: part 3

Public visualization

Viewing a saved revision (read-only)

36d2c44b66a54d209520d33177a6f97f

Fork of Let's make a face: part 3

0 stars1🌍 Public
RReagannkwa
Last edited Jan 11, 2022
Created on Jan 11, 2022

This example shows a simple smiley face built with SVG shapes, including a gold circular head, two black eyes, and a curved mouth. The face is centered using a transformed group element, with all coordinates relative to the center. The code uses React 17 for component rendering and D3 v7’s `arc` generator to create the mouth path from an inner radius, outer radius, and specified angles. The mouth is drawn as a semicircular arc with a fixed stroke width, while the eyes are placed using offset constants from the center point.

AI-generated description

Making a smiley face with React and D3