Skip to main content

Equal subdivision of an ellipse into N points

Project description

ellipsetools

This package provides a few convinient tools for ellipses. The main takeaway is the ability to subdivide an ellipse. Specifically, it can generate $N$ points on an ellipse, with axes $(a, b)$, where the arc length between each point is identical. Refer to the Usage section to see an example of this. The total arc length of the ellipse is solved (numerically) by the integral

Using the above, we split the task into $N$ optimization problems to find coordinates of each segment. The program is reasonably fast and can easily generate more than $N = 1000$ points.

Installation

The package is available on PyPI. You can install using the command below.

pip install ellipsetools

Usage

An example of a command-line program is given in examples/cnc_drill_holes.py. It creates coordiates for hole-drilling on an elliptical shape for CNC machines. In such cases, it is paramount that each hole has equal spacing.

Running the program produces the following ellipse: From the above, it is clear that the holes are evenly spaced. Blue points indicate holes, whereas the orange curve is the shape of the body which is to be drilled by the CNC machine.

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

ellipsetools-0.0.5.tar.gz (35.3 kB view details)

Uploaded Source

Built Distribution

ellipsetools-0.0.5-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file ellipsetools-0.0.5.tar.gz.

File metadata

  • Download URL: ellipsetools-0.0.5.tar.gz
  • Upload date:
  • Size: 35.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for ellipsetools-0.0.5.tar.gz
Algorithm Hash digest
SHA256 e5e11a8241d44b5f16a79e4f7125af1f23e56b0b267f1dcb8fa7cd2f10cb35bb
MD5 f1493c0fc5ad0159ed4e3fb3975f6d2d
BLAKE2b-256 806e331d8adcb1b717cb703868ff2702bc6339bee21e319b99698ca71c4a3814

See more details on using hashes here.

File details

Details for the file ellipsetools-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for ellipsetools-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0fbb1d047fddee85149769f2df72d779379a55df534af25f6b8a2c7a3beade76
MD5 e8fb6151967a011b408c989441c60cc8
BLAKE2b-256 0a2195c56e6b6dbe5db8a315e85c1bb3b49b9d415c6ded9807aca5f66778b0c4

See more details on using hashes here.

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