Annotation of researchv10no/cmd/ideal/lib/Arc, revision 1.1

1.1     ! root        1: .IS
        !             2: arc {
        !             3:        var radius, center,
        !             4:        start, midway, end,
        !             5:        startang, midang, endang;
        !             6:        var a1, b1, c1,
        !             7:        a2, b2, c2;
        !             8:        a1 = 2*(re(end)-re(start));
        !             9:        b1 = 2*(im(end)-im(start));
        !            10:        c1 = -re(start)*re(start) - im(start)*im(start)
        !            11:        + re(end)*re(end) + im(end)*im(end);
        !            12:        a2 = 2*(re(end)-re(midway));
        !            13:        b2 = 2*(im(end)-im(midway));
        !            14:        c2 = -re(midway)*re(midway) - im(midway)*im(midway)
        !            15:        + re(end)*re(end) + im(end)*im(end);
        !            16:        a1*re(center) + b1*im(center) = c1;
        !            17:        a2*re(center) + b2*im(center) = c2;
        !            18:        startang = atan2 (start - center);
        !            19:        midang = atan2 (midway - center);
        !            20:        endang = atan2 (end - center);
        !            21:        radius = abs (start - center);
        !            22:        radius = abs (midway - center);
        !            23:        radius = abs (end - center);
        !            24:        start = center + abs(radius)*cis(startang);
        !            25:        end = center + abs(radius)*cis(endang);
        !            26:        midway = center + abs(radius)*cis(midang);
        !            27:        midway ~ start;
        !            28: }
        !            29: .IE

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.