Tweak a Face Assignment by Enze Liu
✓ Published12🌍 Public
This example shows a panda face built entirely from geometric primitives, with each facial feature drawn using D3’s arc generator alongside SVG circles and ellipses. The face uses arcs for the eyes, nose, mouth, and ears, while ellipses form the eye sockets and circles add the blush. The code imports React and ReactDOM to render the SVG, relying on D3 v6’s `arc` function with explicit inner and outer radii plus start and end angles. Transformations such as rotations and translations position each part symmetrically around the canvas center.
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