Regular Nonagon

Author

Eric W. Weisstein
July 3, 2018

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Polygons/RegularNonagon.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/RegularNonagon.html.

©2018 Wolfram Research, Inc. except for portions noted otherwise

Definitions

ineq=1/4 a x Csc[Pi/9]-1/4 Sqrt[3] a y Csc[Pi/9]+1/2 a y Cos[Pi/18] Csc[Pi/9]+1/8 a^2 Cos[Pi/18] Csc[Pi/9]^2+1/2 a x Csc[Pi/9] Sin[Pi/18]+1/8 Sqrt[3] a^2 Csc[Pi/9]^2 Sin[Pi/18]≥0&&-((a y)/2)+1/2 a x Cot[Pi/9]-1/8 a^2 Csc[Pi/9]-1/4 a x Csc[Pi/9]+1/4 Sqrt[3] a y Csc[Pi/9]+1/8 Sqrt[3] a^2 Cot[Pi/9] Csc[Pi/9]≥0&&a y+1/2 a^2 Cot[Pi/9]≥0&&-((a y)/2)-1/2 a x Cot[Pi/9]-1/8 a^2 Csc[Pi/9]+1/4 a x Csc[Pi/9]+1/4 Sqrt[3] a y Csc[Pi/9]+1/8 Sqrt[3] a^2 Cot[Pi/9] Csc[Pi/9]≥0&&-(1/4) a x Csc[Pi/9]-1/4 Sqrt[3] a y Csc[Pi/9]+1/2 a y Cos[Pi/18] Csc[Pi/9]+1/8 a^2 Cos[Pi/18] Csc[Pi/9]^2-1/2 a x Csc[Pi/9] Sin[Pi/18]+1/8 Sqrt[3] a^2 Csc[Pi/9]^2 Sin[Pi/18]≥0&&-(1/2) a y Cos[Pi/18] Csc[Pi/9]-1/2 a x Cos[(2 Pi)/9] Csc[Pi/9]+1/4 a^2 Cos[Pi/18] Cos[(2 Pi)/9] Csc[Pi/9]^2+1/2 a x Csc[Pi/9] Sin[Pi/18]+1/2 a y Csc[Pi/9] Sin[(2 Pi)/9]-1/4 a^2 Csc[Pi/9]^2 Sin[Pi/18] Sin[(2 Pi)/9]≥0&&-(1/2) a x Csc[Pi/9]+1/2 a x Cos[(2 Pi)/9] Csc[Pi/9]-1/2 a y Csc[Pi/9] Sin[(2 Pi)/9]+1/4 a^2 Csc[Pi/9]^2 Sin[(2 Pi)/9]≥0&&1/2 a x Csc[Pi/9]-1/2 a x Cos[(2 Pi)/9] Csc[Pi/9]-1/2 a y Csc[Pi/9] Sin[(2 Pi)/9]+1/4 a^2 Csc[Pi/9]^2 Sin[(2 Pi)/9]≥0&&-(1/2) a y Cos[Pi/18] Csc[Pi/9]+1/2 a x Cos[(2 Pi)/9] Csc[Pi/9]+1/4 a^2 Cos[Pi/18] Cos[(2 Pi)/9] Csc[Pi/9]^2-1/2 a x Csc[Pi/9] Sin[Pi/18]+1/2 a y Csc[Pi/9] Sin[(2 Pi)/9]-1/4 a^2 Csc[Pi/9]^2 Sin[Pi/18] Sin[(2 Pi)/9]≥0;

implreg=ImplicitRegion[ineq,{x,y}];

verts=a{{-(1/2) Cos[Pi/18] Csc[Pi/9],1/2 Csc[Pi/9] Sin[Pi/18]},{-(1/4) Sqrt[3] Csc[Pi/9],-(1/4) Csc[Pi/9]},{-(1/2),-(1/2) Cot[Pi/9]},{1/2,-(1/2) Cot[Pi/9]},{1/4 Sqrt[3] Csc[Pi/9],-(1/4) Csc[Pi/9]},{1/2 Cos[Pi/18] Csc[Pi/9],1/2 Csc[Pi/9] Sin[Pi/18]},{1/2 Csc[Pi/9] Sin[(2 Pi)/9],1/2 Cos[(2 Pi)/9] Csc[Pi/9]},{0,1/2 Csc[Pi/9]},{-(1/2) Csc[Pi/9] Sin[(2 Pi)/9],1/2 Cos[(2 Pi)/9] Csc[Pi/9]}};

reg=Polygon[verts];

assum=a>0;

Figure

Show[LaminaData["FilledRegularNonagon","Diagram"],ImageSize->300]

Plots

Diagram

LaminaData["FilledRegularNonagon","Diagram"]

DiscretizeRegion

Block[{a=1},DiscretizeRegion[#]]&/@{reg,implreg}

Polygon

Graphics[RegularPolygon[9]//N]

Schematic Diagram

r=RegularPolygon[9][[1,1]];
o={0,0};
m=(r[[9]]+r[[1]])/2;
bc=(r[[1]]+r[[2]])/2;
x={Cos[3Pi/9],Sin[3Pi/9]};
ox=(o+x)/2;
pts={r[[9]],"A",r[[1]],"B",r[[2]],"C",r[[3]],
			"D",r[[4]],"E",r[[5]],"F",r[[6]],"G",r[[7]],"H",r[[8]],"I",
		o,"O",m,"(Subscript[M, AB])",x,"(Subscript[X, BC])",ox,"(Subscript[M, OX])"};

Show[Graphics[{
		RegularPolygon[9],
			Line[{o,x}],
			{Thickness[.02],Line[{o,m,ox}]},
			PointLabels[pts,.035],
			{Dashing[{.02,.02}],Circle[{0,0},1]}
		}],AspectRatio->Automatic]

FullSimplify[(m-o).(m-ox)/Sqrt[(m-o).(m-o)]/Sqrt[(m-ox).(m-ox)]]

Cos[30 Degree]

Equations

Inequality

RegularPolygon[9,1/2Csc[π/9],-π/18+π]

Refine[Inequalities[RegularPolygon[9,a/2Csc[π/9],-π/18+π],{x,y}],a>0]

ineq[x_,y_]:=(1/4) a x Csc[(π/9)]-(1/4) (Sqrt[3]) a y Csc[(π/9)]+(1/2) a y Cos[(π/18)] Csc[(π/9)]+(1/8) (a^2) Cos[(π/18)] ((Csc[(π/9)])^2)+(1/2) a x Csc[(π/9)] Sin[(π/18)]+(1/8) (Sqrt[3]) (a^2) ((Csc[(π/9)])^2) Sin[(π/18)]≥0&&-((a y)/2)+(1/2) a x Cot[(π/9)]-(1/8) (a^2) Csc[(π/9)]-(1/4) a x Csc[(π/9)]+(1/4) (Sqrt[3]) a y Csc[(π/9)]+(1/8) (Sqrt[3]) (a^2) Cot[(π/9)] Csc[(π/9)]≥0&&a y+(1/2) (a^2) Cot[(π/9)]≥0&&-((a y)/2)-(1/2) a x Cot[(π/9)]-(1/8) (a^2) Csc[(π/9)]+(1/4) a x Csc[(π/9)]+(1/4) (Sqrt[3]) a y Csc[(π/9)]+(1/8) (Sqrt[3]) (a^2) Cot[(π/9)] Csc[(π/9)]≥0&&-(1/4) a x Csc[(π/9)]-(1/4) (Sqrt[3]) a y Csc[(π/9)]+(1/2) a y Cos[(π/18)] Csc[(π/9)]+(1/8) (a^2) Cos[(π/18)] ((Csc[(π/9)])^2)-(1/2) a x Csc[(π/9)] Sin[(π/18)]+(1/8) (Sqrt[3]) (a^2) ((Csc[(π/9)])^2) Sin[(π/18)]≥0&&-(1/2) a y Cos[(π/18)] Csc[(π/9)]-(1/2) a x Cos[((2 π)/9)] Csc[(π/9)]+(1/4) (a^2) Cos[(π/18)] Cos[((2 π)/9)] ((Csc[(π/9)])^2)+(1/2) a x Csc[(π/9)] Sin[(π/18)]+(1/2) a y Csc[(π/9)] Sin[((2 π)/9)]-(1/4) (a^2) ((Csc[(π/9)])^2) Sin[(π/18)] Sin[((2 π)/9)]≥0&&-(1/2) a x Csc[(π/9)]+(1/2) a x Cos[((2 π)/9)] Csc[(π/9)]-(1/2) a y Csc[(π/9)] Sin[((2 π)/9)]+(1/4) (a^2) ((Csc[(π/9)])^2) Sin[((2 π)/9)]≥0&&(1/2) a x Csc[(π/9)]-(1/2) a x Cos[((2 π)/9)] Csc[(π/9)]-(1/2) a y Csc[(π/9)] Sin[((2 π)/9)]+(1/4) (a^2) ((Csc[(π/9)])^2) Sin[((2 π)/9)]≥0&&-(1/2) a y Cos[(π/18)] Csc[(π/9)]+(1/2) a x Cos[((2 π)/9)] Csc[(π/9)]+(1/4) (a^2) Cos[(π/18)] Cos[((2 π)/9)] ((Csc[(π/9)])^2)-(1/2) a x Csc[(π/9)] Sin[(π/18)]+(1/2) a y Csc[(π/9)] Sin[((2 π)/9)]-(1/4) (a^2) ((Csc[(π/9)])^2) Sin[(π/18)] Sin[((2 π)/9)]≥0

Block[{a=1},RegionPlot[ineq[x,y],{x,-1.5,1.5},{y,-1.4,1.5}]]

Properties

Area

Area

Assuming[assum,FullSimplify[Area[reg/.a->1]]]//Timing

Assuming[assum,FullSimplify[Area[implreg/.a->1]]]//Timing

NIntegrate

Block[{a=1},NIntegrate[Boole[ineq[x,y]],{x,-1.5,1.5},{y,-1.5,1.5}]]

Integrate

(area=Block[{a=1},Integrate[Boole[ineq[x,y]],{x,-∞,∞},{y,-∞,∞}]])//Timing

...ran overnight—crashed/ran out of memory?...

Area[RegularPolygon[9,1/2Csc[π/9]]]//FullSimplify

N[%]

Assuming[a>0,Area[ineq[x,y],{x,y}]]//FullSimplify//Timing

RegionMeasure

Assuming[assum,FullSimplify[RegionMeasure[reg]]]

Assuming[assum,FullSimplify[RegionMeasure[implreg]]]

AreaInertiaTensor

Assuming[a>0,AreaInertiaTensor[ineq[x,y],{x,y}]]//FullSimplify//Timing

Centroid

NIntegrate

Block[{a=1},NIntegrate[{x,y}Boole[ineq[x,y]],{x,-1.5,1.5},{y,-1.5,1.5}]]

Integrate

Block[{a=1},NIntegrate[{x,y}Boole[ineq[x,y]],{x,-1.5,1.5},{y,-1.5,1.5},Method->"QuasiMonteCarlo"]]

Assuming[a>0,Centroid[ineq[x,y],{x,y}]]//FullSimplify//Timing

RegionCentroid

Assuming[assum,FullSimplify[RegionCentroid[reg/.a->1]]]//Timing

Assuming[assum,FullSimplify[RegionCentroid[implreg/.a->1]]]//Timing

Convex

TimeConstrained[Region`ConvexRegionQ[reg],600]//Timing

TimeConstrained[Region`ConvexRegionQ[implreg],600]//Timing

Diagonals

Length[v={{-(1/2) Cos[Pi/18] Csc[Pi/9],1/2 Csc[Pi/9] Sin[Pi/18]},{-(1/4) Sqrt[3] Csc[Pi/9],-(1/4) Csc[Pi/9]},{-(1/2),-(1/2) Cot[Pi/9]},{1/2,-(1/2) Cot[Pi/9]},{1/4 Sqrt[3] Csc[Pi/9],-(1/4) Csc[Pi/9]},{1/2 Cos[Pi/18] Csc[Pi/9],1/2 Csc[Pi/9] Sin[Pi/18]},{1/2 Csc[Pi/9] Sin[(2 Pi)/9],1/2 Cos[(2 Pi)/9] Csc[Pi/9]},{0,1/2 Csc[Pi/9]},{-(1/2) Csc[Pi/9] Sin[(2 Pi)/9],1/2 Cos[(2 Pi)/9] Csc[Pi/9]}}]

ds=With[{n=Length[v]},Select[Subsets[Range[n],{2}],Mod[Subtract@@#,n]≠n-1≠1&]]

Length[%]

FullSimplify[Binomial[n,2]-n]

n(n-3)/2/.n->Length[v]

Graphics[{
{Yellow,Opacity[.2],EdgeForm[Black],Polygon[v]},
Line[ds]/.Thread[Range[Length[v]]->v]
}]

SortBy[FullSimplify@RootReduce[Norm[Subtract@@v[[#]]]&/@ds],N]

EdgeLengths

s=FullSimplify[Norm/@(Subtract@@@Partition[verts,2,1,1]),assum]

GeneralizedDiameter

GD[n_]:=If[OddQ[n],(1/2) Csc[(π/(2 n))],Csc[(π/n)]]a

GD[9]

(1/2)  Csc[(π/18)]//N

ineqs=FullSimplify[And@@ineq@@@{{x1,y1},{x2,y2}},a>0]/.a->1

Maximize[{(x1-x2)^2+(y1-y2)^2,ineqs},{x1,x2,y1,y2},Reals]//Timing

Perimeter

Total[s]

RadiiOfGyration

Assuming[a>0,RadiiOfGyration[ineq[x,y],{x,y}]]//FullSimplify//Timing

Vertices

Graphics[MapIndexed[{Point[#1],Text[#2[[1]],#1,Background->White]}&,p=RegularPolygon[7,1/2Csc[π/7],-π/14][[1]]]]

FullSimplify[Through[{MinValue,MaxValue}[{x,ineq[x,y]},{x,y}]],a>0]//Timing

FullSimplify[Through[{MinValue,MaxValue}[{y,ineq[x,y]},{x,y}]],a>0]//Timing