Your browser does not support HTML5 Canvas

Notes:

This new 'variant' was based on inspiration provided by a 1950s-like 'retro' pattern on a shirt. It is based on a TCAWheel without a rim. The little end dots on some radii are based on a probability parameter.

Each time you load this page, the pattern will be different - a look at the source code will tell you why!

TNTRetroStar Features and Usage:
Primary Attributes:

6 Parameters:

  • center: TNTPoint
  • radius: an 'double'
  • numSpokes: a positive integer ≥ 2
  • stroke: a TNTStroke: to set the radii color and weight
  • rotn: a 'double' that rotates the shape about its center. rotn > 0 ==> counter-clockwise; rotn < 0 ==> clockwise
  • probDot: The probability (in [0,1]) that a radius will have a little dot on the end of it
To Create:

The randomly-generatred pattern above was created by:

var myBlackStroke = new TNTStroke(black, .1);

for(var x = XMIN; x < XMAX; x += 6){
    for(var y = YMAX; y > YMIN; y -= 6){
        var anX = x + 3;
        var anY = y - 3;
        var center = new TNTPoint(anX, anY);
        if(Math.random() < .8){
            //do nothing
        }else{
            if(Math.random() < 1){
                var rayLen = addRandomJitterAbout(1.5, -.5, .5);
                anX = addRandomJitterAbout(anX, -1, 1);
                anY = addRandomJitterAbout(anY, -1, 1);
                var rotn = 0;
                center = new TNTPoint(anX, anY);
                var aStar = new TNTRetroStar(center, rayLen, 8, myBlackStroke, rotn, .125);
                aStar.drawTNTRetroStar(context);
            }
        }
    }
}
                                    
To Draw:
aStar.drawTNTRetroStar(context);
Comments:
shirtPattern
Retro Shirt Pattern

At the labs, we are always on the look out for interesting patterns that we see in 'the real world' and challenge ourselves to see if they can be recreated in code!

The image to the right is a re-creation of the retro pattern that we were originally inspired by!

You can see the TNTRetroDiamond at its own landing page.

Even More: