this.stars.push(new Star(0, 0));
var origin:Vector2D = new Vector2D(0, 0);
var stl = [];
var v = new Vector2D(0, 1);
var sp = 4;
var rad = 2.0 * Math.PI / sp;
for (var i = 0; i < sp; ++ i) {
var g = rad * i;
var ttt = v.clone();
ttt.rotate(g);
stl.push(ttt);
}
// var stl = [new Vector2D(0,1), new Vector2D(-1,0), new Vector2D(0,-1), new Vector2D(1,0)];
var vx = [-1, 1, 1, -1];
var vy = [-1, -1, 1, 1];
var fib = [1, 2, 3, 5, 8, 13, 21];
// fib = [1, 2, 3, 4, 5, 6, 7, 8];
var temp:Vector2D = new Vector2D();
var prev:Vector2D = new Vector2D();
for (var i = 0; i < stl.length; ++ i) {
// console.log("------------------");
var s = stl[ i ];
// console.log(s.toString());
for (var j = 0; j < fib.length; ++ j) {
temp.set45Vector();
var vecx = vx[(i+j) & 3];
var vecy = vy[(i+j) & 3];
temp.scaleByXY(vecx * fib[ j ], vecy * fib[ j ]);
this.stars.push(new Star(s.X, s.Y));
s.copyTo(prev);
s.transform(temp);
var circleCoordinate:Vector2D = prev.cal45CircleCoordinate(s, (vecy/vecx) > 0);
// console.log("circle coordinate", circleCoordinate.toString());
var size = 7;
var rad:number = Math.PI / 2 / size;
if (j > -1) {
for (var k = 1; k <= size; ++ k) {
var tt:Vector2D = prev.clone();
tt.transform(circleCoordinate, false);
tt.rotate(rad * k);
tt.transform(circleCoordinate, true);
this.stars.push(new Star(tt.X, tt.Y));
// console.log("tt = ", tt.toString());
}
}
// console.log(s.toString());
}
}