<! DOCTYPE html>
<meta charset= "Utf-8" >
<meta http-equiv= "x-ua-compatible" content= "ie=edge,chrome=1" >
<title>Examples</title>
<meta name= "description" content= "" >
<meta name= "keywords" content= "" >
<link href= "" rel= "stylesheet" >
<body>
<!--pattern Brush--
<svg xmlns= "Http;//www.w3.org/2000/svg" width= "height=" >
<defs>
<pattern id= "grid" x= "0" y= "0" width= "" "Height=" patternunits= "" Userspaceonuse ">
<path stroke= "#F0F0F0" fill= "None" D= "M 0 0,h 20,v" ></path>
</pattern>
</defs>
<rect width= "height=" "fill=" url (#grid) ></rect>
<text id= "Sintext" x= ' y= ' "style=" font-size:14px;font-family: ' Arial '; >
</text>
<path d= "M 0,v 200,m 0 160,h" transform= "Translate (0,60)" stroke= "Red" ></path>
</svg>
<script type= "Text/javascript" >
var text = ' abcdefghijklmnopqrstuvwxyz ';
var n = text.length;
var x = [];
var i = n;
var y = null;
var s = 100,w = 0.02,t = 0;
while (i--) {
X.push (10);
var Tspan = document.createelementns (' http://www.w3.org/2000/svg ', ' Tspan ');
Tspan.textcontent = text[n-i-1];
Sintext.appendchild (Tspan);
var h = math.round (360/26 * i);
Tspan.setattribute (' Fill ', ' HSL (' + H + ', 100%,80%) ');
}
function Arrange (t) {
y = [];
var ly = 0,cy;
for (i = 0;i < n; ++i) {
cy =-S * Math.sin (w* i *20 +t);
Y.push (cy-ly);
ly = cy;
}
Console.table (y);
}
function render () {
Sintext.setattribute (' DX ', X.join ('));
Sintext.setattribute (' Dy ', Y.join ('));
}
function frame () {
T + = 0.01;
Arrange (t);
Render ();
Requestanimationframe (frame);
}
Arrange (0);
Render ();
Frame ();
</script>
</body>
SVG wavy Text