Tweak a Face Assignment by Enze Liu
✓ Published1🌍 Public
This example renders a stylized panda face in SVG using React and D3.js. The code composes primitive shapes—circles, ellipses, and arcs—to construct facial features like eyes, ears, a nose, and a mouth, with a white circular face outlined in black. D3’s `arc` generator defines the curved paths for the eyes, nose, mouth, and ears, while React manages the SVG element hierarchy. All coordinates and dimensions are hard-coded relative to a 960×500 canvas, centered on a white background.
AI-generated descriptionThe first assignment: Tweak a Face
Start with the blank html project This is a panda face!
- use two arcs to make the eyes
- use two ellipse to make the eye sockets
- use one arc to make the nose
- use two circles to implement the flush
- use two arcs to implement the mouse
- use two arcs to implement the ears
MIT Licensed