Cannabis Curve

Author

Eric W. Weisstein
October 29, 2012

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

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

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

Plot

cannabis[t_]:=(1+(9/10)Cos[8 t])(1+(1/10)Cos[24 t])((9/10)+(1/10)Cos[200t])(1+Sin[t])

PolarPlot[cannabis[t],{t,0,2π},MaxRecursion->6,ImageSize->250,PlotStyle->Red,Ticks->None]

PolarPlot[cannabis[t],{t,-π/2,π/2},MaxRecursion->6,ImageSize->100]

ParametricPlot[a(1+9/10 Cos[8 q]) (1+1/10 Cos[24 q]) (9/10+1/10 Cos[200 q]) (1+Sin[q]){Cos[q],Sin[q]},{q,0,2 π},{a,0,1},Mesh->False,PlotRange->All,MaxRecursion->5]

PolarPlot[(1+9/10 Cos[8 q]) (1+1/10 Cos[24 q]) (9/10+1/10 Cos[200 q]) (1+Sin[q]),{q,0,2 π}]/.Line->Polygon

Equation

r=TrigExpand[cannabis[t]]/.{Cos[t]->c,Sin[t]->s}

eqns=Numerator[Together[{r c-x,r s-y,x^2+y^2-r^2,c^2+s^2-1}]]

GroebnerBasis

(gbs=Factor/@GroebnerBasis[eqns,{x,y},{c,s},MonomialOrder->EliminationOrder])//Timing

Hopeless

Resultants

eq={x-cannabis[t] Cos[t],y-cannabis[t] Sin[t]}

eq2=TrigExpand[eq]/.{Cos[t]->(1-s^2)/(1+s^2),Sin[t]->2 s/(1+s^2)};

eq3=Factor[Together[eq2]]

eq4=Numerator[eq3];

soln=Resultant[Sequence@@eq4,s,Method->Modular];//Timing

...ran over 3 nights...

soln=Resultant[Sequence@@eq4,s,Method->Subresultants];//Timing

...ran over 3 nights...

Properties

curve=a(1+(9/10)Cos[8 t])(1+(1/10)Cos[24 t])((9/10)+(1/10)Cos[200t])(1+Sin[t]){Cos[t],Sin[t]};

polar=a(1+(9/10)Cos[8 t])(1+(1/10)Cos[24 t])((9/10)+(1/10)Cos[200t])(1+Sin[t]);

ArcLength

ArcLength[cannabis[t],{t,0,2π}]//Timing

2 ArcLength[cannabis[t],{t,-π/2,π/2}]//Timing

ArcLengthFunction

ArcLength[cannabis[t],t]//Timing

Area

Parametric

Area[curve,{t,0,2π}]//Timing

Polar

Area[polar,{t,0,2π}]//Timing

(a=2Area[polar,{t,-π/2,π/2}])//Timing

AreaInertiaTensor

Polar

AreaInertiaTensor[polar,{t,0,2π}]//Timing

Parametric

AreaInertiaTensor[curve,{t,0,2π}]//Timing

Centroid

Parametric

Centroid[curve,{t,0,2π}]//Timing

Curvature

Curvature[a,t]

Curvature[cannabis[t],t]

FullSimplify[%]

ImplicitCurvature

Slope

Slope[a (1+9/10 Cos[8 t]) (1+1/10 Cos[24 t]) (9/10+1/10 Cos[200 t]) (1+Sin[t]){Cos[t],Sin[t]},t]//FullSimplify

Slope[(1+9/10 Cos[8 q]) (1+1/10 Cos[24 q]) (9/10+1/10 Cos[200 q]) (1+Sin[q]),q]//FullSimplify

...had to run overnight...

SpecialAffineCurvature

ByteCount[k=SpecialAffineCurvature[(1+(9/10)Cos[8 t])(1+(1/10)Cos[24 t])((9/10)+(1/10)Cos[200t])(1+Sin[t]){Cos[t],Sin[t]},t]]//Timing

ByteCount[k2=Simplify[k,0<t<2π]]//Timing

Put[k2,"~/cannabis.m"]

ByteCount[k2=Get["~/cannabis.m"]]

ByteCount[k3=FullSimplify[k2,0<t<2π]]//Timing

...silently crashes after blowing up to > 90 GB...

TangentialAngle

TangentialAngle[cannabis[t],t]

FullSimplify[%]//Timing