# # What part of a cube is nearer its center than any of its corners? # (Half). # Visualization and representation. # There's a beautiful conceptual proof, but you don't need Maple sheets # for the concepts. In a nutshell, the proof is this: the points nearest # one corner, and those nearest the center, split their octant in half # by symmetry. QED. > with(plots): > with(plottools): > xs:=proc(h) if h<1/2 then > RETURN(polygon([[1/2-h,1],[1,1/2-h],[1,h-1/2],[1/2-h,-1],[h-1/2,-1],[- > 1,h-1/2],[-1,1/2-h],[h-1/2,1],[1/2-h,1]],color=blue)) else > RETURN(polygon([[3/2-h,0],[0,h-3/2],[h-3/2,0],[0,3/2-h],[3/2-h,0]],col > or=blue))fi end; xs := proc(h) if h < 1/2 then RETURN(polygon([[1/2 - h, 1], [1, 1/2 - h], [1, h - 1/2], [1/2 - h, -1], [h - 1/2, -1], [-1, h - 1/2], [-1, 1/2 - h], [h - 1/2, 1], [1/2 - h, 1]], color = blue)) else RETURN(polygon([[3/2 - h, 0], [0, h - 3/2], [h - 3/2, 0], [0, 3/2 - h], [3/2 - h, 0]], color = blue)) fi end # This shows the cross section in the plane z=1/3 of the part of the # cube nearer the center than any of the 8 corners. For any particular # point, there is only one corner which is even a contender for # "nearest". The boundary between center and corner nearness is a plane: # one of these planes, between the center and (1,1,1), has equation # x+y+z=3/2. The shape we want is what's left of the cube after slicing # off everything on the far side from the origin of this plane, and of # the other seven like it. > display(xs(1/3)); # The animation below shows the cross sections as h runs from 1 to -1. # This shows what portion of the cube is nearest the center, cross # section by cross section, as the cross sectioning plane passes through # the cube. # # > rr:=[seq(xs(abs(k)/30),k=-30..30)]: > display(rr,insequence=true); > xs3d:=proc(h) if abs(h)<1/2 then > RETURN(polygon([[1/2-abs(h),1,h],[1,1/2-abs(h),h],[1,abs(h)-1/2,h],[1/ > 2-abs(h),-1,h],[abs(h)-1/2,-1,h],[-1,abs(h)-1/2,h],[-1,1/2-abs(h),h],[ > abs(h)-1/2,1,h],[1/2-abs(h),1,h]],color=blue)) else > RETURN(polygon([[3/2-abs(h),0,h],[0,abs(h)-3/2,h],[abs(h)-3/2,0,h],[0, > 3/2-abs(h),h],[3/2-abs(h),0,h]],color=blue))fi end; xs3d := proc(h) if abs(h) < 1/2 then RETURN(polygon([[1/2 - abs(h), 1, h], [1, 1/2 - abs(h), h], [1, abs(h) - 1/2, h], [1/2 - abs(h), -1, h], [abs(h) - 1/2, -1, h], [-1, abs(h) - 1/2, h], [-1, 1/2 - abs(h), h], [abs(h) - 1/2, 1, h], [1/2 - abs(h), 1, h]], color = blue)) else RETURN(polygon([[3/2 - abs(h), 0, h], [0, abs(h) - 3/2, h], [abs(h) - 3/2, 0, h], [0, 3/2 - abs(h), h], [3/2 - abs(h), 0, h]], color = blue)) fi end > display({xs3d(0),xs3d(1/4),xs3d(1/2),xs3d(3/4),xs3d(1)}); > xssq3d:=proc(h) > polygon([[1,1,h],[1,-1,h],[-1,-1,h],[-1,1,h],[1,1,h]],color=yellow)end > ; xssq3d := proc(h) polygon( [[1, 1, h], [1, -1, h], [-1, -1, h], [-1, 1, h], [1, 1, h]], color = yellow) end # This next display is best viewed using the options wireframe, and the # projection option, constrained. You can see how the central region # fits into the cube. > display({seq(xs3d(k/5),k=-5..5),seq(xssq3d(k/5),k=-5..5)}); # This next object should also be viewed using the projection option, # constrained. > display({seq(xs3d(k/20),k=0..20)}); # To see the object itself, and not through the lens of a slice-by-slice # dissection, execute the lines below. > with(plottools); [arc, arrow, circle, cone, cuboid, curve, cutin, cutout, cylinder, disk, dodecahedron, ellipse, ellipticArc, hemisphere, hexahedron, hyperbola, icosahedron, line, octahedron, pieslice, point, polygon, rectangle, rotate, scale, semitorus, sphere, stellate, tetrahedron, torus, transform, translate] > with(plots): > top:=polygon([[0,1/2,1],[1/2,0,1],[0,-1/2,1],[-1/2,0,1],[0,1/2,1]],col > or=blue): > bottom:=polygon([[0,1/2,-1],[1/2,0,-1],[0,-1/2,-1],[-1/2,0,-1],[0,1/2, > -1]],color=blue): > spinit:=proc(pt)[pt[2],pt[3],pt[1]]end; spinit := proc(pt) [pt[2], pt[3], pt[1]] end > side1:=map(spinit,[[0,1/2,1],[1/2,0,1],[0,-1/2,1],[-1/2,0,1],[0,1/2,1] > ]): > side2:=map(spinit,side1): > side3:=map(spinit,[[0,1/2,-1],[1/2,0,-1],[0,-1/2,-1],[-1/2,0,-1],[0,1/ > 2,-1]]): > side4:=map(spinit,side3): > s1:=polygon(side1,color=blue):s2:=polygon(side2,color=blue):s3:=polygo > n(side3,color=blue):s4:=polygon(side4,color=blue): > f1:=[[1,0,1/2],[1,1/2,0],[1/2,1,0],[0,1,1/2],[0,1/2,1],[1/2,0,1],[1,0, > 1/2]]: > f2:=-f1: > hex1:=polygon(f1,color=green):hex2:=polygon(f2,color=green): > f3:=map(u->[-u[1],u[2],u[3]],f1):f4:=-f3:hex3:=polygon(f3,color=green) > :hex4:=polygon(f4,color=green): > f5:=map(u->[u[1],-u[2],u[3]],f1):f6:=-f3:hex5:=polygon(f5,color=green) > :hex6:=polygon(f6,color=green): > f7:=map(u->[u[1],u[2],-u[3]],f1):f8:=-f7:hex7:=polygon(f7,color=green) > :hex8:=polygon(f8,color=green): > display({top,bottom,s1,s2,s3,s4,hex1,hex2,hex3,hex4,hex5,hex6,hex7,hex > 8},style=PATCH,axes=BOXED); >