Wen-Xiu Ma recently asked in the maple-assist group,
How to color the following region?
a:=plot([t^2,t^3-1,t=-3..3):
b:=plot([t^3+1,t^2-3,t=-3..3):
c:=plot([t^2+2,t^5-4,t=-3..3):
display([a,b,c],view=[0..5,-3.5..11]);
I posted 2 replies to his question. First reply: That requires some work. For example, it can be done as follows,
x1:=subs(fsolve({t^2=u^3+1,t^3-1=u^2-3}),t^2):
x2:=subs(fsolve({u^3+1=v^2+2,u^2-3=v^5-4}),u^3+1):
x3:=subs(fsolve({t^2=v^2+2,t^3-1=v^5-4},{t=0..3,v=0..2}),t^2):
c1:=op([1,1],plot(-x^(3/2)-1,x=0..x1,numpoints=20)):
c2:=op([1,1],plot((x-1)^(2/3)-3,x=x1..x2,numpoints=20)):
c3:=op([1,1],plot((x-2)^(5/2)-4,x=x2..x3,numpoints=20)):
c4:=op([1,1],plot(x^(3/2)-1,x=0..x3,numpoints=60)):
c5:=[op(c1),op(c2),op(c3)]:
d:=POLYGONS(seq([c5[i],c5[i+1],c4[i+1],c4[i]],i=1..59),
     STYLE(PATCHNOGRID),COLOR(HUE,0.1)):
a:=plot([t^2,t^3-1,t=-3..3]):
b:=plot([t^3+1,t^2-3,t=-3..3]):
c:=plot([t^2+2,t^5-4,t=-3..3]):
plots[display](a,b,c,d,view=[0..5,-3.5..11]);
Second reply: Also, it can be done more simple,
a:=plot([t^2,t^3-1,t=-3..3]):
b:=plot([t^3+1,t^2-3,t=-3..3]):
c:=plot([t^2+2,t^5-4,t=-3..3]):
a1:=plot([t^2,t^3+2,t=0..3],filled=true):
a2:=plot([t^2,t^3+2,t=-3..0],filled=true,color=white):
b1:=plot([t^3+1,t^2,t=-3..3],filled=true,color=white):
c1:=plot([t^2+2,t^5-1,t=-3..3],filled=true,color=white):
f:=plottools[transform]((x,y)->[x,y-3]):
plots[display](a,b,c,f(c1),f(b1),f(a2),f(a1),view=[0..5,-3.5..11]);

Please Wait...