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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5e11a8241d44b5f16a79e4f7125af1f23e56b0b267f1dcb8fa7cd2f10cb35bb |
|
MD5 | f1493c0fc5ad0159ed4e3fb3975f6d2d |
|
BLAKE2b-256 | 806e331d8adcb1b717cb703868ff2702bc6339bee21e319b99698ca71c4a3814 |
File details
Details for the file ellipsetools-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: ellipsetools-0.0.5-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fbb1d047fddee85149769f2df72d779379a55df534af25f6b8a2c7a3beade76 |
|
MD5 | e8fb6151967a011b408c989441c60cc8 |
|
BLAKE2b-256 | 0a2195c56e6b6dbe5db8a315e85c1bb3b49b9d415c6ded9807aca5f66778b0c4 |