Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Smiley Face Part II

Public visualization

Fork of Smiley Face Part II

0 stars0🌍 Public
MMichael Khomyarchuk
Last edited Dec 27, 2021
Created on Dec 26, 2021

Two procedurally generated smiley faces are rendered side-by-side in an SVG canvas, each composed of a yellow background circle, black eyes with white shine highlights, and a d3 arc-based mouth. The code builds the faces from modular React components—`FaceContainer`, `BackgroundCircle`, `Eyes`, and `Mouth`—and applies randomized parameters for eye offset, radius, mouth start angle, and other attributes. The `Mouth` component uses `d3.arc()` to construct the curved path, while `index.js` seeds the variation with `d3.range` and inline `Math.random()` calls, producing two distinct expressions. The work demonstrates parametric reuse of SVG primitives within a React/D3 hybrid structure.

AI-generated description

An actual smiley face

Comments

Sign in to join the discussion.

MIT Licensed