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 simplify.js.

Installation

Install using pip:

pip install simplify5d

## Usage

import numpy as np
from simplify5d import simplify_2d, simplify_3d

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_2d(points_2d, tolerance=1.0, highest_quality=False)
simplified_3d = simplify_3d(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.1.tar.gz (2.3 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.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for simplify5d-0.1.tar.gz
Algorithm Hash digest
SHA256 61fa3131fca035a0cc455c92faead3283ae753c27f2bed3c38eafcb11e6e545f
MD5 55f93b13aaea0b47e2730f51e83de1a1
BLAKE2b-256 9976dc6d7d670d5803da9cef1bf6ab759e0a2c67b35c12e3fd78e028068974bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: simplify5d-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3396f31f00de0920c968aa388a6e5657a6aaf3ba187b68bfd6a18dec5d53ba00
MD5 0b0bc0385a0e0f470f23e6ae28c43368
BLAKE2b-256 8d06ec2841432cc9a3debf3b48aa287841bfe576060e6b0c84ae2ffd7a655d1c

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