Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the properties of a specified rose curve
| ResourceFunction["RoseCurveProperties"][a,n] gives an association of properties related to the rose curve with polar formula r=aSin[n θ]. | |
| ResourceFunction["RoseCurveProperties"][a,n,prop] gives the values of the specified properties in prop. | |
| ResourceFunction["RoseCurveProperties"][a,n,prop,format] gives the values of the specified properties in prop as either an Association or a Dataset determined by format. | 
| "Equation" | equation of the rose curve | 
| "Plot" | plot of the rose curve | 
| "PetalPlot" | plot of a single petal | 
| "PetalCount" | number of petals | 
| "PetalTotalAreaFormula" | formula for the total area of a single petal | 
| "PetalTotalArea" | total area of a single petal | 
| "InactiveTotalAreaIntegral" | inactive double integral for the total area of the rose curve | 
| "InactiveTotalAreaSingleIntegral" | inactive single integral for the total area of the rose curve | 
| "TotalAreaFormula" | formula for the total area of a rose curve (for rational n, rewrite n as the reduced fration p/q) | 
| "TotalArea" | total area of the rose curve | 
| "TotalAreaPlot" | plot of the rose curve where darker hues correspond to overlapped sections | 
| "PetalArcLength" | arc length of a single petal | 
| "ArcLength" | arc length of the rose curve over one full period | 
| "IntersectionCount" | number of times the rose curve self-intersects | 
| "ClosedDomain" | interval of angles where the rose curve makes a complete cycle | 
| "HorizontalSymmetry" | yields True if the the curve is symmetric across the vertical axis | 
| "VerticalSymmetry" | yields True if the the curve is symmetric across the horizontal axis | 
| "RotationalSymmetry" | yields True if the the curve is symmetric when rotated 180° about the origin | 
| "MaximumOuterCurveRadius" | largest radius value along the outer curve | 
| "MinimumOuterCurveRadius" | smallest radius value along the outer curve | 
| "OriginIntersectionCount" | number of times the curve passes through the origin along its closed domain | 
| "SymmetryGroup" | the Dihedral symmetry group associated with the curve | 
| All | all properties associated with the given value of n | 
| "PetalSurfaceAreaFormula" | formula for the surface area of a single petal | 
| "PetalSurfaceArea" | surface area of a single petal | 
| "InactiveSurfaceAreaIntegral" | inactive double integral for the surface area of the rose curve | 
| "InactiveSurfaceAreaSingleIntegral" | inactive single integral for the surface area of the rose curve | 
| "SurfaceAreaFormula" | formula for the surface area of the rose curve (n is expressed as the reduced fraction p/q) | 
| "SurfaceArea" | surface area of the rose curve | 
| "OuterCurveEquation" | piecewise function for the outline of the rose curve | 
| "OuterCurvePlot" | plot of the outline of the rose curve | 
Get an Association of the relevant information for a given rose curve:
| In[1]:= | ![ResourceFunction["RoseCurveProperties"][1, 4/3]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/1aa24831bd980538.png) | 
| Out[1]= |  | 
Get the number of petals and total area as an Association:
| In[2]:= | ![ResourceFunction[
 "RoseCurveProperties"][1, 3, {"PetalCount", "TotalArea"}]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/64658f9d9b3aea7d.png) | 
| Out[2]= |  | 
Get the same information as a Dataset:
| In[3]:= | ![ResourceFunction[
 "RoseCurveProperties"][1, 3, {"TotalArea", "PetalCount"}, Dataset]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/0cf0ebc53e6c8d26.png) | 
| Out[3]= |  | 
Find the plot of a rose curve with positive and negative values of a:
| In[4]:= | ![{ResourceFunction["RoseCurveProperties"][1, 3, "Plot"], ResourceFunction["RoseCurveProperties"][-2, 3, "Plot"]}](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/5340e405eb52de94.png) | 
| Out[4]= |  | 
Decimal forms of n are acceptable and are rationalized internally to produce exact results:
| In[5]:= | ![ResourceFunction["RoseCurveProperties"][4, 1.2, {"Equation", "Plot"}]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/70517ad47e9950a2.png) | 
| Out[5]= |  | 
Default PolarPlot options can be used for "Plot", "PetalPlot", and "OuterCurvePlot":
| In[6]:= | ![ResourceFunction["RoseCurveProperties"][1, 7/8, {"Plot", "PetalPlot", "OuterCurvePlot"}, PolarGridLines -> True,
  Frame -> False]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/5c80df87a364d696.png) | 
| Out[6]= |  | 
Default ParametricPlot options can be used for "TotalAreaPlot":
| In[7]:= | ![ResourceFunction["RoseCurveProperties"][1, 7/8, {"TotalAreaPlot"}, PlotStyle -> Red, BoundaryStyle -> {Thick, Black}, Axes -> False]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/4d5b8f32077f479a.png) | 
| Out[7]= |  | 
Depict the different rose curves for n=1/t as t increases:
| In[8]:= | ![Table[ResourceFunction["RoseCurveProperties"][1, 1/t, "Plot", ImageSize -> 50, Frame -> False, Axes -> False], {t, 1, 10}]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/3208f685939c044a.png) | 
| Out[8]= |  | 
Plot the increasing and oscillating number of self-intersections (depending on the parity of t):
| In[9]:= | ![ListPlot[Table[
  ResourceFunction["RoseCurveProperties"][1, 1/t, "IntersectionCount"], {t, 1, 100}]]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/631f61ccc06505ae.png) | 
| Out[9]= |  | 
Show the change in outer curve plots, which visually approach a circle:
| In[10]:= | ![Table[ResourceFunction["RoseCurveProperties"][1, 1/t, "OuterCurvePlot", ImageSize -> 50, Frame -> False, Axes -> False], {t, 1, 10}]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/5ac3f60b089f171c.png) | 
| Out[10]= |  | 
Plotting the surface area, the rose curve shows the progression towards π:
| In[11]:= | ![ListLinePlot[
 Table[ResourceFunction["RoseCurveProperties"][1, 1/t, "SurfaceArea"], {t, 1, 100}], PlotRange -> All]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/4db8a868e4c90a5e.png) | 
| Out[11]= |  | 
Plotting the rose curve and outer curve for n=1/50 explains further why the surface area approaches π:
| In[12]:= | ![N[ResourceFunction["RoseCurveProperties"][1, 1/50, {"Plot", "OuterCurvePlot", "SurfaceArea"}]]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/19c75ee7b3d8f0b5.png) | 
| Out[12]= |  | 
Show how a single petal flattens for increasing integer values of n:
| In[13]:= | ![Table[ResourceFunction["RoseCurveProperties"][1, k, "PetalPlot", ImageSize -> 50, Frame -> False, Axes -> False], {k, 1, 10}]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/654584ed0dc54d39.png) | 
| Out[13]= |  | 
Plot the area of a single petal against the n value:
| In[14]:= | ![ListLinePlot[
 Table[ResourceFunction["RoseCurveProperties"][1, t, "PetalTotalArea"], {t, 1, 100}], PlotRange -> All]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/0d128edcd8aa5e44.png) | 
| Out[14]= |  | 
The above plot is explained by the "PetalTotalAreaFormula" property:
| In[15]:= | ![ResourceFunction["RoseCurveProperties"][1, 2, "PetalTotalAreaFormula"]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/472d03d0edf052eb.png) | 
| Out[15]= |  | 
For the default number of PlotPoints, the area plot may appear choppy:
| In[16]:= | ![ResourceFunction["RoseCurveProperties"][1, 23/2, "TotalAreaPlot"]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/7067153eed3e2cfa.png) | 
| Out[16]= |  | 
Adding a higher value for PlotPoints may take longer, but will produce a smoother and more accurate plot:
| In[17]:= | ![ResourceFunction["RoseCurveProperties"][1, 23/2, "TotalAreaPlot", PlotPoints -> 100]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/7adf7dfe8ea5df5d.png) | 
| Out[17]= |  | 
For non-numerical values of a, the function is left unevaluated:
| In[18]:= | ![ResourceFunction["RoseCurveProperties"][x, 5/4]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/1f490d0e5c3d50ec.png) | 
| Out[18]= |  | 
For negative, irrational or nonnumerical values of n, the function is left unevaluated:
| In[19]:= | ![ResourceFunction["RoseCurveProperties"][1, \[Pi]]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/22273128e9b05824.png) | 
| Out[19]= |  | 
When no available property is called, the function is left unevaluated:
| In[20]:= | ![ResourceFunction["RoseCurveProperties"][1, 2/3, "Cats"]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/4b05b4cb58dd7177.png) | 
| Out[20]= |  | 
Visualize the progression of the rose curve plot for integer-valued n:
| In[21]:= | ![Manipulate[
 ResourceFunction["RoseCurveProperties"][1, k, "Plot", PlotStyle -> Hue[k/10]], {k, 1, 10, 1}]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/6d0c05d84479cb3e.png) | 
| Out[21]= |  | 
Plotting the first 10 rose curves for integer n on one graph:
| In[22]:= | ![Show[Table[
  ResourceFunction["RoseCurveProperties"][1, k, "Plot", Axes -> False,
    PlotStyle -> {Black, Opacity[1 - k/10]}], {k, 1, 10}]]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/15c9cd4cfd227549.png) | 
| Out[22]= |  | 
Plotting the first 10 rational n (with numerator 1) rose curves on one graph:
| In[23]:= | ![Show[Table[
  ResourceFunction["RoseCurveProperties"][1, 1/k, "Plot", Axes -> False, PlotStyle -> {Black, Opacity[1 - k/10]}], {k, 1, 10}]]](https://www.wolframcloud.com/obj/resourcesystem/images/bb3/bb3414dc-a2ba-41fb-a9ff-bb287773dc93/608e0229aa8efda6.png) | 
| Out[23]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License