Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Smiley Face

Public visualization

Viewing a saved revision (read-only)

792d648371834d57b7042fa0e9540e4a

Smiley Face

0 stars1🌍 Public
Wwisam-ahmed
Last edited Jul 3, 2023
Created on Jul 3, 2023

This example draws a simple smiley face entirely with SVG shapes: a yellow circle for the head, two black circles for the eyes, and an arc for the mouth. The layout is computed from the SVG’s width and height attributes, with fixed constants for eye spacing and altitude. It uses D3 v7’s `select` and `arc` helpers, applying `attr` to position each element and `path` with an arc generator to define the mouth’s curved geometry.

AI-generated description

An example including some commonly used features of SVG.