circle_segment


circle_segment, a C code which carries out various computations associated with a circle segment.

Begin with a circle of radius R. Choose two points P1 and P2 on the circle, and draw the chord P1:P2. This chord divides the circle into two pieces, each of which is called a circle segment. Consider one of the pieces. The "angle" THETA of this segment is the angle P1:C:P2, where C is the center of the circle. Let Q be the point on the chord P1:P2 which is closest to C. The "height" H of the segment is the distance from Q to the perimeter of the circle.

This library considers various computations, including:

The code creates some plots using gnuplot().

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

circle_segment is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version.

Related Data and Programs:

circle_segment_test

circle_rule, a C code which computes quadrature rules for the unit circle in 2D, that is, the circumference of the circle of radius 1 and center (0,0).

geometry, a C code which performs geometric calculations in 2, 3 and M dimensional space, including the computation of angles, areas, containment, distances, intersections, lengths, and volumes.

gnuplot_test, a C code which writes data and command files so that gnuplot() can create plots of the program results.

Source Code:


Last revised on 14 June 2019.