Rhombus

Author

Eric W. Weisstein
July 31, 2014

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PlaneGeometry/Rhombus.nb.

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

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

Code

Rhombus::usage="Rhombus[p,q] gives a rhombus with diagonal p and q."

Rhombus[p_,q_]:=ClosedLine[{{-p,0},{0,q},{p,0},{0,-q}}]

Definitions

ineq=x Sin[θ]+Cos[θ] (y+a Sin[θ])≥0&&Cos[θ] (y+a Sin[θ])≥x Sin[θ]&&a Cos[θ] Sin[θ]≥y Cos[θ]+x Sin[θ]&&(x+a Cos[θ]) Sin[θ]≥y Cos[θ];

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

reg=Parallelogram[a{-Cos[θ],0},a{{Cos[θ],Sin[θ]},{Cos[θ],-Sin[θ]}}];

assum=a>0&&0<θ<π/2;

verts=With[{p=a Cos[θ],q=a Sin[θ]},{{-p,0},{0,-q},{p,0},{0,q}}];

Plots

Diagram

LaminaData["FilledRhombus","Diagram"]

DiscretizeRegion

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

Polygon

poly=Polygon[{{-a Cos[θ],0},{0,-a Sin[θ]},{a Cos[θ],0},{0,a Sin[θ]}}];

Block[{a=1,θ=30°},Graphics[poly]]

Equations

Inequality

FullSimplify[Inequalities[poly,{x,y}],a>0&&0<θ<π/2]

Properties

Area

Area

Assuming[assum,FullSimplify[Area[reg]]]//Timing

Assuming[assum,FullSimplify[Area[implreg]]]//Timing

Formula

(1/2)p q/.{p->2a Cos[θ],q->2a Sin[θ]}

FullSimplify[%]

Integrate

Assuming[a>0&&0<θ<π/2,Area[ineq[x,y],{x,y}]]//Timing

RegionMeasure

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

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

AreaInertiaTensor

Assuming[a>0&&0<θ<π/2,AreaInertiaTensor[ineq[x,y],{x,y}]]//Timing

Centroid

Integrate

Assuming[a>0&&0<θ<π/2,Centroid[ineq[x,y],{x,y}]]//Timing

RegionCentroid

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

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

Diagonals

Simplify[Solve[{p^2+q^2==4a^2,q==p Tan[θ]},p,q],0<θ<π/2]

Simplify[Solve[{p^2+q^2==4a^2,q==p Tan[θ]},q,p],0<θ<π/2]

EdgeLengths

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

GeneralizedDiameter

FullSimplify[Max[2a Cos[θ],2a Sin[θ]],a>0&&0<θ<π/2]

Plot[{Cos[θ],Sin[θ]},{θ,0,π/2}]

Inradius

FullSimplify[
With[{b=a,c=a,d=a},
((Sqrt[4p^2 q^2-(a^2-b^2+c^2-d^2)^2])/(2(a+b+c+d)))/.a->Sqrt[(p/2)^2+(q/2)^2]
],p>0&&q>0]

FullSimplify[((p q)/(2 (Sqrt[(p^2)+(q^2)])))/.Thread[{p,q}->{2a Cos[θ],2a Sin[θ]}],a>0]

FullSimplify[%-a/2Sin[2θ]]

Perimeter

Total[s]

RadiiOfGyration

Assuming[a>0&&0<θ<π/2,FullSimplify[RadiiOfGyration[ineq[x,y],{x,y}]]]//Timing