Change language

Python | Sympy Circle () method

|

In Simpy, the Circle () function is used to create a circle from a center and a radius, from three non-collinear points, or the equation of a circle.

Syntax: Circle()

Parameters:
center : Point and
radius : number or sympy expression or
points : sequence of three Points or
equation : equation of a circle

Error: Raises GeometryError When the given equation is not that of a circle. When trying to construct circle from incorrect parameters.

Example # 1: Using center and radius

# import of sympy and geometry module

from sympy.geometry import Point, Circle

 
# using Circle ()

c1 = Circle (Point ( 0 , 0 ), 5 )

 

print (c1.hradius, c1. vradius, c1.radius) 

Output:

 (5, 5, 5) 

Example # 2: Using a three-dot sequence

# import sympy and geometry module

from sympy.geometry import Point, Circle

 
# using Circle ()

c2 = Circle (Point ( 0 , 0 ), Point ( 1 , 1 ), Point ( 1 < code class = "plain">, 0 ))

 

print (c2.hradius, c2.vradius, c2.radius)

Output:

 ( sqrt (2) / 2,  sqrt (2) / 2,  sqrt (2) / 2) 

Example # 3: Using the Circle Equation

# import of symposium and geometry module

from sympy.geometry import Point, Circle 

from sympy import Eq

 

 
# using Circle ()

c3 = Circle (x * * 2 + y * * 2 - 25 )

  

print (c3)

Exit :

 Circle (Point2D (0, 0), 5) 

Python | Sympy Circle () method circle: Questions

Python | Sympy Circle () method Python functions: Questions

Shop

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

News

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method