SRL Archive - OSR Help

Question about TPAs


TomTuff

2010-10-27 10:18:30

So I've been watching MSI run a bit, and first off the TPA debugging screen is awesome hahaha

anyways, i see that the dot arrangements are not completely filled scattered points…
So my question is, when you define a TPA, say with this line (taken from my stiles fisher)
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 13158866, MSX1, MSY1, MSX2, MSY2, 2);
then split it into an ATPA
ATPA := TPAToATPAEx(TPA, 5, 5); 
should the size paramaters be a solid block of valid pixels that will be of that size, or should they be of a larger part with out every pixel being a valid color?
confusing question, sorry if i hurt anyone's head

NCDS

2010-10-27 20:31:13

When you Split it, it just groups all the points into little 5x5 boxes. Note that they are not always 5x5 because not all the points will fit that way every time.

So you then have an Array of the little boxes (tpa's), also known as an atpa (array of TPointArray);

Nava2

2010-10-28 00:22:20

TPAToATPA merely splits them into 5x5 boxes. It will attempt to create the largest groups in the boxes, as well.

SplitTPA will create ATPA's with points that are only 5x5 pixels away from at least one of the other points in the currently looked at TPA.