Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a face

Public visualization

Making a face

0 stars1🌍 Public
Nnishanthh19
Last edited Sep 22, 2023
Created on Sep 22, 2023

This example uses D3 v7 to construct a cartoon-like face from scratch. The visualization draws a green circle as the head, then adds black circles for eyes and a curved path, created with the `d3.arc` API, for the mouth. Two rectangles serve as eyebrows, which animate vertically using `transition` methods, moving up and then back down over two seconds each. The code demonstrates SVG shape creation and grouping, using D3's `select` to target the SVG element and `attr` to set positions and dimensions for each facial feature.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed