JSFiddle - React, Tailwind, and code Playground

by glebm

HTML

<div id='justin' style='width: 640px; height: 480px; background-color: #ccf' />

CoffeeScript

p = Raphael document.getElementById 'justin'


plumpness = 1.2

# Points (bezier c1, bezier c2, coordinates (relative from preceding point))
leftBelly  = [plumpness/2 * -197, -157,  plumpness * -87, -271, 54, -360]  
leftNeck   = [(2.0 - plumpness) * 92, -77, 80, -49, 5, -191]  
head       = [-56, -244, 341, -298, 294, -22]
rightNeck  = [(2.0 - plumpness) * -50, 136, -60, 141, 25, 214]
rightBelly = [plumpness * 104, 129, 120, 276, 10, 364]
bottom     = [-200, plumpness/2 * 70, -150, plumpness/2 * 60, -390, -5]  


s = "M 140, 350"
s += "c#{i / 3.0 for i in leftBelly.concat(leftNeck, head, rightNeck, rightBelly, bottom)}"
s += "z"

p.path(s).attr(fill: '#cfb')