Created
July 29, 2012 10:14
-
-
Save roundrobin/3197240 to your computer and use it in GitHub Desktop.
just another inlet to tributary
This file contains 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
trib.x = 205 | |
trib.y = 100 | |
var freq = 0.32256 | |
var scale = d3.scale.category20() | |
var text = g.append('text') | |
var string1 = 'tribuatry' | |
for (var i=1; i <= string1.length; i++) { | |
text.append('tspan') | |
.text(string1.charAt(i-1)) | |
.attr('class','char letter'+i) | |
.attr('font-size',109*Math.sin(i*freq)) | |
.attr('dominant-baseline','hanging') | |
.attr('fill',scale(i)) | |
} | |
text.attr('transform','translate('+trib.x+','+trib.y+')') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment