Please I really need help on this on, I am cracking my head over it.
Bresenham algo is also not the way to go, because it is for circle's and
to complex!
I can only get one ring, arggggggg!!!!
If I go one ring further then it results in many double values,
calculate allready when doing the first ring.
Here is the code..
var row = 0;
var c:Number = 3;
var ring:Number = 1;
//take start pos [2,2]
var x:Number = 2;
var y:Number = 2;
//
while (row<c) {
for (var i:Number = 0; i<c; i++) {
var rowID:Number = (x-ring)+i;
var colID:Number = (y-ring)+row;
if (rowID<0 || colID<0 /* || (rowID == sR && colID == sC)*/) {
continue;
}
trace('['+colID+','+rowID+']');
}
row++;
}
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com