import matplotlib.pyplot as plt
import numpy as np
#总区间
x1=np.arange(0,15,0.01)
#4手x
x2=np.arange(0.5,1.48,0.01)
x3=np.arange(2.02,3,0.01)
x4=np.arange(3,3.98,0.01)
x5=np.arange(4.53,5.5,0.01)
#4脚x
x6=np.arange(1.25,1.2573,0.00001)
x7=np.arange(2.2373,2.2445,0.00001)
x8=np.arange(3.7446,3.75175,0.00001)
x9=np.arange(4.73914,4.74635,0.000001)
#太阳下x
x10=np.arange(9.16,10.85,0.00001)
#草x
x11=np.arange(0,1.56,0.01)
x12=np.arange(1.56,2*1.56,0.01)
x13=np.arange(2*1.56,3*1.56,0.01)
x14=np.arange(3*1.56,4*1.56,0.01)
x15=np.arange(4*1.56,5*1.56,0.01)
#海鸥x
x21=np.arange(0.3,1.56,0.01)
x22=np.arange(1.56,2*1.56-0.3,0.01)
x23=np.arange(2*1.56+0.3,3*1.56,0.01)
x24=np.arange(3*1.56,4*1.56-0.3,0.01)
#树枝x
x25=np.arange(13,14,0.01)
x26=np.arange(12.5,14.5,0.01)
x27=np.arange(12,15,0.01)
x28=np.arange(13,13.5,0.01)
x29=np.arange(13.5,14,0.01)
x30=np.arange(12.5,13.5,0.01)
x31=np.arange(13.5,14.5,0.01)
x32=np.arange(12,13.5,0.01)
x33=np.arange(13.5,15,0.01)
#树根x
x34=np.arange(13.2,13.202,0.00001)
x35=np.arange(13.798,13.8,0.00001)
x36=np.arange(13.2,13.8,0.01)
#树中心线颜色补充
x37=np.arange(13.48,13.52,0.01)
#房顶x
x38=np.arange(7.5,9.5,0.01)
x39=np.arange(9.5,11.5,0.01)
x40=np.arange(7.8,11.2,0.01)
#房基x
x41=np.arange(7.8,7.803,0.0001)
x42=np.arange(11.197,11.2,0.0001)
#门x
x43=np.arange(9,10,0.01)
x44=np.arange(9,9.001,0.00001)
x45=np.arange(9.5,9.501,0.00001)
x46=np.arange(10,10.001,0.00001)
#窗户1x
x47=np.arange(8.2,9,0.01)
x48=np.arange(8.2,8.20078,0.00001)
x49=np.arange(8.6,8.60078,0.00001)
x50=np.arange(9,9.00078,0.00001)
#窗户2x
x51=np.arange(9.9,10.7,0.01)
x52=np.arange(9.9,9.90078,0.00001)
x53=np.arange(10.3,10.30078,0.00001)
x54=np.arange(10.7,10.70078,0.00001)
#2头x
x55=np.arange(3.4,5.1,0.01)
x56=np.arange(3.4,3.40075,0.00001)
x57=np.arange(5.1,5.10075,0.00001)
#爱心x
x58=np.arange(5.5,5.91,0.01)
x59=np.arange(5.89,6.71,0.01)
x60=np.arange(6.69,7.1,0.01)
#烟囱x
x61=np.arange(10.3022,10.30253,0.00001)
x62=np.arange(10.70185,10.7025,0.00001)
x63=np.arange(10.3,10.7,0.01)
#彩虹x
x64=np.arange(12,15,0.01)
x65=np.arange(12.5,15,0.01)
x66=np.arange(13,15,0.01)
x67=np.arange(13.5,15,0.01)
x68=np.arange(14,15,0.01)
x69=np.arange(14.5,15,0.01)
#楼梯x
x70=np.arange(12,12.0075,0.00001)
x71=np.arange(11.5,11.5075,0.00001)
x72=np.arange(11.5,12,0.01)
#彩虹x补充
x73=np.arange(11.54,15,0.01)
x74=np.arange(11,15,0.01)
x75=np.arange(10.2,15,0.01)
#纸飞机x
x76=np.arange(4,5,0.01)
x77=np.arange(4.75,5,0.01)
x78=np.arange(5,5.26,0.01)
x79=np.arange(5,6,0.01)
x80=np.arange(4,4.75,0.01)
x81=np.arange(5.26,6,0.01)
x82=np.arange(4.75,5.26,0.01)
#纸飞机线
x83=np.arange(3,5,0.01)
#1头函数
y1=np.sqrt(0.7-(x1-1.75)**2)+2
#4手函数
y3=x2+0.5
y4=4-x3
y5=x4-2
y6=6.5-x5
#4脚函数
y7=275*x6-344
y8=-275*x7+617
y9=275*x8-1030
y10=-275*x9+1305
#太阳下函数
y11=(x10-10)**2+9.35
#太阳上函数
y12=np.sqrt(0.7-(x1-10)**2)+10
#地面函数
y13=0.0001*x1+0.3
#天空下函数
y14=0.1*x1+10
#天空上函数
y15=0.0001*x1+11.5
#草上函数
y16=0.5*np.sin(2*x11)+0.4
y17=0.5*np.sin(2*(x12-1.56))+0.4
y18=0.5*np.sin(2*(x13-2*1.56))+0.4
y19=0.5*np.sin(2*(x14-3*1.56))+0.4
y20=0.5*np.sin(2*(x15-4*1.56))+0.4
#海鸥函数
y26=0.5*np.sin(2*x21)+8.4
y27=0.5*np.sin(2*(x22-1.56))+8.4
y28=0.5*np.sin(2*(x23-2*1.56))+9
y29=0.5*np.sin(2*(x24-3*1.56))+9
#树枝函数
y30=0.00001*x25+4.5
y31=0.00001*x26+3.5
y32=0.00001*x27+2
y33=x28-8.5
y34=-x29+18.5
y35=x30-9
y36=-x31+18
y37=x32-10
y38=-x33+17
#树根函数
y39=1000*(x34-0.2)-13000
y40=-1000*(x35+0.2)+14000
y41=0.00001*x36+1.999
#树中心线颜色补充函数
y42=0.00001*x37+5.01
y43=0.00001*x37+1.99
#房顶函数
y44=x38-4.5
y45=-x39+14.5
y46=0.00001*x40+3.31
y47=0.25*np.sin(8*x40)+3.31
#房基函数
y48=1000*(x41-7.8)+0.3
y49=-1000*(x42-11.2)+0.3
#门函数
y50=0.00001*x43+1.3
y51=1000*(x44-9)+0.3
y52=1000*(x45-9.5)+0.3
y53=1000*(x46-10)+0.3
#窗户1函数
y54=0.0001*x47+2
y55=0.0001*x47+2.4
y56=0.0001*x47+2.8
y57=1000*(x48-8.2)+2
y58=1000*(x49-8.6)+2
y59=1000*(x50-9)+2
#窗户2函数
y60=0.0001*x51+2
y61=0.0001*x51+2.4
y62=0.0001*x51+2.8
y63=1000*(x52-9.9)+2
y64=1000*(x53-10.3)+2
y65=1000*(x54-10.7)+2
#门接地面补充
y66=0.00001*x43+0.31
#2头函数
y67=0.00001*x55+2.88
y68=1000*(x56-3.4)+2.1
y69=1000*(x57-5.1)+2.1
#爱心函数
y70=x58-2.2
y71=-x58+8.8
y72=abs(x59-6.3)+3.3
y73=abs(x59-6.3)+2.5
y74=x60-3.8
y75=-x60+10.4
#烟囱函数
y76=1000*(x61-10.3)+2
y77=1000*(x62-10.7)+2
y78=0.00001*x63+4.54
y79=-x63+14.5
#彩虹函数
y80=np.sqrt(9-(x64-15)**2)+7
y81=np.sqrt(6.25-(x65-15)**2)+7
y82=np.sqrt(4-(x66-15)**2)+7
y83=np.sqrt(2.25-(x67-15)**2)+7
y84=np.sqrt(1-(x68-15)**2)+7
y85=np.sqrt(0.25-(x69-15)**2)+7
y86=0.00001*x75+7
#楼梯函数
y87=1000*(x70-12)
y88=1000*(x71-11.5)
y89=0.00001*x72+0.5
y90=0.00001*x72+0.5*2
y91=0.00001*x72+0.5*3
y92=0.00001*x72+0.5*4
y93=0.00001*x72+0.5*5
y94=0.00001*x72+0.5*6
y95=0.00001*x72+0.5*7
y96=0.00001*x72+0.5*8
y97=0.00001*x72+0.5*9
y98=0.00001*x72+0.5*10
y99=0.00001*x72+0.5*11
y100=0.00001*x72+0.5*12
y101=0.00001*x72+0.5*13
#彩虹函数补充
y102=np.sqrt(12.25-(x73-15)**2)+7
y103=np.sqrt(16-(x74-15)**2)+7
#纸飞机函数
y104=2*(x76-4)+6
y105=8*(x77-4.75)+6
y106=-8*(x78-5.25)+6
y107=-2*(x79-6)+6
y108=0.00001*x80+6
y109=0.00001*x81+6
y110=abs(x82-5)+5.75
#纸飞机线函数
y111=2.375*(x83-3)+1
#2头展
plt.plot(x1,y1,color='black',linewidth=2)
#4手展
plt.plot(x2,y3,color='black',linewidth=2)
plt.plot(x3,y4,color='black',linewidth=2)
plt.plot(x4,y5,color='black',linewidth=2)
plt.plot(x5,y6,color='black',linewidth=2)
#4脚展
plt.plot(x6,y7,color='black',linewidth=2)
plt.plot(x7,y8,color='black',linewidth=2)
plt.plot(x8,y9,color='black',linewidth=2)
plt.plot(x9,y10,color='black',linewidth=2)
#太阳展
plt.plot(x10,y11,color='y',linewidth=2)
plt.plot(x1,y12,color='y',linewidth=2)
#地面展
plt.plot(x1,y13,color='black')
#天空展
plt.plot(x1,y14,color='cyan')
plt.plot(x1,y15,color='cyan')
#草展
plt.plot(x11,y16,color='g')
plt.plot(x12,y17,color='g')
plt.plot(x13,y18,color='g')
plt.plot(x14,y19,color='g')
plt.plot(x15,y20,color='g')
#海鸥展
plt.plot(x21,y26,color='blue')
plt.plot(x22,y27,color='blue')
plt.plot(x23,y28,color='blue')
plt.plot(x24,y29,color='blue')
#树枝展
plt.plot(x25,y30,color='black')
plt.plot(x26,y31,color='black')
plt.plot(x27,y32,color='black')
plt.plot(x28,y33,color='black')#L1
plt.plot(x29,y34,color='black')
plt.plot(x30,y35,color='black')#L2
plt.plot(x31,y36,color='black')
plt.plot(x32,y37,color='black')#L3
plt.plot(x33,y38,color='black')
#树根展
plt.plot(x34,y39,color='black')
plt.plot(x35,y40,color='black')
plt.plot(x36,y41,color='black')
#树颜色补充展
plt.plot(x37,y42,color='black')
plt.plot(x37,y43,color='black')
#房顶展
plt.plot(x38,y44,color='black')
plt.plot(x39,y45,color='black')
plt.plot(x40,y46,color='black')
plt.plot(x40,y47,color='g')
#房基展
plt.plot(x41,y48,color='black')
plt.plot(x42,y49,color='black')
#门展
plt.plot(x43,y50,color='black')
plt.plot(x44,y51,color='black')
plt.plot(x45,y52,color='black')
plt.plot(x46,y53,color='black')
#窗户1展
plt.plot(x47,y54,color='black')
plt.plot(x47,y55,color='black')
plt.plot(x47,y56,color='black')
plt.plot(x48,y57,color='black')
plt.plot(x49,y58,color='black')
plt.plot(x50,y59,color='black')
#窗户2展
plt.plot(x51,y60,color='black')
plt.plot(x51,y61,color='black')
plt.plot(x51,y62,color='black')
plt.plot(x52,y63,color='black')
plt.plot(x53,y64,color='black')
plt.plot(x54,y65,color='black')
#门接地面补充
plt.plot(x43,y66,color='black')
#2头展
plt.plot(x55,y67,color='black',linewidth=2)
plt.plot(x56,y68,color='black',linewidth=2)
plt.plot(x57,y69,color='black',linewidth=2)
#爱心展示
plt.plot(x59,y72,color='r')
plt.plot(x59,y73,color='r')
plt.plot(x58,y70,color='r')
plt.plot(x58,y71,color='r')
plt.plot(x60,y74,color='r')
plt.plot(x60,y75,color='r')
#烟囱展
plt.plot(x61,y76,color='black')
plt.plot(x62,y77,color='black')
plt.plot(x63,y78,color='black')
plt.plot(x63,y79,color='black')
#彩虹展
plt.plot(x64,y80,color='r')
plt.plot(x65,y81,color='y')
plt.plot(x66,y82,color='g')
plt.plot(x67,y83,color='b')
plt.plot(x68,y84,color='pink')
plt.plot(x69,y85,color='orange')
plt.plot(x75,y86,color='black')
#楼梯展
plt.plot(x70,y87,color='black')
plt.plot(x71,y88,color='black')
plt.plot(x72,y89,color='black')
plt.plot(x72,y90,color='black')
plt.plot(x72,y91,color='black')
plt.plot(x72,y92,color='black')
plt.plot(x72,y93,color='black')
plt.plot(x72,y94,color='black')
plt.plot(x72,y95,color='black')
plt.plot(x72,y96,color='black')
plt.plot(x72,y97,color='black')
plt.plot(x72,y98,color='black')
plt.plot(x72,y99,color='black')
plt.plot(x72,y100,color='black')
plt.plot(x72,y101,color='black')
#彩虹补充展
plt.plot(x73,y102,color='pink')
plt.plot(x74,y103,color='orange')
#纸飞机展
plt.plot(x76,y104,color='black')
plt.plot(x77,y105,color='black')
plt.plot(x78,y106,color='black')
plt.plot(x79,y107,color='black')
plt.plot(x80,y108,color='black')
plt.plot(x81,y109,color='black')
plt.plot(x82,y110,color='black')
#纸飞机线展
plt.plot(x83,y111,color='r')
#太阳颜色
plt.fill_between(x1,y12,facecolor='r')
plt.fill_between(x10,y11,facecolor='w')
#地面颜色
plt.fill_between(x1,y13,facecolor='brown')
#天空颜色
plt.fill_between(x1,y14,y15,where=y15>y14,facecolor='cyan')
#树颜色
plt.fill_between(x28,y33,facecolor='g')
plt.fill_between(x29,y34,facecolor='g')
plt.fill_between(x25,y30,facecolor='w')
plt.fill_between(x30,y35,facecolor='g')
plt.fill_between(x31,y36,facecolor='g')
plt.fill_between(x26,y31,facecolor='w')
plt.fill_between(x32,y37,facecolor='g')
plt.fill_between(x33,y38,facecolor='g')
plt.fill_between(x27,y32,facecolor='w')
plt.fill_between(x36,y41,facecolor='brown')
#树颜色补充
plt.fill_between(x37,y42,y43,where=y42>y43,facecolor='g')
#窗户颜色
plt.fill_between(x47,y54,y56,where=y56>y54,facecolor='y')
plt.fill_between(x51,y60,y62,where=y62>y60,facecolor='y')
#门颜色
plt.fill_between(x43,y50,y66,where=y50>y66,facecolor='blue')
#爱心颜色
plt.fill_between(x59,y72,y73,where=y72>y73,facecolor='pink')
plt.fill_between(x60,y74,y75,where=y75>y74,facecolor='pink')
plt.fill_between(x58,y70,y71,where=y70>y71,facecolor='pink')
#烟囱颜色
plt.fill_between(x63,y78,y79,where=y78>y79,facecolor='orange')
plt.show()