import matplotlib.pyplot as mpl import matplotlib.transforms as transforms mpl.ion() # for interactive drawing fig = mpl.figure() ax = fig.gca() xmin, xmax, ymin, ymax = -2.0, 4.0, -2.0, 6.0 ax.set_xlim(xmin, xmax) ax.set_ylim(ymin, ymax) ax.set_aspect('equal') mpl.grid(True) # arc mpl.arrow(x=-0.509204, y=1.93409, dx=-0.00843419, dy=-0.00224023, facecolor='b', edgecolor='b', linestyle='solid', linewidth=2, head_width=0.1, length_includes_head=True, shape='full') ax.text(-0.2, -0.2, 'center', horizontalalignment='center', fontsize=14) ax.text(2.68468, 1.55, 'start_angle', horizontalalignment='center', fontsize=14) # arc x = [2.5, 2.4999576921443607, 2.4998307700094053, 2.499619237890978, 2.4993231029486545, 2.4989423752055013, 2.4984770675477392, 2.497927195724303, 2.4972927783463112, 2.4965738368864345, 2.4957703956781705, 2.4948824819150186, 2.4939101256495606, 2.4928533597924436, 2.491712220111265, 2.4904867452293638, 2.489176976624511, 2.4877829586275078, 2.4863047384206833, 2.4847423660362997, 2.4830958943548573, 2.481365379103305, 2.4795508788531544, 2.4776524550184966, 2.475670171853926, 2.473604096452361, 2.4714542987427794, 2.4692208514878446, 2.466903830281448, 2.464503313546149, 2.46201938253052, 2.4594521213063967, 2.4568016167660334, 2.45406795861916, 2.4512512393899484, 2.4483515544138785, 2.4453690018345142, 2.442303682600177, 2.4391557004605358, 2.435925161963088, 2.4326121764495596, 2.4292168560522005, 2.425739315689991, 2.422179673064752, 2.41853804865716, 2.4148145657226707, 2.411009350287347, 2.407122531143594, 2.4031542398457972, 2.3991046107058733, 2.3949737807887224, 2.390761889907589, 2.38646908061933, 2.38209549821959, 2.377641290737884, 2.3731066089325847, 2.3684916062858234, 2.363796438998292, 2.359021265983959, 2.354166248864688, 2.3492315519647713, 2.3442173423053623, 2.339123789598829, 2.3339510662430043, 2.328699347315356, 2.323368810567056, 2.3179596364169686, 2.3124720079455403, 2.306906110888606, 2.3012621336311008, 2.295540267200685, 2.289740705261278, 2.2838636441065026, 2.2779092826530425, 2.2718778224339107, 2.2657694675916247, 2.2595844248713015, 2.2533229036136557, 2.2469851157479175, 2.2405712757846583, 2.2340816008085307, 2.2275163104709197, 2.2208756269825103, 2.214159775105765, 2.2073689821473175, 2.200503477950278, 2.193563494886455, 2.1865492678484895, 2.179461034241906, 2.1722990339770756, 2.165063509461097, 2.157754705589591, 2.1503728697384137, 2.142918251755281, 2.135391103951314, 2.1277916810924995, 2.1201202403910653, 2.1123770414967753, 2.104562346488144, 2.0966764198635603, 2.088719528532341, 2.0806919418056946, 2.0725939313876043, 2.0644257713656353, 2.056187738201656, 2.0478801107224793, 2.03950317011043, 2.031057199893823, 2.0225424859373686, 2.0139593164324983, 2.0053079818876096, 1.9965887751182323, 1.9878019912371194, 1.9789479276442588, 1.970026884016805, 1.9610391622989396, 1.9519850666916483, 1.9428649036424273, 1.93367898183491, 1.9244276121784196, 1.9151111077974452, 1.905729784021045, 1.8962839583721727, 1.8867739505569303, 1.877200082453748, 1.86756267810249, 1.857862063693486, 1.8480985675564905, 1.8382725201495718, 1.8283842540479265, 1.8184341039326222, 1.80842240657927, 1.7983495008466281, 1.788215727665129, 1.778021430025343, 1.7677669529663689, 1.7574526435641544, 1.7470788509197501, 1.7366459261474934, 1.7261542223631243, 1.7156040946718343, 1.7049959001562465, 1.694329997864331, 1.683606748797251, 1.6728265158971458, 1.6619896640348446, 1.6510965599975194, 1.6401475724762684, 1.6291430720536382, 1.6180834311910814, 1.6069690242163488, 1.595800227310821, 1.5845774184967758, 1.5733009776245939, 1.561971286359901, 1.5505887281706503, 1.539153688314146, 1.5276665538239997, 1.516127713497034, 1.504537557880121, 1.4928964792569657, 1.4812048716348272, 1.4694631307311832, 1.4576716539603372, 1.4458308404199665, 1.4339410908776153, 1.4220028077571298, 1.4100163951250364, 1.3979822586768675, 1.385900805723429, 1.3737724451770152, 1.361597587537568, 1.3493766448787827, 1.337110030834161, 1.3247981605830128, 1.312441450836401, 1.3000403198230388, 1.2875951872751359, 1.2751064744141885, 1.2625746039367256, 1.2500000000000002] y = [0.0, 0.014544328387484583, 0.029088164503492532, 0.04363101609320877, 0.058172390935140796, 0.07271179685777851, 0.08724874175625241, 0.10178273360898957, 0.11631328049436661, 0.13083989060735957, 0.14536207227618955, 0.1598793339789641, 0.17439118436031323, 0.18889713224802018, 0.2033966866696457, 0.21788935686914537, 0.23237465232348048, 0.24685208275921977, 0.2613211581691336, 0.27578138882877923, 0.29023228531307554, 0.30467335851286864, 0.3191041196514865, 0.3335240803012817, 0.3479327524001635, 0.3623296482681168, 0.37671428062370776, 0.3910861626005771, 0.40544480776391856, 0.41978973012694265, 0.43412044416732576, 0.4484364648436434, 0.46273730761178644, 0.47702248844136197, 0.49129152383207525, 0.5055439308300947, 0.5197792270443982, 0.5339969306631001, 0.5481965604697582, 0.5623776358596624, 0.5765396768561003, 0.5906822041266032, 0.6048047389991692, 0.618906803478465, 0.6329879202620043, 0.6470476127563018, 0.6610854050930054, 0.6751008221450018, 0.6890933895424978, 0.7030626336890764, 0.7170080817777256, 0.7309292618068418, 0.7448257025962048, 0.7586969338029265, 0.7725424859373684, 0.7863618903790339, 0.8001546793924288, 0.8139203861428916, 0.8276585447123951, 0.8413686901153157, 0.8550503583141716, 0.8687030862353283, 0.8823264117846721, 0.8959198738632506, 0.9094830123828785, 0.9230153682817109, 0.9365164835397799, 0.9499859011944972, 0.9634231653561207, 0.9768278212231842, 0.9901994150978919, 1.0035374944014728, 1.0168416076895004, 1.0301113046671708, 1.0433461362045446, 1.0565456543517484, 1.0697094123541355, 1.0828369646674074, 1.0959278669726933, 1.1089816761915896, 1.1219979505011553, 1.1349762493488669, 1.147916133467529, 1.1608171648901422, 1.1736789069647267, 1.186500924369101, 1.1992827831256152, 1.2120240506158424, 1.2247242955952173, 1.237383088207635, 1.2499999999999998, 1.2625746039367247, 1.275106474414188, 1.287595187275135, 1.3000403198230384, 1.3124414508364004, 1.3247981605830121, 1.3371100308341606, 1.3493766448787818, 1.3615975875375674, 1.373772445177015, 1.3859008057234283, 1.3979822586768669, 1.4100163951250357, 1.4220028077571292, 1.4339410908776151, 1.445830840419966, 1.4576716539603365, 1.4694631307311825, 1.4812048716348267, 1.4928964792569652, 1.5045375578801203, 1.5161277134970332, 1.527666553823999, 1.5391536883141455, 1.5505887281706499, 1.5619712863599002, 1.5733009776245934, 1.5845774184967754, 1.5958002273108205, 1.6069690242163481, 1.6180834311910808, 1.6291430720536377, 1.640147572476268, 1.6510965599975191, 1.6619896640348442, 1.6728265158971454, 1.6836067487972506, 1.6943299978643305, 1.7049959001562462, 1.7156040946718338, 1.726154222363124, 1.736645926147493, 1.74707885091975, 1.7574526435641542, 1.7677669529663687, 1.7780214300253427, 1.7882157276651283, 1.7983495008466277, 1.8084224065792696, 1.8184341039326215, 1.828384254047926, 1.8382725201495713, 1.8480985675564898, 1.8578620636934853, 1.8675626781024899, 1.8772000824537476, 1.8867739505569299, 1.8962839583721722, 1.9057297840210445, 1.9151111077974448, 1.924427612178419, 1.9336789818349098, 1.942864903642427, 1.9519850666916478, 1.961039162298939, 1.9700268840168045, 1.9789479276442585, 1.9878019912371192, 1.9965887751182319, 2.005307981887609, 2.0139593164324983, 2.022542485937368, 2.0310571998938225, 2.03950317011043, 2.0478801107224793, 2.0561877382016553, 2.064425771365635, 2.072593931387604, 2.080691941805694, 2.0887195285323408, 2.09667641986356, 2.104562346488143, 2.1123770414967753, 2.1201202403910644, 2.127791681092499, 2.1353911039513136, 2.1429182517552805, 2.1503728697384132, 2.1577547055895905, 2.1650635094610964] [line] = ax.plot(x, y, 'k', linewidth=1, linestyle='dashed') # line x = [0.0, 4.0] y = [0.0, 0.0] [line] = ax.plot(x, y, 'k', linewidth=1, linestyle='dashed') # line x = [0.0, 2.0000000000000004] y = [0.0, 3.4641016151377544] [line] = ax.plot(x, y, 'k', linewidth=1, linestyle='dashed') ax.text(0.629904, 0.791025, 'radius', horizontalalignment='left', fontsize=14) # line mpl.arrow(x=1, y=1.73205, dx=-1, dy=-1.73205, facecolor='k', edgecolor='k', linestyle='dashed', linewidth=1, head_width=0.1, length_includes_head=True, shape='full') mpl.arrow(x=0, y=0, dx=1, dy=1.73205, facecolor='k', edgecolor='k', linestyle='dashed', linewidth=1, head_width=0.1, length_includes_head=True, shape='full') # line x = [0.0, -1.0352761804100834] y = [0.0, 3.8637033051562732] [line] = ax.plot(x, y, 'k', linewidth=1, linestyle='dashed') ax.text(0.430736, 3.27177, 'arc_angle', horizontalalignment='center', fontsize=14) # arc x = [1.5000000000000004, 1.488649511025625, 1.477270680310402, 1.4658637244908648, 1.4544288607390112, 1.4429663067581633, 1.4314762807788257, 1.4199590015545303, 1.4084146883576727, 1.3968435609753347, 1.3852458397051022, 1.3736217453508708, 1.3619714992186405, 1.3502953231123052, 1.3385934393294268, 1.3268660706570043, 1.3151134403672324, 1.3033357722132515, 1.2915332904248857, 1.2797062197043756, 1.2678547852220987, 1.2559792126122844, 1.2440797279687175, 1.2321565578404323, 1.2202099292274011, 1.2082400695762117, 1.1962472067757388, 1.184231569152802, 1.1721933854678217, 1.1601328849104626, 1.1480502970952695, 1.1359458520572991, 1.1238197802477365, 1.1116723125295092, 1.099503680172892, 1.0873141148511052, 1.075103848635901, 1.062873113993148, 1.0506221437784022, 1.038351171232479, 1.0260604299770064, 1.0137501540099814, 1.0014205777013134, 0.9890719357883619, 0.9767044633714703, 0.9643183959094851, 0.9519139692152769, 0.9394914194512493, 0.9270509831248424, 0.9145928970840327, 0.9021173985128199, 0.8896247249267135, 0.8771151141682103, 0.8645888044022682, 0.8520460341117683, 0.8394870420929765, 0.8269120674509975, 0.814321349595223, 0.8017151282347709, 0.7890936433739248, 0.7764571353075629, 0.7638058446165829, 0.7511400121633245, 0.7384598790869795, 0.7257656867990037, 0.71305767697852, 0.7003360915677164, 0.6876011727672428, 0.6748531630315955, 0.6620923050645039, 0.6493188418143094, 0.636533016469339, 0.6237350724532784, 0.6109252534205329, 0.5981038032515915, 0.585270966048385, 0.5724269861296347, 0.5595721080262044, 0.5467065764764429, 0.5338306364215253, 0.5209445330007912, 0.5080485115470743, 0.4951428175820335, 0.482227696811479, 0.46930339512069275, 0.4563701585697504, 0.4434282333888323, 0.43047786597353854, 0.41751930288019706, 0.40455279082116924, 0.39157857666015516, 0.37859690740748986, 0.36560803021544247, 0.3526121923735131, 0.3396096413037205, 0.3266006245558942, 0.313585389802961, 0.30056418483622893, 0.28753725756067217, 0.2745048559902076, 0.2614672282429751, 0.24842462253661374, 0.235377287183535, 0.22232547058619806, 0.20926942123237635, 0.19620938769042914, 0.1831456186045714, 0.17007836269013277, 0.1570078687288319, 0.14393438556403237, 0.13085816209600803, 0.11777944727720599, 0.10469849010750323, 0.09161553962946846, 0.07853084492362009, 0.06544465510368347, 0.05235721931185079, 0.03926878671403372, 0.026179606495121688, 0.013089927854240412, 1.8369701987210297e-16, -0.01308992785423938, -0.026179606495121327, -0.03926878671403335, -0.052357219311849765, -0.06544465510368311, -0.07853084492361906, -0.09161553962946742, -0.10469849010750287, -0.11777944727720498, -0.13085816209600767, -0.14393438556403138, -0.15700786872883085, -0.1700783626901324, -0.18314561860457035, -0.19620938769042878, -0.209269421232376, -0.222325470586197, -0.23537728718353462, -0.24842462253661268, -0.261467228242974, -0.2745048559902072, -0.28753725756067117, -0.3005641848362286, -0.31358538980296, -0.32660062455589317, -0.3396096413037201, -0.35261219237351205, -0.3656080302154421, -0.37859690740748875, -0.39157857666015417, -0.4045527908211689, -0.41751930288019606, -0.43047786597353743, -0.44342823338883197, -0.4563701585697494, -0.4693033951206924, -0.482227696811478, -0.4951428175820325, -0.5080485115470739, -0.5209445330007902, -0.5338306364215251, -0.5467065764764419, -0.5595721080262033, -0.5724269861296344, -0.5852709660483839, -0.5981038032515912, -0.6109252534205319, -0.6237350724532773, -0.6365330164693387, -0.6493188418143083, -0.6620923050645029, -0.674853163031595, -0.6876011727672418, -0.700336091567716, -0.713057676978519, -0.7257656867990027, -0.7384598790869792, -0.7511400121633235, -0.7638058446165825, -0.7764571353075619] y = [2.598076211353316, 2.6045964434674262, 2.611067087819699, 2.6174880212183913, 2.623859121418187, 2.630180267122523, 2.636451337985896, 2.6426722146161565, 2.6488427785767805, 2.6549629123891254, 2.661032499534665, 2.6670514244572088, 2.6730195725651034, 2.6789368302334107, 2.684803084806075, 2.6906182245980648, 2.6963821388975013, 2.7020947179677637, 2.7077558530495818, 2.7133654363631035, 2.7189233611099493, 2.7244295214752436, 2.7298838126296294, 2.7352861307312653, 2.7406363729278027, 2.745934437358341, 2.751180223155372, 2.756373630446695, 2.7615145603573206, 2.766602915011355, 2.77163859753386, 2.7766215120526994, 2.781551563700362, 2.7864286586157725, 2.791252703946074, 2.7960236078483955, 2.8007412794916053, 2.805405629058035, 2.8100165677451927, 2.8145740077674524, 2.819077862357725, 2.8235280457691116, 2.8279244732765347, 2.8322670611783525, 2.8365557267979504, 2.840790388485317, 2.844970965618598, 2.849097378605631, 2.8531695488854605, 2.857187398929835, 2.8611508522446805, 2.86505983337156, 2.868914267889106, 2.8727140824144435, 2.876459204604579, 2.8801495631577856, 2.8837850878149567, 2.887365709360942, 2.890891359625869, 2.894361971486439, 2.8977774788672046, 2.901137816741829, 2.904442921134323, 2.907692729120263, 2.9108871788279895, 2.9140262094397844, 2.9171097611930294, 2.9201377753813453, 2.9231101943557056, 2.926026961525538, 2.9288880213598, 2.9316933193880366, 2.9344428022014166, 2.9371364174537513, 2.9397741138624887, 2.9423558412096913, 2.944881550342992, 2.9473511931765293, 2.9497647226918637, 2.9521220929388727, 2.954423259036624, 2.956668177174233, 2.958856804611694, 2.9609890996806953, 2.9630650217854133, 2.965084531403282, 2.9670475900857505, 2.9689541604590106, 2.970804206224711, 2.9725976921606465, 2.974334584121431, 2.976014849039145, 2.977638454923966, 2.9792053708647788, 2.9807155670297623, 2.982169014666959, 2.9835656861048196, 2.9849055547527352, 2.9861885951015363, 2.9874147827239854, 2.988584094275237, 2.989696507493284, 2.990752001199384, 2.991750555298457, 2.9926921507794724, 2.99357676971581, 2.994404395265601, 2.995175011672046, 2.9958886042637216, 2.9965451594548522, 2.9971446647455733, 2.9976871087221686, 2.998172481057287, 2.9986007725101387, 2.998971974926672, 2.9992860812397275, 2.999543085469174, 2.999742982722021, 2.999885769192514, 2.9999714421622032, 3.0, 2.9999714421622032, 2.999885769192514, 2.999742982722021, 2.999543085469174, 2.9992860812397275, 2.998971974926672, 2.998600772510139, 2.998172481057287, 2.9976871087221686, 2.9971446647455733, 2.9965451594548522, 2.9958886042637216, 2.995175011672046, 2.994404395265601, 2.99357676971581, 2.9926921507794724, 2.991750555298457, 2.990752001199384, 2.989696507493284, 2.988584094275237, 2.9874147827239854, 2.9861885951015363, 2.9849055547527352, 2.98356568610482, 2.982169014666959, 2.9807155670297623, 2.9792053708647788, 2.9776384549239663, 2.976014849039145, 2.9743345841214315, 2.9725976921606465, 2.9708042062247113, 2.9689541604590106, 2.9670475900857505, 2.9650845314032823, 2.9630650217854133, 2.960989099680696, 2.9588568046116945, 2.956668177174233, 2.9544232590366244, 2.9521220929388727, 2.9497647226918637, 2.9473511931765293, 2.944881550342992, 2.9423558412096917, 2.9397741138624887, 2.9371364174537513, 2.934442802201417, 2.9316933193880366, 2.9288880213598, 2.9260269615255385, 2.9231101943557056, 2.9201377753813453, 2.91710976119303, 2.9140262094397844, 2.9108871788279895, 2.907692729120263, 2.9044429211343235, 2.9011378167418296, 2.897777478867205] [line] = ax.plot(x, y, 'k', linewidth=1, linestyle='dashed') mpl.title("Arc") mpl.draw() mpl.savefig("tmp_Arc.png", dpi=None) mpl.savefig("tmp_Arc.pdf")