/* Explanatory note for ctr807.aml /* ctr807.aml created by Bill Beeman 12/14/94 /* /* Eugene G. Ellis */ /* Thu Dec 15 14:49:55 MST 1994 */ The following equations are used to determine the color shades in the ctr807.shd shadeset that is produced by ctr807.aml. <------ L ------> <------ L ------> -----------------------------------| | | --------- | --------- | | | | | | | |<- l ->| | |<- l ->| | | | | | | | | |<-- x -->| | | --------- | --------- | | | -----------------------------------| | | --------- | --------- | | | | | | | |<- l ->| | |<- l ->| | | | | | | | | |<-- x -->| | | --------- | --------- | | | -----------------------------------| The side of each large cell is: L The side of each small cell is: l The distance between two small cells is: x L = l + 2(x/2) = l + x [Exponents are expressed by the exp() function; e.g., 'Z(exp(2))' means 'Z' to the power of '2', in other words, 'Z squared'.] The area of each large cell is: L(exp(2)) The area of each small cell is: l(exp(2)) L(exp(2)) = (l + x)exp(2) The percentage (s = percent saturation) of the area within a large cell that is filled by a small cell is: s = l(exp(2)) / (l + x)exp(2) (1) l(exp(2)) = s(l(exp(2)) + 2xl + x(exp(2))) (2) 0 = s(x(exp(2))) + 2slx + s(l(exp(2))) - l(exp(2)) [Solve for x by determining the roots of the quadratic equation.] (3) x = (-2sl +- ((2sl)exp(2) - 4s(s(l(exp(2))) - l(exp(2)))exp(1/2)) / 2s (4) x = (-2sl +- (4((s)exp(2))((l)exp(2)) - 4((s)exp(2))((l)exp(2)) + 4s((l)exp(2)))exp(1/2)) / 2s (5) x = (-2sl +- (4s((l)exp(2)))exp(1/2)) / 2s (6) x = (-2sl +- (2l((s)exp(1/2)))) / 2s (7) x = (-sl +- (l((s)exp(1/2)))) / s [But only positive values are needed, so ...] (8) x = (-sl + (l((s)exp(1/2)))) / s (9) x = (l((s)exp(1/2)) / s) - l This final formula is used to determine the separation between cells with sides of 'l'.