Mass Center of a Truncated Cylinder

(*vol=Integrate[4(-k y+n1)Sqrt[1-y^2],{y,-1,1}];
momenty=Integrate[4y(-k y+n1)Sqrt[1-y^2],{y,-1,1}];
momenty/vol;
Solve[k^2-n1 k +1==0,k]*)
angles[n_]:=Table[-Pi/2+(Pi/n)+(i 2Pi/n ),{i,0,n,1}]//N
topoint[al_]:={Cos[al],Sin[al]};
d=0.25;

Manipulate[If[k>=(1/2) (n1+(Sqrt[-4+(n1^2)])),k=(1/2) (n1+(Sqrt[-4+(n1^2)]))];If[!shrp,Column[{If[!sh,Graphics[Rotate[{Line[{{1,-k+n1},{-1,k+n1},{-1,-k-n1},{1,k-n1}}],{Red,Line[{{1,-k+n1},{1,k-n1}}]},PointSize[0.02],Point[{-(k/(4 n1)),0}]},Pi/2,{0,0}],ImageSize->{370,370},Axes->shax,AxesLabel->{-z,y},PlotRange->{2{-n1,n1}/zoom,{-2,2}}],
Graphics[{Circle[],{Red,PointSize[0.02],Point[{0,-(k/(4 n1))}]}},ImageSize->{370,370},Axes->shax,AxesLabel->{x,y}]],Text@Row[{Style["y",Italic]," coordinate of mass center = ",-(k/(4 n1))}]}, Alignment-> Center],Column[{Graphics[{If[!shrp,Circle[],{}],Line[{{0,0},{0,-1}}],Line[Map[topoint,angles[m]]],Line[{{0,-d},topoint[angles[m][[1]]]}],Text[Style["A",16],{0,-d},1.5{1,0}],Text[Style["B",16],topoint[angles[m][[1]]],{-1,1}],Text[Style["C",16],topoint[angles[m][[2]]],{-1,1}]},ImageSize->{370,370}],Row[{"scalar product of AB and BC = ", (topoint[angles[m][[1]]]-{0,-d}).(topoint[angles[m][[2]]]-topoint[angles[m][[1]]])}]}, Alignment-> Center]],{{n1,2,Style["n",Italic]},2,100,Appearance->"Labeled",ImageSize-> Tiny},{{k,0,Style["k",Italic]},0,(1/2) (n1+(Sqrt[-4+(n1^2)])),Appearance->"Labeled",ImageSize-> Tiny},
{zoom,1,20,Enabled->!sh, ImageSize-> Tiny},
Delimiter,
"show cross-section",
{{sh,False,""},{False,True}},
{{shax,True,"show axes"},{False,True}},
Delimiter,
Row[{"show regular ",Style["m",Italic],"-gon"}],
{{shrp,False,""},{False,True}},
{{m,5,Style["m",Italic]},5,101,2,Appearance->"Labeled",ImageSize-> Tiny},
ControlPlacement-> Left,SaveDefinitions->True]

Let z axis be the axis of a cylinder of radius 1. If we take part of the cylinder  between planes z=-k y+n and z=k y-n, the solid obtained has volume 2π n and static moment about y axis -π k/2. So the mass center is at y=-k/(4n). The solid is stable only on bottom edge. The limit of -k/(4n) when n->∞, k->∞, k<n is -1/4.

Suppose now that the cross-section is a regular m-gon, where m is a large odd integer and that n and k are chosen so that mass center is near -0.25. To achieve uni-stability the scalar product of vectors AB and BC should be positive. But for this m should be greater than (10^12).

Contributed by: Izidor Hafner