Skip to main content
100%

Tweak a Face Assignment by Enze Liu

✓ Published1🌍 Public
NNita
Last edited Sep 1, 2020
Created on Sep 1, 2020

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 description

The first assignment: Tweak a Face

Start with the blank html project This is a panda face!

  1. use two arcs to make the eyes
  2. use two ellipse to make the eye sockets
  3. use one arc to make the nose
  4. use two circles to implement the flush
  5. use two arcs to implement the mouse
  6. use two arcs to implement the ears
MIT Licensed

Similar vizzes