Skip to main content

This package allows to compute the best fit circle given points in three-dimensional space.

Project description

Introduction

This package allows to compute the best fit circle given points in three-dimensional space.

Installation

The package can be installed with pip.

$ pip install circle-fitting-3d

Example Usage

>>> from circle_fitting_3d import Circle3D
>>> circle_3d = Circle3D([[3, 0, 0], [0, 3, 0], [0, 0, 3]])
>>> circle_3d.center
Point([1., 1., 1.])
>>> circle_3d.radius
2.449489742783178

The circle and points can be plotted as follows (plot created using the example_1.py script located in the examples folder):

>>> import matplotlib.pyplot as plt
>>> fig = plt.figure()
>>> ax = fig.add_subplot(111, projection="3d")
>>> circle_3d.plot(ax)
examples/example_1.svg

Acknowledgment

This package is based on the scikit-spatial library by Andrew Hynes and the algorithm is based on the algorithm provided by the MESHLOGIC webiste.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circle-fitting-3d-1.0.0.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

circle_fitting_3d-1.0.0-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page