Skip to main content
Public

Share visualization

Loading preview…

Fork of Tweak a Face Assignment by Enze Liu

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Tweak a Face Assignment by Enze Liu

0
HHarshinireddyy19
Last edited Jun 18, 2022
Created on Jun 18, 2022

This example shows a panda face constructed from basic geometric shapes, using D3’s `arc` generator to create the eyes, nose, mouth, and ears, and SVG primitives like `circle` and `ellipse` for the face, eye sockets, and blush. The drawing is rendered as an SVG canvas inside a React component, with the D3 arcs positioned via `transform` rotations and translations. The code imports React, ReactDOM, and the `arc` function from D3 v6, and computes each shape’s path with `d3.arc()` before assigning the resulting `d` attribute to SVG `path` elements.

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

Comments

Sign in to join the discussion.

MIT Licensed