Your browser does not support HTML5 Canvas

Notes:

A lovely quadratic function! Relish the moment!

y = ax2 + bx + c in [x0, xf]
                        

As lovely as it is, some novices had trouble crafting one to their designs. Therefore we created TNTArch which is the same shape but the parameters are easier to adjust. Try it out!

TNTParabola Features and Usage:
Primary Attributes:

8 Parameters:

  • a: a real number; controls the concavity (up or down arch/parabola) and the width of the arch/parabola. The larger the a, the more narrow the arch!
  • b: a real number; helps control the location of the 'vertex' of the parabola (along with a): it's highest or lowest value.
  • c: a real number; marks where the arch crosses the y-axis
  • x0: a real number; where the arch begins
  • xf: a real number; where the arch ends
  • fillColor: TNTColor as fcolr
  • borderStroke: a TNTStroke: to set the circle border color as well as the thickness of the perimeter
  • rotn: a 'double' that rotates the shape about its center. rotn > 0 ==> counter-clockwise; rotn < 0 ==> clockwise
To Create:

The example above was created by:

//special points/components
var a = .25;
var b = 2;
var c = -6;
var x0 = -8;
var xf = 5;
var fcolr = yellow;
var scolr = navyStroke;
var rotn = 0;
var myParabola = new TNTParabola(a, b, c, x0, xf, fcolr, scolr, rotn);
myParabola.drawTNTParabola(context);
                                    
To Draw:
myParabola.drawTNTParabola(context);