Skip to main content
100%

Fork of Fork of Let's make a face with D3.js! by kiran jyothi bodduluri - 11604571

✓ Published0🌍 Public
NNikitha123171
Last edited Feb 24, 2023
Created on Feb 24, 2023

This visualization demonstrates fundamental D3.js DOM manipulation by constructing a cartoon smiley face from primitive SVG shapes, including a circular head, eyes, pupils, nose, eyebrows, rectangular teeth, a mouth arc, and semi-transparent blush circles. The code uses a mix of `d3.select` and chained `.attr()` methods to create and position elements on an SVG canvas, with an `arc()` generator defining the nose and mouth paths. A static flower-like arc forms the nose, while the mouth is drawn as a curved path with a distinct inner radius. The `d3.v5` library manages the SVG rendering, and hardcoded pixel coordinates (e.g., 390, 150 for the eyes) position the facial features rather than data-driven layout.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes