Skip to main content
100%

making a face

✓ Published0🌍 Public
AAndrew Fletcher
Last edited Jan 10, 2020
Created on Jan 6, 2020

This example shows a simple, static face built from vector shapes: a yellow circular head, two black eyes, and an arc-shaped mouth on a 960-by-500 SVG canvas. The drawing is constructed programmatically with D3 v5, using `d3.select` to target the SVG element and appending SVG `circle` and `path` elements. The mouth is generated via `d3.arc`, which creates a path based on inner and outer radii and start and end angles, while eye positions are calculated from the canvas center. The page relies on a separate `bundle.js` script and a minimal stylesheet.

AI-generated description
MIT Licensed

Similar vizzes