Skip to main content
100%

let's make a face with d3

✓ Published0🌍 Public
Ccguibourg
Last edited Oct 23, 2019
Created on Oct 23, 2019

A smiling face is drawn entirely with SVG shapes: a gold circular head, two black eyes, and a mouth created as an arc path. The code uses D3 v7’s `select` to append elements to an SVG canvas, and the `arc` generator to compute the mouth’s path with specified inner and outer radii and start/end angles. All shapes are centered via a translated group, with fixed pixel dimensions for the 960 by 500 canvas.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes