예제 #1
0
    def path_SNE(cls):
        #M 47.333858,183.4622 C 47.333858,187.24153 47.333858,191.02087 47.333858,194.8002 48.075458,194.16213 48.84201,193.52406 49.733858,192.88599

        #z0 = P(0, -0)
        #c0 = P(0, -1.32828)
        #c1 = P(0, -2.65657)
        #z1 = P(0, -3.98485)
        #c2 = P(0.260643, -3.7606)
        #c3 = P(0.530055, -3.53634)
        #z2 = P(0.843504, -3.31208)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -1.32828)
        #z1 = z0 + P(0, -3.98485)
        #c1 = z1 + P(0, 1.32828)
        #c2 = z1 + P(0.260643, 0.224256)
        #z2 = z1 + P(0.843504, 0.672768)
        #c3 = z2 + P(-0.313449, -0.224256)

        z0 = P(0, -0)
        c0 = z0 + PP(1.32828, -90)
        z1 = z0 + PP(3.98485, -90)
        #z1 = z2 - PP(1.07894, ta + 362)
        c1 = z1 + PP(1.32828, 90)
        c2 = z1 + PP(0.343839, 40)
        z2 = z1 + PP(1.07894, 38)
        c3 = z2 + PP(0.38541, -144)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            #curve(),
            endknot(*z2)])
예제 #2
0
파일: nu.py 프로젝트: Wyess/text2shorthand
    def path_ELCLswl(cls, ta=None, **kwargs):
        #M 47.3414,375.334 C 53.4875,377.331 70.874128,380.65719 69.849,375.334 68.700108,369.36814 59.834825,375.60022 58.0034,377.77

        #z0 = P(0, -0)
        #c0 = P(2.16011, -0.701865)
        #c1 = P(8.27081, -1.87089)
        #z1 = P(7.91052, -0)
        #c2 = P(7.50673, 2.09676)
        #c3 = P(4.39094, -0.0935656)
        z2 = P(3.74727, -0.856156)

        #z0 = P(0, -0)
        #c0 = z0 + P(2.16011, -0.701865)
        #z1 = z0 + P(7.91052, 0)
        #c1 = z1 + P(0.360291, -1.87089)
        #c2 = z1 + P(-0.403789, 2.09676)
        #z2 = z1 + P(-4.16325, -0.856156)
        #c3 = z2 + P(0.643672, 0.762591)

        z0 = P(0, -0)
        c0 = z0 + PP(2.27127, -18)
        z1 = z0 + PP(7.91052, 0)
        #z1 = z2 - PP(4.25037, ta + -37)
        c1 = z1 + PP(1.90526, -79)
        #c2 = z1 + PP(2.13529, 100)
        #z2 = z1 + PP(4.25037, -168)
        #c3 = z2 + PP(0.997927, 49)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            #controlcurve(c2, c3),
            curve(),
            endknot(*z2, angle=ta)])
예제 #3
0
    def path_ESWRUNER(cls, ta=None, **kwargs):
        #M 247.43012,512.55114 C 254.26421,512.80339 268.95861,512.01784 271.73901,512.6038 280.08844,514.3634 275.51225,526.57522 263.86629,531.19863 261.72633,532.04819 257.71063,532.03128 257.15908,529.81618 256.34653,526.5529 262.29873,521.29149 264.93141,523.38392 266.57347,524.689 264.76781,527.36851 262.11729,529.01215

        z0 = P(0, -0)
        c0 = P(2.41092, -0.0889882)
        c1 = P(7.59477, 0.188136)
        z1 = P(8.57564, -0.0185773)
        c2 = P(11.5211, -0.639325)
        c3 = P(9.90675, -4.94738)
        z2 = P(5.79832, -6.57842)
        c4 = P(5.04339, -6.87813)
        c5 = P(3.62674, -6.87216)
        z3 = P(3.43216, -6.09072)
        c6 = P(3.14551, -4.93951)
        c7 = P(5.24532, -3.0834)
        z4 = P(6.17407, -3.82156)
        c8 = P(6.75335, -4.28197)
        c9 = P(6.11635, -5.22724)
        z5 = P(5.18131, -5.80708)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            controlcurve(c6, c7),
            knot(*z4),
            controlcurve(c8, c9),
            endknot(*z5)
        ])
예제 #4
0
파일: nu.py 프로젝트: Wyess/text2shorthand
    def path_ELCLne(cls, ta=None, **kwargs):
        #M 47.3414,176.955 C 53.5111,178.959 69.9338,182.397 69.9338,176.955 69.9338,171.43531 60.255705,177.62646 58.0434,179.401

        #z0 = P(0, -0)
        #c0 = P(2.1684, -0.704326)
        #c1 = P(7.94032, -1.91264)
        #z1 = P(7.94032, -0)
        #c2 = P(7.94032, 1.93995)
        #c3 = P(4.53886, -0.235991)
        z2 = P(3.76132, -0.859671)

        #z0 = P(0, -0)
        #c0 = z0 + P(2.1684, -0.704326)
        #z1 = z0 + P(7.94032, 0)
        #c1 = z1 + P(0, -1.91264)
        #c2 = z1 + P(0, 1.93995)
        #z2 = z1 + P(-4.179, -0.859671)
        #c3 = z2 + P(0.777536, 0.62368)

        z0 = P(0, -0)
        c0 = z0 + PP(2.27992, -17)
        z1 = z0 + PP(7.94032, 0)
        #z1 = z2 - PP(4.2665, ta + -26)
        c1 = z1 + PP(1.91264, -90)
        #c2 = z1 + PP(1.93995, 90)
        #z2 = z1 + PP(4.2665, -168)
        #c3 = z2 + PP(0.996764, 38)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            #controlcurve(c2, c3),
            curve(),
            endknot(*z2, angle=ta+180)])
예제 #5
0
파일: aa.py 프로젝트: Wyess/text2shorthand
    def path_ELCLswl(cls, ta=None, **kwargs):
        #M 225.238,184.959 C 229.416,187.087 236.619,188.47943 236.619,184.959 236.619,182.37833 234.11177,185.39327 233.12902,187.01814

        #z0 = P(0, -0)
        #c0 = P(1.47391, -0.750711)
        #c1 = P(4.01496, -1.24193)
        #z1 = P(4.01496, -0)
        #c2 = P(4.01496, 0.910403)
        #c3 = P(3.13047, -0.153201)
        z2 = P(2.78378, -0.726419)

        #z0 = P(0, -0)
        #c0 = z0 + P(1.47391, -0.750711)
        #z1 = z0 + P(4.01496, 0)
        #c1 = z1 + P(0, -1.24193)
        #c2 = z1 + P(0, 0.910403)
        #z2 = z1 + P(-1.23119, -0.726419)
        #c3 = z2 + P(0.346692, 0.573218)

        z0 = P(0, -0)
        c0 = z0 + PP(1.65408, -26)
        z1 = z0 + PP(4.01496, 0)
        #z1 = z2 - PP(1.42951, ta + -27)
        c1 = z1 + PP(1.24193, -90)
        #c2 = z1 + PP(0.910403, 90)
        #z2 = z1 + PP(1.42951, -149)
        #c3 = z2 + PP(0.669906, 58)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            #controlcurve(c2, c3),
            curve(),
            endknot(*z2, angle=ta)])
예제 #6
0
    def path_SWNER(self, ta=None, **kwargs):
        #M 1013.36,-4.80571 C 1011.7633,-1.255503 1010.1667,2.1362823 1008.57,5.47059 1012.8,-0.569615 1019.65,-7.85871 1026.92,-7.85871

        #z0 = P(0, -0)
        #c0 = P(-0.56328, -1.25243)
        #c1 = P(-1.12653, -2.44898)
        #z1 = P(-1.68981, -3.62525)
        #c2 = P(-0.197556, -1.4944)
        #c3 = P(2.21897, 1.07703)
        z2 = P(4.78367, 1.07703)

        #z0 = P(0, -0)
        #c0 = z0 + P(-0.56328, -1.25243)
        #z1 = z0 + P(-1.68981, -3.62525)
        #c1 = z1 + P(0.56328, 1.17627)
        #c2 = z1 + P(1.49225, 2.13085)
        #z2 = z1 + P(6.47347, 4.70228)
        #c3 = z2 + P(-2.56469, 0)

        z0 = P(0, -0)
        c0 = z0 + PP(1.37327, -114)
        z1 = z0 + PP(3.99974, -114)
        #z1 = z2 - PP(8.00108, ta + 35)
        c1 = z1 + PP(1.30418, 64)
        c2 = z1 + PP(2.60141, 54)
        z2 = z1 + PP(8.00108, 35)
        c3 = z2 + PP(2.56469, 180)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            #curve(),
            endknot(*z2)])
예제 #7
0
    def add_head_circle(cls, paths, diameter=1.5):
        next_head_angle = degrees(
            atan2(*([
                coord / unit.length(1)
                for coord in paths[0].tangent(0).atend()[::-1]
            ])))

        if next_head_angle >= 0:
            a0 = -70 + next_head_angle
            ha = next_head_angle - 90
            ta = next_head_angle
        else:
            a0 = -70 + next_head_angle
            ha = next_head_angle - 90
            ta = next_head_angle

        z0 = P(*paths[0].at(diameter))

        circle = pyx.metapost.path.path([
            beginknot(*z0, angle=ha),
            curve(),
            knot(*PP(diameter * 0.7, a0)),
            curve(),
            endknot(0, 0, angle=ta)
        ])

        paths[0] = circle.joined(paths[0])

        return paths
예제 #8
0
    def barb(cls, paths, len_=2.0):
        next_head_angle = degrees(
            atan2(*([
                coord / unit.length(1)
                for coord in paths[0].tangent(0).atend()[::-1]
            ])))

        if next_head_angle >= 0:
            a0 = 30 + next_head_angle
            ha = next_head_angle + 80 + 180
            ta = next_head_angle + 180
        else:
            a0 = -30 + next_head_angle
            ha = next_head_angle + 80
            ta = next_head_angle + 180

        barb = pyx.metapost.path.path([
            beginknot(*PP(len_, a0), angle=ha),
            curve(),
            endknot(0, 0, angle=ta)
        ])

        paths[0] = barb.joined(paths[0])

        return paths
예제 #9
0
    def path_ESWRNEF(cls, ta=None, **kwargs):
        #M 314.72093,404.54721 C 321.88025,404.80857 337.47594,403.47755 340.18663,404.60177 348.4417,408.02538 348.35439,418.34006 333.04023,422.8395 330.71308,423.52323 323.86461,424.25335 325.4865,422.50868 326.6751,421.23013 329.26028,418.94349 331.09669,417.6196

        z0 = P(0, -0)
        c0 = P(2.52565, -0.092202)
        c1 = P(8.02746, 0.377352)
        z1 = P(8.98373, -0.0192476)
        c2 = P(11.8959, -1.22702)
        c3 = P(11.8651, -4.86581)
        z2 = P(6.46264, -6.45311)
        c4 = P(5.64168, -6.69432)
        c5 = P(3.22569, -6.95189)
        z3 = P(3.79785, -6.33641)
        c6 = P(4.21717, -5.88536)
        c7 = P(5.12916, -5.07869)
        z4 = P(5.777, -4.61165)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            controlcurve(c6, c7),
            endknot(*z4)
        ])
예제 #10
0
파일: aa.py 프로젝트: Wyess/text2shorthand
    def path_ELCLsl(cls, ta=None, **kwargs):
        #M 97.3523,184.959 C 101.53,187.087 108.733,188.51461 108.733,184.959 108.733,182.60147 105.99054,186.36208 105.60574,187.07331

        #z0 = P(0, -0)
        #c0 = P(1.4738, -0.750711)
        #c1 = P(4.01486, -1.25434)
        #z1 = P(4.01486, -0)
        #c2 = P(4.01486, 0.831684)
        #c3 = P(3.04738, -0.494975)
        z2 = P(2.91163, -0.745882)

        #z0 = P(0, -0)
        #c0 = z0 + P(1.4738, -0.750711)
        #z1 = z0 + P(4.01486, 0)
        #c1 = z1 + P(0, -1.25434)
        #c2 = z1 + P(0, 0.831684)
        #z2 = z1 + P(-1.10323, -0.745882)
        #c3 = z2 + P(0.135749, 0.250906)

        z0 = P(0, -0)
        c0 = z0 + PP(1.65398, -26)
        z1 = z0 + PP(4.01486, 0)
        #z1 = z2 - PP(1.33171, ta + -26)
        c1 = z1 + PP(1.25434, -90)
        #c2 = z1 + PP(0.831684, 90)
        #z2 = z1 + PP(1.33171, -145)
        #c3 = z2 + PP(0.285275, 61)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            #controlcurve(c2, c3),
            curve(),
            endknot(*z2, angle=ta)])
예제 #11
0
    def path_ERswr(cls, ta=35, **kwargs):
        #M 317.468,54.1384 C 325.713,50.6385 334.24004,48.203792 339.06323,53.417218

        #z0 = P(0, -0)
        #c0 = P(2.90865, 1.23469)
        #c1 = P(5.9168, 2.0936)
        z1 = P(7.61832, 0.254417)

        #z0 = P(0, -0)
        #c0 = z0 + P(2.90865, 1.23469)
        #z1 = z0 + P(7.61832, 0.254417)
        #c1 = z1 + P(-1.70151, 1.83918)

        z0 = P(0, -0)
        c0 = z0 + PP(3.15986, 23)
        z1 = z0 + PP(7.62256, 1)
        #c1 = z1 + PP(2.50554, 132)
        c1 = z1 + PP(2.50554, ta + 180)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            #curve(),
            endknot(*z1)
        ])
예제 #12
0
    def path_SER(cls,
                 ha=-30,
                 tn=1.5,
                 ta=-140,
                 d=-60,
                 dz=P(0, 0),
                 before=None,
                 after=None):
        if before:
            if before.tail_type == 'NER':
                ha = 0
                tn = 1.5
                d = -60

        if after:
            if after.head_type in {'SWR', 'S', 'SR', 'SE'}:
                ta = 160
            elif after.head_type == 'SW':
                ta = after.head_angle
            elif after.head_type in {'NER'}:
                ta = -120
            elif after.head_type in {'SEL', 'N'}:
                ta = -90
            elif before and before.tail_type == 'NER':
                ta = -90

        return path([
            beginknot(0, 0, angle=ha),
            tensioncurve(tn),
            endknot(*(PP(16, d) + dz), angle=ta)
        ])
예제 #13
0
파일: aa.py 프로젝트: Wyess/text2shorthand
    def path_ELCLne(cls, ta=None, **kwargs):
        #M 247.385,116.908 C 251.563,119.037 258.22286,120.38727 258.766,116.908 259.05209,115.07532 254.5416,118.20948 253.56942,118.91402

        #z0 = P(0, -0)
        #c0 = P(1.47391, -0.751064)
        #c1 = P(3.82336, -1.22741)
        #z1 = P(4.01496, -0)
        #c2 = P(4.11589, 0.646529)
        #c3 = P(2.52469, -0.459133)
        #z2 = P(2.18173, -0.707679)

        #z0 = P(0, -0)
        #c0 = z0 + P(1.47391, -0.751064)
        #z1 = z0 + P(4.01496, 0)
        #c1 = z1 + P(-0.191608, -1.22741)
        #c2 = z1 + P(0.100926, 0.646529)
        #z2 = z1 + P(-1.83324, -0.707679)
        #c3 = z2 + P(0.342963, 0.248546)

        z0 = P(0, -0)
        c0 = z0 + PP(1.65424, -27)
        z1 = z0 + PP(4.01496, 0)
        #z1 = z2 - PP(1.96509, ta + -13)
        c1 = z1 + PP(1.24227, -98)
        c2 = z1 + PP(0.654359, 81)
        z2 = z1 + PP(1.96509, -158)
        c3 = z2 + PP(0.423555, 35)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            #curve(),
            endknot(*z2)])
예제 #14
0
    def path_ECLsw(cls, ta=None, **kwargs):
        z0 = P(0, 0)
        c0 = z0 + PP(2.49235, 3)
        z1 = z0 + PP(7.47197, 0)
        c1 = z1 + PP(2.49235, 176)
        c2 = z1 + PP(0.262126, -2)
        z2 = z1 + PP(0.697396, 45)
        c3 = z2 + PP(0.275834, -96)
        c4 = z2 + PP(0.531693, 83)
        # z3 = z2 + PP(0.700622, 148)
        z4 = P(7.06329, 0.0202441)
        z3 = z4 - PP(0.896623, ta)
        c5 = z3 + PP(0.295579, 70)
        # c6 = z3 + PP(0.299059, -109)
        # c7 = z4 + PP(0.29924, 74)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            roughknot(*z3, rangle=ta),
            curve(),
            endknot(*z4, ta)
        ])
예제 #15
0
파일: so.py 프로젝트: Wyess/text2shorthand
    def path_SWRNE(cls, ta=None, **kwargs):
        #M 315.718,213.047 C 315.718,223.039 301.271,246.563 293.041,252.325 294.93701,251.22013 296.12792,250.53691 297.56769,249.56303

        #z0 = P(0, -0)
        #c0 = P(0, -3.52496)
        #c1 = P(-5.09658, -11.8237)
        #z1 = P(-7.99994, -13.8564)
        #c2 = P(-7.33107, -13.4666)
        #c3 = P(-6.91094, -13.2256)
        #z2 = P(-6.40303, -12.882)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -3.52496)
        #z1 = z0 + P(-7.99994, -13.8564)
        #c1 = z1 + P(2.90336, 2.03271)
        #c2 = z1 + P(0.66887, 0.389774)
        #z2 = z1 + P(1.59692, 0.974362)
        #c3 = z2 + P(-0.507919, -0.343563)

        z0 = P(0, -0)
        c0 = z0 + PP(3.52496, -90)
        z1 = z0 + PP(16, -119)
        #z1 = z2 - PP(1.8707, ta + 356)
        c1 = z1 + PP(3.54421, 34)
        c2 = z1 + PP(0.774152, 30)
        z2 = z1 + PP(1.8707, 31)
        c3 = z2 + PP(0.613202, -145)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            #curve(),
            endknot(*z2)])
예제 #16
0
파일: so.py 프로젝트: Wyess/text2shorthand
    def path_template(cls, ha=34, tn=1.6, ta=90, d=45, dz=P(0, 0)):
        z0 = P(0, 0)
        z1 = PP(16, d) + dz

        return pyx.metapost.path.path([
            beginknot(*z0, angle=ha),
            tensioncurve(tn),
            endknot(*z1, angle=ta)])
예제 #17
0
파일: so.py 프로젝트: Wyess/text2shorthand
    def path_template_reversed(cls, ha=-90, tn=1.6, ta=180, d=-120, dz = P(0, 0)):
        z0 = P(0, 0)
        z1 = PP(16, d) + dz

        return pyx.metapost.path.path([
            beginknot(*z0, angle=ha),
            tensioncurve(tn),
            endknot(*z1, angle=ta)])
예제 #18
0
    def path_SELCLsw(cls, ta=None, **kwargs):
        #M 47.3414,447.917 C 47.3414,458.502 50.1558,464.258 59.6556,464.258 60.7666,464.258 60.949914,463.41631 60.938405,462.80728 60.914052,461.51865 59.985014,461.08877 59.498616,461.84565 59.065229,462.52004 58.888305,463.2158 58.438665,464.22457

        #z0 = P(0, -0)
        #c0 = P(0, -3.7202)
        #c1 = P(0.989149, -5.74321)
        #z1 = P(4.32795, -5.74321)
        #c2 = P(4.71842, -5.74321)
        #c3 = P(4.78285, -5.44739)
        #z2 = P(4.7788, -5.23334)
        #c4 = P(4.77024, -4.78043)
        #c5 = P(4.44372, -4.62935)
        #z3 = P(4.27277, -4.89536)
        #c6 = P(4.12046, -5.13238)
        #c7 = P(4.05827, -5.37691)
        z4 = P(3.90024, -5.73146)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -3.7202)
        #z1 = z0 + P(4.32795, -5.74321)
        #c1 = z1 + P(-3.3388, 0)
        #c2 = z1 + P(0.390472, 0)
        #z2 = z1 + P(0.450854, 0.50987)
        #c3 = z2 + P(0.00404495, -0.21405)
        #c4 = z2 + P(-0.0085591, 0.452902)
        #z3 = z2 + P(-0.506028, 0.337974)
        #c5 = z3 + P(0.170949, 0.266013)
        #c6 = z3 + P(-0.152318, -0.237021)
        #z4 = z3 + P(-0.37253, -0.836095)
        #c7 = z4 + P(0.15803, 0.354542)

        z0 = P(0, -0)
        c0 = z0 + PP(3.7202, -90)
        z1 = z0 + PP(7.19135, -52)
        c1 = z1 + PP(3.3388, 180)
        c2 = z1 + PP(0.390472, 0)
        z2 = z1 + PP(0.680615, 48)
        c3 = z2 + PP(0.214088, -88)
        c4 = z2 + PP(0.452983, 91)
        #z3 = z2 + PP(0.608515, 146)
        z3 = z4 - PP(0.915332, ta + 1)
        c5 = z3 + PP(0.316207, 57)
        #c6 = z3 + PP(0.281744, -122)
        #z4 = z3 + PP(0.915332, -114)
        #c7 = z4 + PP(0.388167, 65)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #19
0
    def path_SELCLsel(cls, ta=None, **kwargs):
        #M 140.025,358.129 C 140.025,368.714 142.839,374.47 152.339,374.47 153.45,374.47 153.78658,373.83086 153.722,373.225 153.65792,372.6239 153.26897,371.40064 152.47631,371.57978 151.38021,371.82751 150.71553,373.35163 150.62075,374.40158

        #z0 = P(0, -0)
        #c0 = P(0, -3.7202)
        #c1 = P(0.989008, -5.74321)
        #z1 = P(4.32788, -5.74321)
        #c2 = P(4.71835, -5.74321)
        #c3 = P(4.83664, -5.51857)
        #z2 = P(4.81395, -5.30564)
        #c4 = P(4.79142, -5.09438)
        #c5 = P(4.65472, -4.66445)
        #z3 = P(4.37614, -4.72741)
        #c6 = P(3.9909, -4.81448)
        #c7 = P(3.75729, -5.35014)
        z4 = P(3.72398, -5.71916)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -3.7202)
        #z1 = z0 + P(4.32788, -5.74321)
        #c1 = z1 + P(-3.33887, 0)
        #c2 = z1 + P(0.390472, 0)
        #z2 = z1 + P(0.486069, 0.437568)
        #c3 = z2 + P(0.0226973, -0.212935)
        #c4 = z2 + P(-0.0225215, 0.211263)
        #z3 = z2 + P(-0.43781, 0.578229)
        #c5 = z3 + P(0.278588, 0.0629605)
        #c6 = z3 + P(-0.385235, -0.0870672)
        #z4 = z3 + P(-0.652155, -0.991749)
        #c7 = z4 + P(0.0333114, 0.369015)

        z0 = P(0, -0)
        c0 = z0 + PP(3.7202, -90)
        z1 = z0 + PP(7.19131, -52)
        c1 = z1 + PP(3.33887, 180)
        c2 = z1 + PP(0.390472, 0)
        z2 = z1 + PP(0.65401, 41)
        c3 = z2 + PP(0.214142, -83)
        c4 = z2 + PP(0.21246, 96)
        #z3 = z2 + PP(0.725277, 127)
        z3 = z4 - PP(1.18696, ta + -27)
        c5 = z3 + PP(0.285614, 12)
        #c6 = z3 + PP(0.394952, -167)
        #z4 = z3 + PP(1.18696, -123)
        #c7 = z4 + PP(0.370516, 84)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #20
0
    def path_SELCLser(cls, ta=None, **kwargs):
        #M 90.8486,358.129 C 90.8486,368.714 93.6629,374.47 103.163,374.47 104.274,374.47 104.57677,373.83334 104.546,373.225 104.47312,371.78403 101.00115,371.35458 100.85889,372.23568 100.66849,373.41493 102.7074,373.8678 103.7048,374.4076

        #z0 = P(0, -0)
        #c0 = P(0, -3.7202)
        #c1 = P(0.989114, -5.74321)
        #z1 = P(4.32802, -5.74321)
        #c2 = P(4.71849, -5.74321)
        #c3 = P(4.8249, -5.51945)
        #z2 = P(4.81409, -5.30564)
        #c4 = P(4.78847, -4.7992)
        #c5 = P(3.56821, -4.64826)
        #z3 = P(3.51822, -4.95793)
        #c6 = P(3.4513, -5.37239)
        #c7 = P(4.16789, -5.53156)
        z4 = P(4.51844, -5.72127)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -3.7202)
        #z1 = z0 + P(4.32802, -5.74321)
        #c1 = z1 + P(-3.3389, 0)
        #c2 = z1 + P(0.390472, 0)
        #z2 = z1 + P(0.486069, 0.437568)
        #c3 = z2 + P(0.0108144, -0.213807)
        #c4 = z2 + P(-0.0256144, 0.506443)
        #z3 = z2 + P(-1.29587, 0.347706)
        #c5 = z3 + P(0.0499987, 0.309671)
        #c6 = z3 + P(-0.066918, -0.414459)
        #z4 = z3 + P(1.00022, -0.763343)
        #c7 = z4 + P(-0.350546, 0.189718)

        z0 = P(0, -0)
        c0 = z0 + PP(3.7202, -90)
        z1 = z0 + PP(7.19139, -52)
        c1 = z1 + PP(3.3389, 180)
        c2 = z1 + PP(0.390472, 0)
        z2 = z1 + PP(0.65401, 41)
        c3 = z2 + PP(0.21408, -87)
        c4 = z2 + PP(0.50709, 92)
        #z3 = z2 + PP(1.34171, 164)
        z3 = z4 - PP(1.25823, ta + -8)
        c5 = z3 + PP(0.313682, 80)
        #c6 = z3 + PP(0.419827, -99)
        #z4 = z3 + PP(1.25823, -37)
        #c7 = z4 + PP(0.398592, 151)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #21
0
    def path_SELCLse(cls, ta=None, **kwargs):
        #M 47.3414,358.129 C 47.3414,368.714 50.1558,374.47 59.6556,374.47 60.7666,374.47 61.0384,373.83426 61.0384,373.225 61.0384,372.1495 59.275595,371.25827 58.570885,371.5231 57.519223,371.9183 59.105359,373.65736 59.6556,374.47

        #z0 = P(0, -0)
        #c0 = P(0, -3.7202)
        #c1 = P(0.989149, -5.74321)
        #z1 = P(4.32795, -5.74321)
        #c2 = P(4.71842, -5.74321)
        #c3 = P(4.81395, -5.51977)
        #z2 = P(4.81395, -5.30564)
        #c4 = P(4.81395, -4.92764)
        #c5 = P(4.19439, -4.61441)
        #z3 = P(3.94671, -4.70749)
        #c6 = P(3.5771, -4.84639)
        #c7 = P(4.13456, -5.4576)
        z4 = P(4.32795, -5.74321)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -3.7202)
        #z1 = z0 + P(4.32795, -5.74321)
        #c1 = z1 + P(-3.3388, 0)
        #c2 = z1 + P(0.390472, 0)
        #z2 = z1 + P(0.485999, 0.437568)
        #c3 = z2 + P(0, -0.21413)
        #c4 = z2 + P(0, 0.377995)
        #z3 = z2 + P(-0.867233, 0.59815)
        #c5 = z3 + P(0.247677, 0.0930771)
        #c6 = z3 + P(-0.369617, -0.138897)
        #z4 = z3 + P(0.381234, -1.03572)
        #c7 = z4 + P(-0.193388, 0.28561)

        z0 = P(0, -0)
        c0 = z0 + PP(3.7202, -90)
        z1 = z0 + PP(7.19135, -52)
        c1 = z1 + PP(3.3388, 180)
        c2 = z1 + PP(0.390472, 0)
        z2 = z1 + PP(0.653957, 41)
        c3 = z2 + PP(0.21413, -90)
        c4 = z2 + PP(0.377995, 90)
        #z3 = z2 + PP(1.05351, 145)
        z3 = z4 - PP(1.10365, ta + -13)
        c5 = z3 + PP(0.264589, 20)
        #c6 = z3 + PP(0.394853, -159)
        #z4 = z3 + PP(1.10365, -69)
        #c7 = z4 + PP(0.344923, 124)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #22
0
    def path_SELCL(cls, ta=None, **kwargs):
        #M 47.3414,58.6772 C 47.3414,82.2775 51.378983,101.40203 69.9338,97.8084 70.709796,97.658108 70.981496,96.750748 70.8069,96.151314 70.664889,95.663753 70.160115,95.214202 69.484064,95.395636 67.880642,95.825951 66.470871,96.988138 65.35235,98.1448

        #z0 = P(0, -0)
        #c0 = P(0, -8.29456)
        #c1 = P(1.41905, -15.0161)
        #z1 = P(7.94032, -13.753)
        #c2 = P(8.21305, -13.7002)
        #c3 = P(8.30855, -13.3813)
        #z2 = P(8.24718, -13.1706)
        #c4 = P(8.19727, -12.9993)
        #c5 = P(8.01986, -12.8413)
        #z3 = P(7.78226, -12.9051)
        #c6 = P(7.21872, -13.0563)
        #c7 = P(6.72324, -13.4648)
        z4 = P(6.33013, -13.8713)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -8.29456)
        #z1 = z0 + P(7.94032, -13.753)
        #c1 = z1 + P(-6.52127, -1.26302)
        #c2 = z1 + P(0.272731, 0.0528216)
        #z2 = z1 + P(0.30686, 0.582399)
        #c3 = z2 + P(0.0613635, -0.210677)
        #c4 = z2 + P(-0.0499112, 0.171358)
        #z3 = z2 + P(-0.464924, 0.26559)
        #c5 = z3 + P(0.237605, 0.0637668)
        #c6 = z3 + P(-0.563538, -0.151238)
        #z4 = z3 + P(-1.45213, -0.966221)
        #c7 = z4 + P(0.393115, 0.40652)

        z0 = P(0, -0)
        c0 = z0 + PP(8.29456, -90)
        z1 = z0 + PP(15.8806, -60)
        c1 = z1 + PP(6.64246, -169)
        c2 = z1 + PP(0.2778, 10)
        z2 = z1 + PP(0.658295, 62)
        c3 = z2 + PP(0.219432, -73)
        c4 = z2 + PP(0.178479, 106)
        z3 = z2 + PP(0.535437, 150)
        #z3 = z4 - PP(1.74421, ta + -11)
        c5 = z3 + PP(0.246013, 15)
        c6 = z3 + PP(0.58348, -164)
        #z4 = z3 + PP(1.74421, -146)
        c7 = z4 + PP(0.565507, 45)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            controlcurve(c6, c7),
            #curve(),
            endknot(*z4, angle=ta)
        ])
예제 #23
0
    def path_SELCLswr(cls, ta=None, **kwargs):
        #M 95.4745,447.917 C 95.4745,458.502 98.2888,464.258 107.789,464.258 108.9,464.258 109.32452,463.60263 109.171,463.013 108.9399,462.12543 106.98785,461.7753 106.4059,462.2124 105.83377,462.64212 106.54291,463.35992 106.85783,464.23871

        #z0 = P(0, -0)
        #c0 = P(0, -3.7202)
        #c1 = P(0.989114, -5.74321)
        #z1 = P(4.32805, -5.74321)
        #c2 = P(4.71852, -5.74321)
        #c3 = P(4.86773, -5.51287)
        #z2 = P(4.81377, -5.30564)
        #c4 = P(4.73255, -4.99369)
        #c5 = P(4.04648, -4.87064)
        #z3 = P(3.84195, -5.02426)
        #c6 = P(3.64087, -5.17529)
        #c7 = P(3.8901, -5.42757)
        z4 = P(4.00078, -5.73643)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -3.7202)
        #z1 = z0 + P(4.32805, -5.74321)
        #c1 = z1 + P(-3.33894, 0)
        #c2 = z1 + P(0.390472, 0)
        #z2 = z1 + P(0.485718, 0.437568)
        #c3 = z2 + P(0.0539561, -0.207231)
        #c4 = z2 + P(-0.0812224, 0.311945)
        #z3 = z2 + P(-0.971822, 0.281379)
        #c5 = z3 + P(0.204532, 0.153623)
        #c6 = z3 + P(-0.201081, -0.151029)
        #z4 = z3 + P(0.158835, -0.712167)
        #c7 = z4 + P(-0.110682, 0.308859)

        z0 = P(0, -0)
        c0 = z0 + PP(3.7202, -90)
        z1 = z0 + PP(7.19142, -52)
        c1 = z1 + PP(3.33894, 180)
        c2 = z1 + PP(0.390472, 0)
        z2 = z1 + PP(0.653748, 42)
        c3 = z2 + PP(0.21414, -75)
        c4 = z2 + PP(0.322346, 104)
        #z3 = z2 + PP(1.01174, 163)
        z3 = z4 - PP(0.729664, ta + -6)
        c5 = z3 + PP(0.2558, 36)
        #c6 = z3 + PP(0.251482, -143)
        #z4 = z3 + PP(0.729664, -77)
        #c7 = z4 + PP(0.328092, 109)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #24
0
    def path_SELCLner(cls, ta=None, **kwargs):
        #M157.773 250.703C157.773 274.216 161.798 293.281 180.281 289.688C181.056 289.552 181.339 288.636 181.157 288.041C181.017 287.554 180.516 287.101 179.842 287.282C178.252 287.738 176.85 288.89 175.716 290.024

        #z0 = P(0, -0)
        #c0 = P(0, -8.26388)
        #c1 = P(1.41463, -14.9645)
        #z1 = P(7.91066, -13.7017)
        #c2 = P(8.18304, -13.6539)
        #c3 = P(8.2825, -13.3319)
        #z2 = P(8.21854, -13.1228)
        #c4 = P(8.16933, -12.9516)
        #c5 = P(7.99325, -12.7924)
        #z3 = P(7.75637, -12.8561)
        #c6 = P(7.19755, -13.0163)
        #c7 = P(6.7048, -13.4212)
        z4 = P(6.30624, -13.8198)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -8.26388)
        #z1 = z0 + P(7.91066, -13.7017)
        #c1 = z1 + P(-6.49603, -1.2628)
        #c2 = z1 + P(0.272381, 0.0477985)
        #z2 = z1 + P(0.307879, 0.578854)
        #c3 = z2 + P(0.0639657, -0.209119)
        #c4 = z2 + P(-0.0492044, 0.171161)
        #z3 = z2 + P(-0.46217, 0.266758)
        #c5 = z3 + P(0.236884, 0.0636142)
        #c6 = z3 + P(-0.558821, -0.160266)
        #z4 = z3 + P(-1.45012, -0.963703)
        #c7 = z4 + P(0.398555, 0.398555)

        z0 = P(0, -0)
        c0 = z0 + PP(8.26388, -90)
        z1 = z0 + PP(15.8213, -60)
        c1 = z1 + PP(6.61764, -168)
        c2 = z1 + PP(0.276544, 9)
        z2 = z1 + PP(0.655638, 61)
        c3 = z2 + PP(0.218683, -72)
        c4 = z2 + PP(0.178093, 106)
        z3 = z2 + PP(0.53363, 150)
        #z3 = z4 - PP(1.74114, ta + -11)
        c5 = z3 + PP(0.245277, 15)
        c6 = z3 + PP(0.581349, -163)
        #z4 = z3 + PP(1.74114, -146)
        c7 = z4 + PP(0.563643, 45)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            controlcurve(c6, c7),
            #curve(),
            endknot(*z4)
        ])
예제 #25
0
    def path_SELCLer(cls, ta=None, **kwargs):
        #M 173.943,154.69 C 173.943,178.202 178.10151,197.89723 196.451,193.675 197.88573,193.34487 198.95872,191.07231 198.04821,190.16488 196.8793,188.99992 193.1534,190.6284 193.54887,192.23061 193.8511,193.45505 194.11233,194.01595 197.327,192.028

        #z0 = P(0, -0)
        #c0 = P(0, -8.26352)
        #c1 = P(1.46155, -15.1856)
        #z1 = P(7.91066, -13.7017)
        #c2 = P(8.41491, -13.5856)
        #c3 = P(8.79202, -12.7869)
        #z2 = P(8.47201, -12.468)
        #c4 = P(8.06119, -12.0586)
        #c5 = P(6.75168, -12.6309)
        #z3 = P(6.89068, -13.194)
        #c6 = P(6.9969, -13.6244)
        #c7 = P(7.08871, -13.8215)
        z4 = P(8.21854, -13.1228)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -8.26352)
        #z1 = z0 + P(7.91066, -13.7017)
        #c1 = z1 + P(-6.44911, -1.48394)
        #c2 = z1 + P(0.50425, 0.116027)
        #z2 = z1 + P(0.561355, 1.23367)
        #c3 = z2 + P(0.320008, -0.318925)
        #c4 = z2 + P(-0.410825, 0.409437)
        #z3 = z2 + P(-1.58134, -0.726021)
        #c5 = z3 + P(-0.138992, 0.563113)
        #c6 = z3 + P(0.106222, -0.430342)
        #z4 = z3 + P(1.32786, 0.0712093)
        #c7 = z4 + P(-1.12983, -0.698685)

        z0 = P(0, -0)
        c0 = z0 + PP(8.26352, -90)
        z1 = z0 + PP(15.8213, -60)
        c1 = z1 + PP(6.61764, -167)
        c2 = z1 + PP(0.517427, 12)
        z2 = z1 + PP(1.35538, 65)
        c3 = z2 + PP(0.451794, -44)
        c4 = z2 + PP(0.580013, 135)
        #z3 = z2 + PP(1.74004, -155)
        z3 = z4 - PP(1.32977, ta + 331)
        c5 = z3 + PP(0.580012, 103)
        #c6 = z3 + PP(0.443257, -76)
        #z4 = z3 + PP(1.32977, 3)
        #c7 = z4 + PP(1.32841, -148)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #26
0
    def path_SELCLe(cls, ta=None, **kwargs):
        #M 47.3414,154.69 C 47.3414,178.202 50.929259,197.30312 69.428695,193.7952 71.050553,193.48766 71.03831,192.19833 70.785501,191.42699 69.929417,188.81502 65.973369,189.35871 65.74486,191.0286 65.502021,192.80321 67.644362,192.18799 71.018411,192.05988

        #z0 = P(0, -0)
        #c0 = P(0, -8.26352)
        #c1 = P(1.26099, -14.9768)
        #z1 = P(7.7628, -13.7439)
        #c2 = P(8.33282, -13.6358)
        #c3 = P(8.32851, -13.1827)
        #z2 = P(8.23966, -12.9116)
        #c4 = P(7.93878, -11.9936)
        #c5 = P(6.54839, -12.1847)
        #z3 = P(6.46808, -12.7716)
        #c6 = P(6.38273, -13.3953)
        #c7 = P(7.13568, -13.179)
        z4 = P(8.32152, -13.134)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -8.26352)
        #z1 = z0 + P(7.7628, -13.7439)
        #c1 = z1 + P(-6.50181, -1.23289)
        #c2 = z1 + P(0.570018, 0.108088)
        #z2 = z1 + P(0.476863, 0.832331)
        #c3 = z2 + P(0.0888522, -0.271095)
        #c4 = z2 + P(-0.300879, 0.918003)
        #z3 = z2 + P(-1.77158, 0.140018)
        #c5 = z3 + P(0.0803117, 0.586899)
        #c6 = z3 + P(-0.0853482, -0.623704)
        #z4 = z3 + P(1.85344, -0.362454)
        #c7 = z4 + P(-1.18584, -0.0450255)

        z0 = P(0, -0)
        c0 = z0 + PP(8.26352, -90)
        z1 = z0 + PP(15.7847, -60)
        c1 = z1 + PP(6.61767, -169)
        c2 = z1 + PP(0.580175, 10)
        z2 = z1 + PP(0.959256, 60)
        c3 = z2 + PP(0.285285, -71)
        c4 = z2 + PP(0.966052, 108)
        #z3 = z2 + PP(1.77711, 175)
        z3 = z4 - PP(1.88855, ta + 346)
        c5 = z3 + PP(0.592369, 82)
        #c6 = z3 + PP(0.629517, -97)
        #z4 = z3 + PP(1.88855, -11)
        #c7 = z4 + PP(1.1867, -177)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #27
0
    def path_SELCLel(cls, ta=None, **kwargs):
        #M 116.312,154.69 C 116.312,178.202 120.33964,197.2867 138.819,193.675 139.89313,193.46507 140.44492,191.43874 139.9364,190.40528 139.39583,189.30667 137.17783,188.23528 136.45778,189.22558 135.68986,190.28172 136.49524,191.59668 138.79845,192.36682

        #z0 = P(0, -0)
        #c0 = P(0, -8.26352)
        #c1 = P(1.41555, -14.971)
        #z1 = P(7.91031, -13.7017)
        #c2 = P(8.28782, -13.6279)
        #c3 = P(8.48175, -12.9157)
        #z2 = P(8.30303, -12.5525)
        #c4 = P(8.11304, -12.1664)
        #c5 = P(7.3335, -11.7898)
        #z3 = P(7.08043, -12.1379)
        #c6 = P(6.81054, -12.5091)
        #c7 = P(7.0936, -12.9712)
        z4 = P(7.90308, -13.2419)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -8.26352)
        #z1 = z0 + P(7.91031, -13.7017)
        #c1 = z1 + P(-6.49475, -1.26937)
        #c2 = z1 + P(0.377514, 0.073782)
        #z2 = z1 + P(0.392721, 1.14918)
        #c3 = z2 + P(0.178724, -0.36322)
        #c4 = z2 + P(-0.189989, 0.386117)
        #z3 = z2 + P(-1.2226, 0.414617)
        #c5 = z3 + P(0.253069, 0.348051)
        #c6 = z3 + P(-0.269893, -0.371191)
        #z4 = z3 + P(0.822652, -1.10402)
        #c7 = z4 + P(-0.809486, 0.270673)

        z0 = P(0, -0)
        c0 = z0 + PP(8.26352, -90)
        z1 = z0 + PP(15.8211, -60)
        c1 = z1 + PP(6.61764, -168)
        c2 = z1 + PP(0.384656, 11)
        z2 = z1 + PP(1.21443, 71)
        c3 = z2 + PP(0.40481, -63)
        c4 = z2 + PP(0.430328, 116)
        #z3 = z2 + PP(1.29099, 161)
        z3 = z4 - PP(1.37681, ta + -34)
        c5 = z3 + PP(0.430329, 53)
        #c6 = z3 + PP(0.458939, -126)
        #z4 = z3 + PP(1.37681, -53)
        #c7 = z4 + PP(0.853541, 161)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #28
0
    def path_SELCLsel(cls, ta=None, **kwargs):
        #M 156.935,450.83 C 156.935,462.586 157.94125,473.2305 161.25788,480.48687 164.5745,487.74325 173.07573,492.23788 179.443,489.815 181.78367,488.92433 179.85014,486.22854 178.11392,487.13483 177.14918,487.68651 177.16536,489.05001 177.12907,490.3201

        #z0 = P(0, -0)
        #c0 = P(0, -4.13176)
        #c1 = P(0.353657, -7.87288)
        #z1 = P(1.51932, -10.4232)
        #c2 = P(2.68498, -12.9735)
        #c3 = P(5.67282, -14.5532)
        #z2 = P(7.91066, -13.7017)
        #c4 = P(8.73331, -13.3886)
        #c5 = P(8.05375, -12.4412)
        #z3 = P(7.44354, -12.7597)
        #c6 = P(7.10447, -12.9536)
        #c7 = P(7.11016, -13.4328)
        z4 = P(7.09741, -13.8792)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -4.13176)
        #z1 = z0 + P(1.51932, -10.4232)
        #c1 = z1 + P(-1.16566, 2.55032)
        #c2 = z1 + P(1.16566, -2.55033)
        #z2 = z1 + P(6.39134, -3.27846)
        #c3 = z2 + P(-2.23784, -0.851545)
        #c4 = z2 + P(0.822652, 0.313035)
        #z3 = z2 + P(-0.467118, 0.941972)
        #c5 = z3 + P(0.610212, 0.318525)
        #c6 = z3 + P(-0.339067, -0.193893)
        #z4 = z3 + P(-0.346135, -1.11949)
        #c7 = z4 + P(0.0127545, 0.446386)

        z0 = P(0, -0)
        c0 = z0 + PP(4.13176, -90)
        z1 = z0 + PP(10.5333, -81)
        c1 = z1 + PP(2.80409, 114)
        c2 = z1 + PP(2.80409, -65)
        z2 = z1 + PP(7.18314, -27)
        c3 = z2 + PP(2.39438, -159)
        c4 = z2 + PP(0.880197, 20)
        #z3 = z2 + PP(1.05143, 116)
        z3 = z4 - PP(1.17178, ta + -15)
        c5 = z3 + PP(0.688343, 27)
        #c6 = z3 + PP(0.390591, -150)
        #z4 = z3 + PP(1.17178, -107)
        #c7 = z4 + PP(0.446568, 88)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #29
0
    def path_SELCLsr(cls, ta=None, **kwargs):
        #M 168.274,332.14 C 168.274,355.652 172.299,374.718 190.782,371.125 191.557,370.988 191.89935,370.05039 191.658,369.477 191.12051,368.20005 188.61716,367.29582 187.66977,368.30673 186.91201,369.1153 188.14709,370.18923 188.81054,371.4293

        #z0 = P(0, -0)
        #c0 = P(0, -8.26352)
        #c1 = P(1.41463, -14.9645)
        #z1 = P(7.91066, -13.7017)
        #c2 = P(8.18304, -13.6535)
        #c3 = P(8.30336, -13.324)
        #z2 = P(8.21854, -13.1225)
        #c4 = P(8.02963, -12.6737)
        #c5 = P(7.1498, -12.3559)
        #z3 = P(6.81683, -12.7112)
        #c6 = P(6.55051, -12.9953)
        #c7 = P(6.98459, -13.3728)
        z4 = P(7.21777, -13.8086)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -8.26352)
        #z1 = z0 + P(7.91066, -13.7017)
        #c1 = z1 + P(-6.49603, -1.2628)
        #c2 = z1 + P(0.272381, 0.04815)
        #z2 = z1 + P(0.307879, 0.579206)
        #c3 = z2 + P(0.0848248, -0.201524)
        #c4 = z2 + P(-0.188906, 0.448797)
        #z3 = z2 + P(-1.4017, 0.411303)
        #c5 = z3 + P(0.33297, 0.355294)
        #c6 = z3 + P(-0.266322, -0.28418)
        #z4 = z3 + P(0.400935, -1.09746)
        #c7 = z4 + P(-0.233176, 0.435835)

        z0 = P(0, -0)
        c0 = z0 + PP(8.26352, -90)
        z1 = z0 + PP(15.8213, -60)
        c1 = z1 + PP(6.61764, -168)
        c2 = z1 + PP(0.276605, 10)
        z2 = z1 + PP(0.655949, 62)
        c3 = z2 + PP(0.218648, -67)
        c4 = z2 + PP(0.486933, 112)
        #z3 = z2 + PP(1.4608, 163)
        z3 = z4 - PP(1.1684, ta + -7)
        c5 = z3 + PP(0.486932, 46)
        #c6 = z3 + PP(0.389469, -133)
        #z4 = z3 + PP(1.1684, -69)
        #c7 = z4 + PP(0.49429, 118)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #30
0
    def path_SELCLsr(cls, ta=None, **kwargs):
        #M 151.364,262.614 C 151.364,273.199 154.178,278.955 163.678,278.955 164.789,278.955 165.16146,278.5635 165.061,277.71 164.96046,276.85582 163.20767,275.9803 162.50351,276.35629 161.45161,276.91797 162.40638,277.82898 163.29446,278.95181

        #z0 = P(0, -0)
        #c0 = P(0, -3.7202)
        #c1 = P(0.989008, -5.74321)
        #z1 = P(4.32788, -5.74321)
        #c2 = P(4.71835, -5.74321)
        #c3 = P(4.84925, -5.60561)
        #z2 = P(4.81395, -5.30564)
        #c4 = P(4.77861, -5.00543)
        #c5 = P(4.16257, -4.69772)
        #z3 = P(3.91509, -4.82986)
        #c6 = P(3.54539, -5.02727)
        #c7 = P(3.88095, -5.34745)
        z4 = P(4.19308, -5.74208)

        #z0 = P(0, -0)
        #c0 = z0 + P(0, -3.7202)
        #z1 = z0 + P(4.32788, -5.74321)
        #c1 = z1 + P(-3.33887, 0)
        #c2 = z1 + P(0.390472, 0)
        #z2 = z1 + P(0.486069, 0.437568)
        #c3 = z2 + P(0.0353077, -0.299971)
        #c4 = z2 + P(-0.0353358, 0.30021)
        #z3 = z2 + P(-0.898855, 0.475775)
        #c5 = z3 + P(0.247484, 0.132145)
        #c6 = z3 + P(-0.369701, -0.197408)
        #z4 = z3 + P(0.277987, -0.912221)
        #c7 = z4 + P(-0.312124, 0.39463)

        z0 = P(0, -0)
        c0 = z0 + PP(3.7202, -90)
        z1 = z0 + PP(7.19131, -52)
        c1 = z1 + PP(3.33887, 180)
        c2 = z1 + PP(0.390472, 0)
        z2 = z1 + PP(0.65401, 41)
        c3 = z2 + PP(0.302042, -83)
        c4 = z2 + PP(0.302282, 96)
        #z3 = z2 + PP(1.01701, 152)
        z3 = z4 - PP(0.953637, ta + -21)
        c5 = z3 + PP(0.280554, 28)
        #c6 = z3 + PP(0.419104, -151)
        #z4 = z3 + PP(0.953637, -73)
        #c7 = z4 + PP(0.503144, 128)

        return pyx.metapost.path.path([
            beginknot(*z0),
            controlcurve(c0, c1),
            knot(*z1),
            controlcurve(c2, c3),
            knot(*z2),
            controlcurve(c4, c5),
            knot(*z3),
            #controlcurve(c6, c7),
            curve(),
            endknot(*z4, angle=ta)
        ])
예제 #31
0
    def draw(self, canvas):
        edgepath = pyx.metapost.path.path([
            beginknot(*self.start_point), tensioncurve(),
            smoothknot(*self.mid_point), tensioncurve(),
            endknot(*self.end_point)
        ])

        canvas.stroke(edgepath,
                      [pyx.style.linewidth(self.thickness), pyx.color.rgb(*self.colour), pyx.color.transparency(
                          1-self.alpha)])
예제 #32
0
	def __init__(self, style=None, pos=None):
		if pos==None :
			pos = self.getDefaultPoints();
		super(TensionCurve, self).__init__(style, Point.center(*pos));

		pathitems = []
		i = 0
		for p in pos:
			if i == 0:
				pathitems.append(beginknot(*pos[0].toTuple()))
			elif i == len(pos) - 1:
				pathitems.append(tensioncurve())
				pathitems.append(endknot(*pos[i].toTuple()))
			else:
				pathitems.append(tensioncurve())
				pathitems.append(smoothknot(*pos[i].toTuple()))
			i += 1
		self.path = metapost.path.path(pathitems)
예제 #33
0
파일: metapost.py 프로젝트: mjg/PyX-svn
from pyx import *
from pyx.metapost.path import beginknot, endknot, smoothknot, tensioncurve

p1, p2, p3, p4, p5 = (0, 0), (2, 1.33), (1.3, 3), (0.33, 2.33), (1, 1.67)
openpath = metapost.path.path([
    beginknot(*p1), tensioncurve(), smoothknot(*p2), tensioncurve(),
    smoothknot(*p3), tensioncurve(), smoothknot(*p4), tensioncurve(),
    endknot(*p5)])
closedpath = metapost.path.path([
    smoothknot(*p1), tensioncurve(), smoothknot(*p2), tensioncurve(),
    smoothknot(*p3), tensioncurve(), smoothknot(*p4), tensioncurve(),
    smoothknot(*p5), tensioncurve()])
c = canvas.canvas()
for p in [p1, p2, p3, p4, p5]:
    c.fill(path.circle(p[0], p[1], 0.05), [color.rgb.red])
    c.fill(path.circle(p[0], p[1], 0.05), [color.rgb.red, trafo.translate(2, 0)])
c.stroke(openpath)
c.stroke(closedpath, [trafo.translate(2, 0)])

c.writeEPSfile("metapost")
c.writePDFfile("metapost")
c.writeSVGfile("metapost")