# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Compute the properties of a specified rose curve

Contributed by:
Garrett Dubofsky (Wolfram|Alpha Math Team)
| Garrett Dubofsky

ResourceFunction["RoseCurveProperties"][ gives an association of properties related to the rose curve with polar formula | |

ResourceFunction["RoseCurveProperties"][ gives the values of the specified properties in | |

ResourceFunction["RoseCurveProperties"][ gives the values of the specified properties in |

A rose curve is a class of curves defined by the equation *r*=*a*Sin[*n **θ*] in polar coordinates. When *n* is a rational number, the periodicity of the Sin function means that the rose curve forms a closed loop after at most one period of the function.

In some cases, the polar equation of the rose curve is given as *r*=*a*Cos[*n **θ*]. Although ResourceFunction["RoseCurveProperties"] does not have the option to switch between forms, the cosine form is equivalent to rotating the sine form by 90 degrees counterclockwise.

The amplitude *a* can be any real value, whereas the angle coefficient *n* must be a nonzero rational.

For the purposes of this function, a "petal" of a rose curve is defined as a minimal (possibly self-intersecting) segment of the curve that starts and ends at the origin and does not pass through the origin otherwise.

"TotalArea" refers to an area calculated by integration, which counts overlapped sections multiple times. By contrast, "SurfaceArea" counts each selected area once.

The following values of *prop* are supported for both integer and rational values of *n*:

"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 fraction 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 |

All | all properties associated with the given value of n |

The following values of *prop* are intended for rational values of *n* but can be called for integer values of *n* as well:

"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 |

Multiple values of *prop* can be specified using a list.

The default output is an association, but setting *format* to Dataset will change the output.

The same options as ParametricPlot and PolarPlot are supported.

Get an Association of the relevant information for a given rose curve:

In[1]:= |

Out[1]= |

Get the number of petals and total area as an Association:

In[2]:= |

Out[2]= |

Get the same information as a Dataset:

In[3]:= |

Out[3]= |

Find the plot of a rose curve with positive and negative values of *a*:

In[4]:= |

Out[4]= |

Decimal forms of *n* are acceptable and are rationalized internally to produce exact results:

In[5]:= |

Out[5]= |

Default PolarPlot options can be used for "Plot", "PetalPlot" and "OuterCurvePlot":

In[6]:= |

Out[6]= |

Default ParametricPlot options can be used for "TotalAreaPlot":

In[7]:= |

Out[7]= |

Depict the different rose curves for *n*=1/*t* as *t* increases:

In[8]:= |

Out[8]= |

Plot the increasing and oscillating number of self-intersections (depending on the parity of *t*):

In[9]:= |

Out[9]= |

Show the change in outer curve plots, which visually approach a circle:

In[10]:= |

Out[10]= |

Plotting the surface area, the rose curve shows the progression toward * π*:

In[11]:= |

Out[11]= |

Plotting the rose curve and outer curve for *n*=1/50 explains further why the surface area approaches * π*:

In[12]:= |

Out[12]= |

Show how a single petal flattens for increasing integer values of *n*:

In[13]:= |

Out[13]= |

Plot the area of a single petal against the *n*-value:

In[14]:= |

Out[14]= |

The preceding plot is explained by the "PetalTotalAreaFormula" property:

In[15]:= |

Out[15]= |

For the default number of PlotPoints, the area plot may appear choppy:

In[16]:= |

Out[16]= |

Adding a higher value for PlotPoints may take longer, but will produce a smoother and more accurate plot:

In[17]:= |

Out[17]= |

For non-numerical values of *a*, the function is left unevaluated:

In[18]:= |

Out[18]= |

For negative, irrational or non-numerical values of *n*, the function is left unevaluated:

In[19]:= |

Out[19]= |

When no available property is called, the function is left unevaluated:

In[20]:= |

Out[20]= |

Visualize the progression of the rose curve plot for integer-valued *n*:

In[21]:= |

Out[21]= |

Plotting the first 10 rose curves for integer *n* on one graph:

In[22]:= |

Out[22]= |

Plotting the first 10 rational *n* (with numerator 1) rose curves on one graph:

In[23]:= |

Out[23]= |

- 1.1.0 – 10 May 2022
- 1.0.0 – 19 October 2021

This work is licensed under a Creative Commons Attribution 4.0 International License