🌍 Public
Viewing a saved revision (read-only)
03d1a6f38d214771a2d49923caa1b3b1
Let's make a face with D3.js!
This example creates a smiling face using basic SVG shapes—two circles for the eyes, a larger circle for the head, and an arc for the mouth—all positioned with fixed coordinates. The code uses D3.js v5 selection methods like `svg.append` and `.attr` to build the elements, alongside the `d3.arc` generator to define the mouth’s path based on inner and outer radii and start/end angles. The SVG canvas is 960 by 500 pixels, with styling applied via an external stylesheet.
AI-generated descriptionAn example including some commonly used features of SVG.