Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n1=8;n2=16;
- w8=Round[.78 Table[{Cos[2[Pi] k/n1],Sin[2[Pi] k/n1]},{k,0,n1-1}],.01];
- w16=Round[1 Table[{Cos[2[Pi] k/n2],Sin[2[Pi] k/n2]},{k,0,n2-1}],.01];
- n=12;
- y1=.267;
- x2=1/Sqrt[2];
- w=1.8;
- pts={{{w,w},{w,-w},{-w,-w},{-w,w}}};
- frame=RegionPlot[{
- MeshRegion[{{w,w},{w,-w},{-w,-w},{-w,w}},Polygon[{1,2,3,4}]], (*green box *)
- ImplicitRegion[x^2+y^2<2.8,{x,y}], (*white, largest circle *)
- ImplicitRegion[Or@@(((x-#)^2+(y-#2)^2<.1)&@@@w16),{x,y}], (*yellow scallops*)
- ImplicitRegion[x^2+y^2<1,{x,y}],(*white circle *)
- ImplicitRegion[x^2+y^2<1.4,{x,y}],(*white disk*)
- ImplicitRegion[Or@@(((x-#)^2+(y-#2)^2<.15)&@@@w8),{x,y}],(*red scallops*)
- ImplicitRegion[x^2+y^2<1,{x,y}] , (*white disk *)
- ImplicitRegion[1.8 < x^2+y^2< 2.2,{x,y}] ,(*brown outer rim*)
- ImplicitRegion[2.5 < x^2+y^2< 2.8,{x,y}](*yellow outer rim*)},
- BoundaryStyle->Directive[Thickness[.005],Black],
- AspectRatio->1,
- PlotStyle->{
- Darker@Green,White,Yellow,White,White,
- Red,White,Brown,Yellow,Red,
- White,White,White,White,White,
- White,White,Red,Red,Darker@Blue,
- Darker@Blue,Darker@Blue,Darker@Blue,Darker@Blue,Darker@Blue,
- Red,Red,Darker@Blue,Red,Yellow,Red
- }];
- Graphics[{White,Disk[{0,0},.99]}]
- p1={-Cos[ArcTan[.267]],y1};
- p2={Cos[ArcTan[.267]],y1};
- p3={-Cos[ArcTan[.267]],-y1};
- p4={Cos[ArcTan[.267]],-y1};
- p5={-x2,(x2+y1)/2};
- p6={x2,(x2+y1)/2};
- p7={-x2,-(x2+y1)/2};
- p8={x2,-(x2+y1)/2};
- p9={0.5,-x2};
- p10={-0.5,-x2};
- p11={0.5,-x2};
- p12={-0.5,-x2};
- p13={a=-.34,b=-.12};
- p14={-a,b};
- p15={0.5,x2};
- p16={-0.5,x2};
- t1=MeshRegion[{{0,-1},p1,p2},Triangle[{1,2,3}]];
- t2=MeshRegion[{{0,1},p3,p4},Triangle[{1,3,2}]];
- t3=MeshRegion[{{0,-x2},p5,p6},Triangle[{1,3,2}]];
- t4=MeshRegion[{{0,x2},p7,p8},Triangle[{1,3,2}]];
- t5=MeshRegion[{{0,+y1},p9,p10},Triangle[{1,3,2}]];
- (*t6 is off *)
- t6=MeshRegion[{{0,p5[[2]]},p13,p14},Triangle[{1,3,2}]];
- t7=MeshRegion[{{0,p13[[2]]},p15,p16},Triangle[{1,3,2}]];
- t8=MeshRegion[{{0,p7[[2]]},{-.33,p1[[2]]-.12},{.33,p1[[2]]-.12}},Triangle[{1,3,2}]];
- t9=MeshRegion[{{0,p3[[2]]},{z=-.23,0.063},{-z,.063}},Triangle[{1,3,2}]];
- innerds=RegionPlot[{
- t1,(*white *)
- t2,(*white *)
- t3,(*white *)
- t4,(*white *)
- t5,(*white *)
- t6,(*white *)
- t7,(*white *)
- t8,(*white *)
- t9,(*White*)
- RegionDifference[t1,RegionUnion[t5,t4,t2]],(*Blue*)
- RegionDifference[t4,RegionUnion[t1,t3,t5]],(*red*)
- RegionDifference[t3,RegionUnion[t7,t4,t2]], (*blue*)
- RegionDifference[t2,RegionUnion[t1,t7,t3]], (*blue*)
- RegionDifference[t5,t1], (*blue*)
- RegionDifference[t4,RegionUnion[t1,t7]], (*Blue *)
- RegionDifference[t7,t2],(*Blue*)
- RegionDifference[t3,RegionUnion[t1,t2]],(*Blue *)
- RegionDifference[t8,t2], (* blue *)
- RegionDifference[t9,t5], (* red *)
- RegionDifference[t9,t6], (* red *)
- RegionIntersection[t4,RegionDifference[t6,t1]], (*blue*)
- RegionIntersection[t6,RegionDifference[t5,t8]], (* red *)
- RegionIntersection[t7,t9], (*yellow*)
- ImplicitRegion[x^2+y^2<= .001,{x,y}] (* smallest circle *) (* red *)},
- BoundaryStyle->Directive[Thickness[.005],Black],
- AspectRatio->1,
- PlotStyle->{
- White,White,White,White,White,White,White,White,White,
- Blue,Red,
- Blue,Blue,Blue,Blue,Blue,Blue,Blue,
- Red,Red,Blue,Red,Yellow,Red}]
- Show[
- frame,
- Graphics[{White,Disk[{0,0},.99]}],
- innerds]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement