Basic curves#
Regular convex polygon#
- User.RegularConvexPolygon(a, Resolution, AsPolar=false)#
A regular polygon is a polygon that is direct equiangular (all angles are equal in measure) and equilateral (all sides have the same length). Regular polygons may be either convex, star or skew. In the limit, a sequence of regular polygons with an increasing number of sides approximates a circle.
\[r = \frac{a}{\cos \left(t - \alpha/2 - \alpha \ \lfloor \theta/\alpha \rfloor \right)}, \quad \text{where } \alpha = \frac{2 \pi}{n}.\]\[x(t) = r \cos(t)),\]\[y(t) = r \sin(t).\]See also: https://en.wikipedia.org/wiki/Star_polygon
See also: https://mathcurve.com/polyedres/regulier/polygoneregulier.shtml
See also: https://mathcurve.com/courbes2d/goursat/goursat.shtml
See also: https://mathcurve.com/courbes3d.gb/polygramme/polygramme.shtml
See also: https://mathcurve.com/courbes3d.gb/billardcylindrique/billardcylindrique.shtml
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: Regularpolygon
Middle figure: Regularpolygon
Right figure: Regularpolygon
Circle#
- User.Circle(a, Resolution, AsPolar=false)#
A circle is the set of points in a plane that are equidistant from a given point \(O\). The parametric equations for a circle of radius \(a\) can be given by
\[x(t) = a \cos(t)),\]\[y(t) = a \sin(t).\]See also Wikipedia [1484], MathWorld [1132], MathCurve [319].
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: Circle
Middle figure: Circle
Right figure: Circle
Ellipse#
- User.Ellipse(a, Resolution, AsPolar=false)#
An ellipse is a plane curve surrounding two focal points, such that for all points on the curve, the sum of the two distances to the focal points is a constant. The parametric equations of a standard ellipse centered at the origin with width \(2a\) and height \(2b\) can be given by (with \(0 \le t < 2\pi\)):
\[x(t) = a \cos(t)),\]\[y(t) = b \sin(t).\]Assuming \(a \ge b\), the focal points are \((\pm \sqrt{a^2-b^2}, 0)\).
See also Wikipedia [1489], MathWorld [1134], MathCurve [321].
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: Ellipse
Middle figure: Ellipse
Right figure: Ellipse
Parabola#
- User.Parabola(a, Resolution, AsPolar=false)#
A parabola is a plane curve which is mirror-symmetrical and is approximately U-shaped. It fits several superficially different mathematical descriptions, which can all be proved to define exactly the same curves.
The graph of a quadratic function \(y = a x^2 + b x + c\) (with \(a \ne 0\)) is a parabola with its axis parallel to the \(y\)-axis. Conversely, every such parabola is the graph of a quadratic function.
The surface of revolution obtained by rotating a parabola about its axis of symmetry is called a paraboloid.
See also: https://mathworld.wolfram.com/Parabola.html
See also: https://en.wikipedia.org/wiki/Parabola
In polar coordinates, the equation of a parabola with parameter a and center (0, 0) is given by \(\displaystyle r(t) = - \frac{2a}{1 + \cos(t)}\). It can also be written parametrically as
\[x(t) = a t^2,\]\[y(t) = 2 a t.\]An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: Parabola
Middle figure: Parabola
Right figure: Parabola
Hyperbola#
- User.Hyperbola(a, Resolution, AsPolar=false)#
In polar coordinates, the equation of a hyperbola centered at the origin (i.e., with \(x_0=y_0=0\)) is \(\displaystyle r2(t) = \frac{a^2 b^2}{b^2 \cos^2(t) - a^2 \sin^2(t)}\).
Parametric equations for the right branch of a hyperbola are given by
\[x(t) = a \cosh(t),\]\[y(t) = b \sinh(t),\]which ranges over the right branch of the hyperbola.
A parametric representation which ranges over both branches of the hyperbola is
\[x(t) = a \sec(t),\]\[y(t) = b \tan(t),\]with \(t \in (-\pi,\pi)\) and discontinuities at \(\pm \pi/2\).
See also: https://mathworld.wolfram.com/Hyperbola.html
See also: https://mathworld.wolfram.com/ConicSection.html
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: Hyperbola
Middle figure: Hyperbola
Right figure: Hyperbola
Cycloid#
- User.Cycloid(a, Resolution, AsPolar=false)#
The cycloid is the locus of a point on the rim of a circle of radius a rolling along a straight line. If the cycloid has a cusp at the origin and its humps are oriented upward, its parametric equation is
\[x(t) = a (t - \sin(t)),\]\[y(t) = a (t - \cos(t)).\]See also Wikipedia [1488], MathWorld [1133], MathCurve [320].
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: Cycloid
Middle figure: Cycloid
Right figure: Cycloid
Trochoid#
- User.Trochoid(a, Resolution, AsPolar=false)#
A trochoid is the locus of a point at a distance b from the center of a circle of radius a rolling on a fixed line. A trochoid has parametric equations
\[x(t) = a t - b \sin(t),\]\[y(t) = a t - b \cos(t)).\]If \(b<a\), the trochoid is known as a curtate cycloid; if \(b=a\), it is a cycloid; and if \(b>a\), the curve is a prolate cycloid.
See also Wikipedia [1514], MathWorld [1145], MathCurve [340].
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: Trochoid
Middle figure: Trochoid
Right figure: Trochoid
Cardioid#
- User.Cardioid(a, Resolution, AsPolar=false)#
Returns the curve given by the polar equation
\[r = a (1 - \cos (\theta)).\]See also: Wikipedia [1520], MathWorld [1148]
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: polar coordinates. Right figure: cartesian coordinates.
Limaçon curve#
- User.Limacon(AsPolar, Resolution, a, b)#
Returns the curve given by the polar equation
\[r = b + a \cos (\theta).\]See also: see also Wikipedia [1536], MathWorld [1155]
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: polar coordinates. Right figure: cartesian coordinates.
Conchoid of de Sluze#
- User.ConchoidOfDeSluze(AsPolar, Resolution, a)#
Returns the curve given by the polar equation
\[r = \sec(\theta) + a \cos (\theta).\]See also: see also Wikipedia [1522], MathWorld [1149]
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: polar coordinates. Right figure: cartesian coordinates.
Freeth’s Nephroid#
- User.FreethNephroid(a, Resolution, AsPolar=false)#
The curve has the polar equation
\[r = a \left[1 + 2 \sin \left(\tfrac{1}{2} \theta \right) \right]\]See also: Wikipedia [1530], MathWorld [1153]
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: polar coordinates. Right figure: cartesian coordinates.
Strophoid#
- User.Strophoid(a, b, Resolution, AsPolar=false)#
The name strophoid means “belt with a twist”. The polar form for a general strophoid is
\[r = \frac{b \sin(a - 2 \theta)}{\sin(a - \theta)}\]See also: Wikipedia [1543], MathWorld [1159]
A special cases is the right strophoid with \(a = \pi/2\).
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
An example in C#
using User; Curve = User.Cardioid(a: 1, Resolution: 200, AsPolar: true); User.Chart2D.Show(Curve, Template = "PolarCurve", Title = "Cardioid");
Left figure: polar coordinates. Right figure: cartesian coordinates.
Cycloid of Ceva#
- User.CycloidOfCeva(a, Resolution, AsPolar=false)#
A curve with the polar form
\[r = 1 + 2 \cos(2 \theta).\]See also: Wikipedia [1523], MathWorld [1150]
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')Left figure: polar coordinates. Right figure: cartesian coordinates.
Lemniscate of Gerono#
- User.LemniscateOfGerono(a, Resolution, AsPolar=false)#
This curve is also known as Eight curve. It has parametric equations
\[x(t) = a \sin(t),\]\[y(t) = x(t) \cos(t)).\]See also Wikipedia [1503], MathWorld [1142], MathCurve [332].
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: Lemniscate of Gerono
Middle figure: Lemniscate of Gerono
Right figure: Lemniscate of Gerono
Lemniscate of Bernoulli#
- User.LemniscateOfBernoulli(a, Resolution, AsPolar=false)#
The lemniscate of Bernoulli is a polar curve defined as the locus of points such that the the product of distances from two fixed points \((-a,0)\) and \((a,0)\) is a constant \(a^2\). It has parametric equations
\[x(t) = \frac{a \cos(t)}{1 + \sin^2(t)},\]\[y(t) = x(t) \sin(t)).\]See also Wikipedia [1502], MathWorld [1141], MathCurve [331].
An example in Python
>>> from mpfunlab import User >>> Curve = User.Cardioid(a = 1, Resolution = 200, AsPolar = true) >>> User.Chart2D.Show(Curve, Template = 'PolarCurve', Title = 'Cardioid')
Left figure: Lemniscate of Bernoulli
Middle figure: Lemniscate of Bernoulli
Right figure: Lemniscate of Bernoulli