Notes:
An ellipse is an oval. We used the mathematical definition of an ellipse, iterated over small increments, to create the shape. If increments are larger, the image evolves to a angular-type shape.
The equation of an ellipse is:
TNTEllipse Features and Usage:
| Primary Attributes: |
7 Parameters:
|
|---|---|
| To Create: |
The examples above were created by:
//origin is already defined;
//you can piggyback on it to make
//another variable
var center = origin;
var radius = 10;
var ptC = new TNTPoint(-5, 12);
//this is another way of changing
//the stroke thickness;
blueStroke.setStrokeLineWidth(1);
//easier way to set the stroke thickness
//blueStroke.lineWidth = 1;
var myEllipse = new TNTEllipse(center, 18,
12, green, blueStroke, 200, 30);
myEllipse.drawTNTEllipse(context);
var lemon = new TNTEllipse(ptC, 8,
4, yellow, null, 5, 0);
lemon.showPoints = true;
lemon.showCenter = true;
lemon.drawTNTEllipse(context);
|
| To Draw: | myEllipse.drawTNTEllipse(context); |
| Comments: |
Set width = height for a circle |
