Package: turtle-conics
Creating Conic Sections and Mathematical Curves using Python TurtleWe have created a Python package 'turtle_conics'.Using this package, we can draw different curves likeEllipse,Parabola,Hyperbolain Python Turtle in any orientation as you like. We can also draw many beautiful Mathematical Curves using Python Turtle.Feel free to contribute with apull requestif you want to add any Curve, also check out the Source code for the Package in myGithub RepositoryFEATURES-Simple function to create any of the above mentioned curves by importing functions fromall_curvesmodule specifying the arguments.-Can be used inside Looping structures to create different patterns.WHAT'S NEWAdded Epitrochoid Curves in the new updateAdded Hypocycloid Curves in the update(0.2.1)Added Butterfly curve in the update(0.1.3)Added Heart curve in the update (0.1.1)Added Cardioid curve in the update (0.1.0)How To Import The Package ?*NOTE:- While Importing the Package, the name of the package is  'turtle_conics' and not 'turtle-conics'.For importing all functions inside the package:-import turtlefrom turtle_conics.all_curves import *#Now make a function call for any of the curvesturtle.done()For importing a single function inside package:import turtlefrom turtle_conics.all_curves import (func)#Now make a function call for any of the curvesturtle.done()HISTORY0.0.1(2020-05-22)First release on PyPI0.0.2(2020-05-24)Added Rectangular Hyperbola0.1.0(2020-05-27)Added Cardioid curve0.1.1(2020-06-05)Added Heart curve0.1.2(2020-06-05)Made few changes in the package0.1.3(2020-06-15)Added Butterfly curve0.2.0(2020-06-29)Added Leminiscate curve0.2.1(2020-07-20)Added Hypocycloid Curves0.2.2(2020-08-07)Added Epitrochoid CurvesPackage DescriptionThe 'turtle_conics' package consists of  module 'all_curves' with 8 functions to draw Ellipse, Parabola, Hyperbola, Cardioid, Heart curve,Butterfly curve, Leminiscate, Hypocycloid and Epitrochoid.Latest Curves--EpitrochoidThese are set of curves formed when a point attached to Outer Circle(with radius 'b') rolls around the outside of another fixed Circle(with radius 'a').We can draw different types of Epitrochoids:-- We can draw different types oflimacon(i.e when a=b)- We can draw different types ofHypocycloids(i.e when b=ht)def epitrochoid(a, b, ht, no_of_loops=None, h=None, k=None)a:-It is the radius of the Inner circle.b:- It is the radius of Outer circle which is rolling outside the Inner circle to generate these set of curves.ht:- It is the distance of the pt(whose locus is this curve) from centre of Outer Circle.no_of_loops(Optional):- This parameter is for the no of loops.NOTE:- This parameter is useful when the ratio 'a/b' is a fraction and we can adjust the no of loops accordingly.h,k:-(Optional) For drawing an epitrochoid with centre of Inner circleat (h,k).By default both arezero.Using this parameter we can draw these curves at any position in the Turtle Window.NOTE:-When the ratio of radius of Outer Circle to radius of Inner Circle (i.e a/b) is fractional, then the curve may or may not be closed entirely hence we can adjust the value for no of loops.--HypocycloidThese are a set of curves formed when a Circle rolls inside another fixed Circle.We can draw different types of Hypocycloids:-- Curves having integer value of 'n'(Curves like Astroid,Deltoid etc)- Curves having Fractional/Rational value of 'n'Here 'n' is ratio of radii of Outer circle with Inner circle(a/b).def hypocycloid(a, b, no_of_loops=None, h=None, k=None)a:-It is the radius of the Outer circle.b:- It is the radius of Inner circle which is rolling inside the Outer circle to generate these set of curves.no_of_loops(Optional):- This parameter is for the no of loops required to complete any curve.NOTE:- If while using this function, any curve is incomplete then by adjusting the value to this parameter we can complete that curve.h,k:-(Optional) For drawing any hypocycloid with centre of Outer circleat (h,k).By default both arezero.Using this parameter we can draw these curves at any position in the Turtle Window.NOTE:-In this Function we have defined the no of loops required for drawing curves with value of 'a/b' as fractional only upto the ratio '1/10'(i.e 1/2, 1/3,1/4 and so on upto 1/10).Hence if we provide different radii resulting in ratios that were not defined in this function, then the no of loops is set to a default value of '100'.Hence we can adjust the no of loops accordingly to complete any curve..--LEMINISCATEWe can draw 2 types of leminiscate:-- Along X axis(Horizontally)- Along Y axis(Vertically)def leminiscate(a, orientation, angle=None, angle_unit=None, h=None, k=None)a:-It defines the size of the leminiscate.orientation:-Takes argument as'x'or'y'for drawing leminiscate along X axis or Y axis.angle(Optional) By providing the angle we can draw arcs of leminiscate of that specific angle. By defaultangleis set to360degrees.angle_unit(Optional) The argument foranglecan be indegreesorradians. By default it is set to'd'.h,k:-(Optional) For drawing leminiscate with starting pointat (h.k).By default both arezero.NOTE:-For  angle_units specify argument as 'd' or 'r'.--THE BUTTERFLY CURVEdef butterfly(a, b, n=None,h= None, k= None)a:-It defines the Horizontal size of the butterfly.b:-It defines the Vertical size of the butterfly.n:-(Optional) It is theNumber of Turnsto draw a Butterfly. By Default it is set to602turns.h,k:-(Optional) For drawing a butterfly whose starting point is(h,k). By default both arezero.NOTE:-To make a Perfect Butterfly you can set the values of 'a' and 'b' as equal.--HEART CURVEWe can draw 4 types of hearts:--Axis along X-axis#Heart along +ve X axis#Heart along -ve X axis-Axis along Y-axis#Heart along +ve Y axis#Heart along -ve Y axisdef heart(a, b, orientation, h=None, k=None, angle=None, angle_unit=None)a:-It defines the Horizontal size of the heart.b:-It defines the Vertical size of the heart.orientation:-Takes argument as'x'or'y'for drawing heart along X axis or Y axis.h,k:-(Optional) For drawing heart whose starting point is(h,k). By default both arezero.angle(Optional) By providing the angle we can draw arcs of the heart upto that specific angle. By defaultangleis set to360degrees.angle_unit(Optional) The argument foranglecan be indegreesorradians. By default it is set to'd'.NOTE:-For  angle_units specify argument as 'd' or 'r'.For drawing Heart along  Negative Axes pass Negative value for  'b'.--CARDIOIDWe can draw 4 types of cardioid:--Axis along X-axis#Cardioid along +ve X axis#Cardioid along -ve X axis-Axis along Y-axis#Cardioid along +ve Y axis#Cardioid along -ve Y axisdef cardioid(a, orientation, h=None, k=None, angle=None, angle_unit=None)a:-It defines the size of the cardioid.orientation:-Takes argument as'x'or'y'for drawing cardioid along X axis or Y axis.h,k:-(Optional) For drawing cardioid whose starting point is(h,k). By default both arezero.angle(Optional) By providing the angle we can draw arcs of the cardioid upto that specific angle. By defaultangleis set to360degrees.angle_unit(Optional) The argument foranglecan be indegreesorradians. By default it is set to'd'.NOTE:-Forangle_unitsspecify argument as 'd' or 'r'.For drawing Cardioid along  Negative  Axes pass Negative value for  'a'.--ELLIPSEWe can draw 2 types of ellipse:-- Major axis along X axis (a>b)- Major axis along Y axis (b>a)def ellipse(a, b, h= None, k= None, angle= None, angle_unit= None)a:-It is the half-length of major axis of ellipse if (a>b) else half-length of minor axis when(b>a).b:-It is the half-length of major axis of ellipse if (b>a) else half-length of minor axis when (a>b).h,k:-(Optional) For drawing ellipses withcenter (h,k).By default both arezero.angle(Optional) By providing the angle we can draw elliptical arcs upto that specific angle. By defaultangleis set to360degrees.angle_unit(Optional) The argument foranglecan be indegreesorradians. By default it is set to'd'.NOTE:-For  angle_units specify argument as 'd' or 'r'.--ParabolaWe can draw 4 types of parabola:--Parabola along +ve X axis-Parabola along -ve X axis-Parabola along +ve Y axis-Parabola along -ve Y axisdef parabola(a, t, orientation, h=None, k=None)a:- It is the distance from the origin to the focus of parabola.t:- It is a parameter of a parabola.Used to define the curvature of parabola.Value oftshould be greater thanzero.orientation:-Takes argument as'x'or'y'for drawing parabola along X axis or Y axis.h,k:-(Optional) For drawing parabola withvertex at (h,k).By default both arezero.NOTE:-For drawing Parabola along  Negative  Axes pass Negative value for  'a'.--HyperbolaWe can draw 2 types of Hyperbola:--Transverse axis ie hyperbola along X axis(a>b)-Transverse axis ie hyperbola along Y axis(b>a)def hyperbola(a, b, h=None, k=None)a:-It represents the distance from the vertex to the center of hyperbola when (a>b) else it represents the distance perpendicular to the transverse axis from the vertex to the asymptote line when (b>a).b:-It represents the distance from the vertex to the center of hyperbola when (b>a) else it represents the distance perpendicular to the transverse axis from the vertex to the asymptote line when (a>b).h,k:-(Optional) For drawing hyperbola withcenter (h,k).By default both arezero.We can also make a Rectangular Hyperbola by giving equal values to 'a' and 'b'.NOTE:-For drawing Hyperbola along X axis enter values for 'a' and 'b' such that (a>b) else for drawing hyperbola along Y axis put (b>a) .