Skip to main content
100%

Make a face

✓ Published0🌍 Public
CCAROL(XINYI) ZHENG
Last edited Feb 25, 2021
Created on Feb 25, 2021

This example shows a simple cartoon face made from SVG shapes: a yellow circle for the head, two black circles for eyes, and an arc for the mouth. The face is centered within a 960×500 SVG canvas, with eye positions calculated relative to the center. The code uses D3 v6 selections to append and style each SVG element, and the `arc` generator from D3’s shape module to create the mouth path with specified inner and outer radii and angle ranges. All styling is applied directly via attributes.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes