Circle

Author

Eric W. Weisstein
June 6, 2014

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PlaneCurves/Circle.nb.

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

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

Definition

circle=a{Cos[t],Sin[t]};

Figure

Graphics[{Circle[{0,0},1],PointSize[.03],Point[{0,0}],Arrow[{{0,0},{1,1}/(Sqrt[2])}],
{Blue,Arrow[1.15Table[Through[{Cos,Sin}[2π n/100]],{n,0,99}]]},
Text[Style["O",Italic],-.1{1,1}],
Text[Style["C",Italic],{-1.15,0}, Background->White],
Text[Style["r",Italic],{.35,.2}]
}]

Equations

Cartesian

GroebnerBasis[Append[Thread[{x,y}==circle],Cos[t]^2+Sin[t]^2==1],{x,y},{Cos[t],Sin[t]}]

eqn=-(a^2)+(x^2)+(y^2);

Natural Parametric

Solve[s==a t,t]

Parametric

ParametricPlot[{Cos[t],Sin[t]},{t,0,2π}]

Graphic

Show[Graphics[{Red,Circle[]}],AspectRatio->Automatic,ImageSize->150,Axes->True,Ticks->None]

RegionPlot[x^2+y^2<1,{x,-1,1},{y,-1,1},PlotStyle->Hue[.5],Frame->False,Axes->True,ImageSize->150]

Properties

Area

Integrate[Boole[x^2+y^2<a^2],{x,-∞,∞},{y,-∞,∞},Assumptions->a>0]

Curvature

Parametric

Simplify[Curvature[circle,t],a>0]

Polar

FullSimplify[Curvature[a,q],a>0&&0<q<2π]

Implicit

Curvature[eqn,{x,y}]

Simplify[%]

Curvature[eqn,{x,y}]

Arc Length

Simplify[ArcLength[circle,t],a>0]

Area Moment of Inertia

Integrate[{{(y^2),x y},{x y,(x^2)}}Boole[x^2+y^2<a^2],{x,-a,a},{y,-a,a},Assumptions->a>0]

Integrate[{{(y^2),x y},{x y,(x^2)}}Boole[x^2+y^2<a^2],{x,-∞,∞},{y,-∞,∞},Assumptions->a>0]

Centroid

Integrate[{x,y}Boole[x^2+y^2<a^2],{x,-a,a},{y,-a,a},Assumptions->a>0]

Integrate[{x,y}Boole[x^2+y^2<a^2],{x,-∞,∞},{y,-∞,∞},Assumptions->a>0]

Differential Equation

circle=(y[x]-y0)^2+(x-x0)^2-r^2;
eqs=Table[D[circle,{x,i}],{i,0,3}];

gb=GroebnerBasis[eqs,{x,y[x],y'[x],y''[x],y'''[x]},{x0,y0,r},MonomialOrder->EliminationOrder]//InputForm

TraditionalForm[gb[[1]]==0]

Solve[circle==0,y[x]]

expr=(Sqrt[(r^2)-(x^2)+2 x x0-(x0^2)])+y0;

Simplify[expr/.{x->0,x0->0,y0->0},r>0]

D[expr,x]/.{x->0,x0->0,y0->0}

Simplify[D[expr,{x,2}]/.{x->0,x0->0,y0->0},r>0]

FullSimplify[DSolve[3 y'[x] ((y''[x])^2)-Derivative[3][y][x]-((y'[x])^2) Derivative[3][y][x]==0&&y[0]==r&&y'[0]==0&&y''[0]==-1/r,y[x],x],r>0]

soln=Block[{r=1,ϵ=.01},NDSolve[3 y'[x] ((y''[x])^2)-Derivative[3][y][x]-((y'[x])^2) Derivative[3][y][x]==0&&y[0]==r&&y'[0]==0&&y''[0]==-1/r,y[x],{x,-r+ϵ,r-ϵ}]][[1,1,2]]

Plot[soln,{x,-.99,.99},AspectRatio->Automatic]

soln=Block[{r=1,ϵ=.01},NDSolve[3 y'[x] ((y''[x])^2)-Derivative[3][y][x]-((y'[x])^2) Derivative[3][y][x]==0&&y[0]==-r&&y'[0]==0&&y''[0]==1/r,y[x],{x,-r+ϵ,r-ϵ}]][[1,1,2]]

Plot[soln,{x,-.99,.99},AspectRatio->Automatic]

Slope

Slope[a {Cos[t],Sin[t]},t]

Slope[x^2+y^2==a^2,{x,y}]

Slope[x^2+y^2==a^2,{x,y}]

Slope[a,q]

SpecialAffineCurvature

FullSimplify[SpecialAffineCurvature[circle,t],a>0]

Tangential Angle

Simplify[TangentialAngle[circle,t],t>0]

Vector Length

FullSimplify[VectorLength[a {Cos[t],Sin[t]},t],a>0&&t∈Reals]

FullSimplify[VectorLength[x^2+y^2==a^2,{x,y}],a>0]

Limit of Regular Polygon

Arc Length

Limit[2r n Tan[(π/n)],n->∞]

Limit[2R n Sin[(π/n)],n->∞]

Area

Limit[n (r^2)Tan[(π/n)],n->∞]

Limit[(1/2)n R^2 Sin[((2π)/n)],n->∞]

Derived Curves

Normals and Tangent

NormalTangentPlot[{Cos[t],Sin[t]},{t,0,2Pi,Pi/8},.5]

Parallel Curves

FullSimplify[ParallelCurve[a{Cos[t],Sin[t]},t,k],a>0]

ParallelCurvesPlot[{Cos[t],Sin[t]},{-1,1,.2},{t,0,2Pi}]

Cartesian Coordinates

Through Three Points

ThreePointCircle@@Array[x,{3,2}]

Manipulate[Graphics[ThreePointCircle[p1,p2,p3],PlotRange->1],
{{p1,{0,0}},{-1,-1},{1,1},ControlType->Locator},
{{p2,{.5,0}},{-1,-1},{1,1},ControlType->Locator},
{{p3,{0,.5}},{-1,-1},{1,1},ControlType->Locator},SaveDefinitions->True
]

Trilinear Coordinates

Through Four Points

t=Triangle[Table[Random[Real,{0,1},100],{3},{2}]];

TrilinearCircle2[p1_,p2_,p3_]:=Module[
{
d
},
{αα[1],ββ[1],γγ[1]}=p1;
{αα[2],ββ[2],γγ[2]}=p2;
{αα[3],ββ[3],γγ[3]}=p3;
{αe,βe,γe}=ExactTrilinears[{α,β,γ}];
d=Det[{p1,p2,p3}];
f[i_]:=-(a ββ[i]γγ[i]+b γγ[i]αα[i]+c αα[i]ββ[i])/(a αα[i]+b ββ[i]+c γγ[i]);
{αe,βe,γe}.{
f[1](ββ[2] γγ[3]-ββ[3] γγ[2])+f[2](ββ[3] γγ[1]-ββ[1] γγ[3])+f[3](ββ[1] γγ[2]-ββ[2] γγ[1]),
f[1](γγ[2]αα[3]-γγ[3]αα[3])+f[2](γγ[3]αα[1]-γγ[1]αα[3])+f[3](γγ[1]αα[2]-γγ[2]αα[1]),
f[1](αα[2]ββ[3]-αα[3]ββ[2])+f[2](αα[3]ββ[1]-αα[1]ββ[3])+f[3](αα[1]ββ[2]-αα[2]ββ[1])
}(a αe+b βe+c γe)/d+(a βe γe+b γe αe+c αe βe)
]

Expand[(Det[{{α1,β1,γ1},{α2,β2,γ2},{α3,β3,γ3}}])-(α1(β2 γ3-β3 γ2)+α2(β3 γ1-β1 γ3)+α3(β1 γ2-β2 γ1))]

Expand[TrilinearCircle2[Sequence@@(ExactTrilinears/@{X[2],X[15],X[16]})]/.Thread[{α,β,γ}->ExactTrilinears[X[2]]]/.Thread[{a,b,c}->SideLengths[Evaluate[t]]]/.Thread[{A,B,C}->Angles[t]]]

Expand[TrilinearCircle[X[3],X[5],X[13]]/.Thread[{α,β,γ}->ExactTrilinears[X[14]]]/.Thread[{a,b,c}->SideLengths[Evaluate[t]]]/.Thread[{A,B,C}->Angles[t]]]

ExactTrilinears[{α,β,γ}]

Det[{{α1,β1,γ1},{α2,β2,γ2},{α3,β3,γ3}}]

MatrixForm[{{c,a,b}.Times@@@Partition[#,2,1,1],Sequence@@#}&/@{{α,β,γ},{α1,β1,γ1},{α2,β2,γ2},{α3,β3,γ3}}]//TraditionalForm

{a,ff/@{1,2,3}}

Simplify[c α β+b α γ+a β γ]//TraditionalForm

t

<<PlaneGeometry`

TrilinearCircle[X[3],X[5],X[13]]

Trilinears[Circumcircle]:={0,0,0}

(a β γ+b γ α+c α β/.γ->1/.Thread[{a,b,c}->SideLengths[Evaluate[t]]]/.Thread[{A,B,C}->Angles[t]])==0

Solve[%,α]

Show[Graphics[{
ParametricPlot[Evaluate[TrilinearToCartesian[t,{-((0.8602325267042626` β)/(0.58309518948453`+β)),β,1}]],{β,-20,20},
DisplayFunction->Identity][[1]],
{Red,t}
}],
AspectRatio->Automatic]

Simplify[Solve[(TrilinearCircle[X[2],X[15],X[16]]/.γ->1/.Thread[{a,b,c}->SideLengths[Evaluate[t]]]/.Thread[{A,B,C}->Angles[t]])==0,β]]

Radius from center alpha:beta:gamma

α^2*(-beta^2-gamma^2-2*beta*gamma*Cos[A]+r2*Sin[A]^2)+β^2*(-alpha^2-gamma^2-2*alpha*gamma*Cos[B]+r2*Sin[B]^2)+γ^2*(-alpha^2-beta^2-2*alpha*beta*Cos[C]+r2*Sin[C]^2)+2*α*β*(alpha*beta+alpha*gamma*Cos[A]+beta*gamma*Cos[B]-gamma^2*Cos[C]+r2*Sin[A]*Sin[B])+2*α*γ*(alpha*gamma+alpha*beta*Cos[A]-beta^2*Cos[B]+beta*gamma*Cos[C]+r2*Sin[A]*Sin[C])+2*β*γ*(beta*gamma-alpha^2*Cos[A]+alpha*beta*Cos[B]+alpha*gamma*Cos[C]+r2*Sin[B]*Sin[C])==0

Circle Function from center and radius

soln=Solve[
{
α==l+k Cos[A]-n Cos[B]-m Cos[C],
β==m-n Cos[A]+k Cos[B]-l Cos[C],
γ==n-m Cos[A]-l Cos[B]+k Cos[C],
k==1
},
{l,m,n}]

FullSimplify[soln]

RotateLeft[CyclicTrilinears[(((Cos[A])^2) Cos[C]-Cos[A] (β-2 Cos[B]+α Cos[C])-Cos[B] (α+(β-Cos[B]) Cos[C])+(-γ+Cos[C]) ((Sin[C])^2))/(-1+((Cos[A])^2)+((Cos[B])^2)+2 Cos[A] Cos[B] Cos[C]+((Cos[C])^2))]]

Simplify[Subtract@@{(4 α ((Cos[A])^2)-2 ((Cos[A])^3)+Cos[A] (13-3 Cos[2 A]-8 β Cos[B]+4 Cos[2 B]-8 γ Cos[C]+4 Cos[2 C])-4 (α+2 Cos[B] (γ-2 Cos[C])+2 β Cos[C]+α ((Sin[A])^2)))/(4 (1+Cos[2 A]+Cos[2 B]+4 Cos[A] Cos[B] Cos[C]+Cos[2 C])),
(Cos[A] ((Cos[B])^2)-Cos[B] (γ+β Cos[A]-2 Cos[C])-(β+Cos[A] (γ-Cos[C])) Cos[C]+(-α+Cos[A]) ((Sin[A])^2))/(-1+((Cos[A])^2)+((Cos[B])^2)+2 Cos[A] Cos[B] Cos[C]+((Cos[C])^2))}]

coefs=Coefficient[l=Cos[A] ((Cos[B])^2)-Cos[B] (γ+β Cos[A]-2 Cos[C])-(β+Cos[A] (γ-Cos[C])) Cos[C]+(-α+Cos[A]) ((Sin[A])^2),#]&/@{α,β,γ}

Simplify[l-coefs.{α,β,γ}]

coefs.{α,β,γ}+2 Cos[B] Cos[C]+Cos[A] (((Cos[B])^2)+((Cos[C])^2)+((Sin[A])^2))

Simplify[%==l]

(-α ((Sin[A])^2)+β (-Cos[A] Cos[B]-Cos[C])+γ (-Cos[B]-Cos[A] Cos[C])+(2 Cos[B] Cos[C]+Cos[A] (((Sin[A])^2)+((Cos[B])^2)+((Cos[C])^2))))/(((Cos[A])^2)+((Cos[B])^2)+((Cos[C])^2)+2 Cos[A] Cos[B] Cos[C]-1)

CircleFunction[Incircle]

ToSidelengths[(-α ((Sin[A])^2)+β (-Cos[A] Cos[B]-Cos[C])+γ (-Cos[B]-Cos[A] Cos[C])+(2 Cos[B] Cos[C]+Cos[A] (((Sin[A])^2)+((Cos[B])^2)+((Cos[C])^2))))/(((Cos[A])^2)+((Cos[B])^2)+((Cos[C])^2)+2 Cos[A] Cos[B] Cos[C]-1)/.Thread[{α,β,γ}->Trilinears[Incenter]]]

Simplify[-1+(((((a^2)+(b^2)-(c^2)))^2)/(4 (a^2) (b^2)))+(((((a^2)-(b^2)+(c^2)))^2)/(4 (a^2) (c^2)))+((((a^2)+(b^2)-(c^2)) ((a^2)-(b^2)+(c^2)) (-(a^2)+(b^2)+(c^2)))/(4 (a^2) (b^2) (c^2)))+((((-(a^2)+(b^2)+(c^2)))^2)/(4 (b^2) (c^2)))]

{α,β,γ}.{l,m,n}*{α,β,γ}.{a,b,c}+k(a β γ+b γ α+c α β)

Vector Properties

VectorLength

Assuming[a>0&&t∈Reals,FullSimplify[Norm[a {Cos[t],Sin[t]}]]]

NormalVector

Assuming[a>0&&t∈Reals,FullSimplify[NormalVector[a {Cos[t],Sin[t]},t]]]

TangentVector

Assuming[a>0&&t∈Reals,FullSimplify[TangentVector[a {Cos[t],Sin[t]},t]]]

Visualization

With[{a=1},Manipulate[
Show[{
ParametricPlot[a {Cos[t],Sin[t]},{t,0,2π},Method->{"AxesInFront"->False}],
Graphics[{
Red,Arrow[{a {Cos[t],Sin[t]},a {Cos[t],Sin[t]}+{-Cos[t],-Sin[t]}}],
Blue,Arrow[{a {Cos[t],Sin[t]},a {Cos[t],Sin[t]}+{-Sin[t],Cos[t]}}]
}]
},PlotRange->1.5],{{t,0},0,2π}
]]