Home :: Examples :: Circle

Circle

A Circle is a simple shape consisting of those points in a plane which are the same distance from a given point called the center. The common distance of the points of a circle from its center is called its radius. A diameter is a line segment whose endpoints lie on the circle and which passes through the centre of the circle. The length of a diameter is twice the length of the radius. A circle is never a polygon because it has no sides or vertices.

A Circle is a special ellipse in which the two foci are coincident. Circles are conic sections attained when a right circular cone is intersected with a plane perpendicular to the axis of the cone.

The parametric equations for the Circle are:

To plot function graph use the folowing script:

# Example
# 2D. Ellipse

# z must be zero
z = 0

# t-parameter
tmin = 0
tmax = 2*pi
tgrid = 400

# Constants
a = 2
b = -1
r = 8

# Calculations
x = a + r * sin(t)
y = b + r * cos(t)