Skip to main content

A module for simplifying 2D and 3D lines using Ramer-Douglas-Peucker algorithm

Project description

simplify5d

A module for simplifying 2D and 3D lines using Ramer-Douglas-Peucker algorithm.

An extended port of the very fast simplify.js - https://github.com/mourner/simplify-js

Installation

Install using pip:

pip install simplify5d

Usage

import numpy as np
from simplify5d import simplify

points_2d = np.array([[0, 0], [1, 1], [2, 2], [3, 3]])
points_3d = np.array([[0, 0, 0], [1, 1, 1], [2, 2, 2], [3, 3, 3]])

simplified_2d = simplify(points_2d, tolerance=1.0, highest_quality=False)
simplified_3d = simplify(points_3d, tolerance=1.0, highest_quality=False)

print("Simplified 2D points:", simplified_2d)
print("Simplified 3D points:", simplified_3d)

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

simplify5d-0.2.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplify5d-0.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file simplify5d-0.2.tar.gz.

File metadata

  • Download URL: simplify5d-0.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for simplify5d-0.2.tar.gz
Algorithm Hash digest
SHA256 5960884cbcfcf1a97dd1900edf622b1ab3440e560399a3c2cd0385900a047ddd
MD5 471949495db8b54796a30fb94b3b3d9c
BLAKE2b-256 2e39b81b278f67abefa76368078a34754f6770328882855ba9c0db4317d0b188

See more details on using hashes here.

File details

Details for the file simplify5d-0.2-py3-none-any.whl.

File metadata

  • Download URL: simplify5d-0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for simplify5d-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6713f20971623b7216e29c75e6a4eb14ff384c409e28efa01b0f2ce57869143
MD5 e24e704be4859064a888d2cea9e453f3
BLAKE2b-256 78567b2c2474b042163aeb200bb4e63a204e1dd9b42246f8c086cb2e238fba93

See more details on using hashes here.

Supported by

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