This package is made for demonstration purposes and not a serious package.

The portrait is an R-package that draws faces by defining its facial components.

Installation

# install.packages("remotes")
remotes::install_github("emitanaka/portrait")

Getting started

Draw a standard face:

Change eye color:

face() + sketch_eyes(fill = "blue", size.outline = 3)

Change eye color and sad face:

face() + 
  sketch_eyes(fill = "blue", size.outline = 3) +
  sketch_mouth(smile = -1)

Make it into a cat face:

face() + 
  cat_eyes() +
  cat_whiskers() +  
  cat_shape() +
  cat_nose() +
  sketch_mouth(smile = 0.4)