Christophe Viau implemented a new shape type for D3.js based on superformulas. One nice property of these shapes is that you can easily tween between two shapes by simply interpolating the control points. Click on the blue shapes to try it!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// demo.js | |
// | |
// Adapted by Kai Chang and Rich Morin from http://bl.ocks.org/1653763 | |
window.onload = function() { | |
var w = $('#chart').width(), | |
h = (w * 0.45); | |
proj = { |
NewerOlder