Skip to main content
100%

Chocolate cake

✓ Published1🌍 Public
Kkramyasudha2024@gmail.com
Last edited Feb 24, 2025
Created on Feb 24, 2025

A chocolate cake slice on a plate, complete with wavy frosting, a cherry, and cream swirls, sits beside a steaming cup of coffee. The SVG scene uses D3.js to construct basic shapes like polygons, ellipses, and paths, with explicit coordinate attributes. The code demonstrates direct DOM manipulation via `select` and `append`, and draws the frosting drip using `path()` with cubic Bézier curves (`bezierCurveTo`). A soft shadow ellipse and coffee steam paths add depth, all rendered within a fixed 960×500 SVG canvas.

AI-generated description

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

MIT Licensed

Similar vizzes