# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

An interactive plot for the areas inside the rose curve

Contributed by:
Garrett Dubofsky, Wolfram|Alpha Math Team

ResourceFunction["RoseCurveAnalysis"][ returns a plot with selectable areas of the rose curve with polar formula . | |

ResourceFunction["RoseCurveAnalysis"][ returns an interactive plot along with values of the properties in |

A rose curve is a class of curves defined by the equation in polar coordinates. When *n* is a rational number, the periodicity of the sine function means that the rose curve forms a closed loop after at most one period of the function. This is what is referred to as a rose curve.

In some cases, the polar equation of the rose curve is given as . Although ResourceFunction["RoseCurveAnalysis"] 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. A "subpetal" is a closed region within the rose curve.

"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 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" | the interval of angles where the rose curve makes a complete cycle |

"HorizontalSymmetry" | yields True if the the curve is symmetric across the horizontal axis |

"VerticalSymmetry" | yields True if the the curve is symmetric across the vertical 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 |

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 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 order of the input properties is mirrored in the output.

The same options as ParametricPlot and PolarPlot are supported, as well as the following:

"Point" | determines the initial shaded region (default value is {0.1,0.1}) |

"ShowPetal" | bolds the petal containing the shaded region |

Plot the given rose curve with clickable subpetals:

In[1]:= |

Out[1]= |

Get the number of petals, surface area and total area alongside the interactive plot:

In[2]:= |

Out[2]= |

Get information about the curve's shape and features alongside the interactive plot:

In[3]:= |

Out[3]= |

Negative values of *a* and decimal forms of *n* are acceptable and are rationalized internally to produce exact results:

In[4]:= |

Out[4]= |

Default PolarPlot and ParametricPlot options apply to each graphic:

In[5]:= |

Out[5]= |

Change the initial point:

In[6]:= |

Out[6]= |

Bold the petal containing the shaded region:

In[7]:= |

Out[7]= |

Use PlotRange to view small regions:

In[8]:= |

Out[8]= |

Generate all the subpetal areas:

In[9]:= |

Out[9]= |

Determine the number of petals:

In[10]:= |

Out[10]= |

Click to copy the selected areas and add them together, multiplying by the number of petals:

In[11]:= |

Out[11]= |

As desired, this is equivalent to the surface area of the rose curve:

In[12]:= |

Out[12]= |

The ImageSize option has no effect:

In[13]:= |

Out[13]= |

For nonnumerical values of *a*, the function is left unevaluated:

In[14]:= |

Out[14]= |

For negative, irrational or nonnumerical values of *n*, the function is left unevaluated:

In[15]:= |

Out[15]= |

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

In[16]:= |

Out[16]= |

For some rose curves, the selected areas are not unique:

In[17]:= |

Out[17]= |

When *n*=1/2, the subpetals have very convenient values:

In[18]:= |

Out[18]= |

- 1.1.0 – 10 May 2022
- 1.0.0 – 04 January 2022

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