Your browser does not support HTML5 Canvas

Notes:

Self descriptive, we hope. Made from a couple of TNTCircleSegments.

This shape was wonderfully utilized in this challenge: Square After-Image Challenge.

TNTTwoTonedDisk Features and Usage:
Primary Attributes:

7 Parameters:

  • center: TNTPoint
  • radius: a decimal (known as a 'double' in code)
  • 2 fillColors: TNTColor (can be null for a framework image)
  • 2 borderColors: a TNTStroke: to set the border color as well as the thickness of the sides
  • rotn: (in degrees, about the center); Positive angles are counter-clockwise; negative angles are clockwise
To Create:

The example above was created by:

var center = new TNTPoint(1, -5);
var radius = 8;
var fcolr1 = yellow;
var fcolr2 = black;
goldStroke.lineWidth = 3;
var stroke1 = goldStroke;
var stroke2 = null;
var rotn = 45;
var myDisk = new TNTTwoTonedDisk(center, 
    radius, fcolr1, fcolr2, stroke1, 
    stroke2, rotn);
myDisk.showCenter = true;
myDisk.drawTNTTwoTonedDisk(context);
                                    
To Draw: myDisk.drawTNTTwoTonedDisk(context);
Comments:

This is another situation where a 'cool' shape was made on the foundation of another one, the TNTCircleSegment. It's like software is building software!

Interesting effects can be produced when these babies are tiled in the plane with the rotation angles tweaked based on their position or the number of disks tiling the canvas.