Notes:
If you saw TNTSine or TNTCosine, you noticed they look basically the same. They are. Together they are known as 'sinusoids' (sine-like) and this is a generalization of that concept. Note that the image may be rotated too. We are modeling the equation below from trigonometry:
y = a*sin(b*(x-d)) + c in [x0, xf]
b = 2π/period
TNTSinusoid Features and Usage:
| Primary Attributes: |
8 Parameters:
|
|---|---|
| To Create: |
The examples above were created by:
var a = 4;
var p = 8;
var c = 0;
var d = 0;
var x0 = 0;
var xf = 16;
var rotn = 0;
//TCAGraphic Objects
var mySinusoid = new TNTSinusoid(a, p, c, d, x0, xf, navyStroke, rotn);
mySinusoid.drawTNTSinusoid(context);
var blueWave = new TNTSinusoid(a, p / 2, c, d, 0, 16, blueStroke, 150);
blueWave.drawTNTSinusoid(context);
|
| To Draw: | mySectorPetal.drawTNTSectorPetal(context); |
