Skip to main content
100%

Let's make a face with D3.js

✓ Published0🌍 Public
Aadelgrosso
Last edited Aug 13, 2021
Created on Aug 13, 2021
Forked from Shapes with SVG

This example uses D3.js v5 to draw a simple cartoon face in an SVG canvas, assembling circles and an arc path with basic shape attributes. The face is constructed with a yellow head circle, black eye circles spaced symmetrically, and a mouth created using the `d3.arc` generator with specified inner and outer radii and angular bounds. The code imports `select` and `arc` from D3, sets dimensions dynamically from the SVG, and positions elements relative to the viewport center. The rendering approach is purely SVG-based, with static styling applied via attributes and a minimal CSS file.

AI-generated description

A demonstration of basic HTML and CSS.

MIT Licensed

Similar vizzes