siteIcon

Tech Novice Tools

JS Grafix Sandbox

burgerIcon
spiral

JSGrafix Sandbox (JSGS)

TNT PWave

Your browser does not support HTML5 Canvas

Notes:

Study the source code on this and maybe you'll see how it got its name?

Our lovely shape comes from, once more, parametric equations:

x = a*cos(t), 
y = b*sin(n*t)
    	

Features and Usage:

Primary Attributes:

7 parameters:
center(TNTPoint), a(double), b(double), n(double), fillColor(TNTColor), borderColor(TNTStroke), rotationInDegrees(double)

a, b and n influence the shape of the graph given the parametric definitions above. Experiment! You can do this easily at: Anime-TNTPWave.

To Create:

var ptA = new TNTPoint(0, 10);
darkGrayStroke.setStrokeLineWidth(.1);
var crown = new TNTPWave(ptA, 15, 3, 8, gold, darkGrayStroke, 10);

To Draw:

crown.drawTNTPWave(context);

Comments:

The larger the value of 'n', the higher the frequency of the 'bumps' in the wave.

Even More:

Could you coax a circle out of this shape?!