Skip to main content

A Python interface to the ComplexRegions.jl Julia package

Project description

cxregions

Stable

This package is a Python interface to the ComplexRegions.jl Julia package, providing tools for working with complex regions defined by paths and curves. It allows users to create, manipulate, and analyze geometric shapes such as circular polygons and general polygons using Julia's computational capabilities from within Python.

Installation

To install the cxregions package, you can use pip:

pip install cxregions

The first time you import cxregions, it will set up a Julia environment and install the necessary Julia packages. This may take a few minutes.

Usage

Here is a simple example of how to use the cxregions package:

from cxregions import Polygon, Line, Arc, Mobius

# Create curves
line1 = Line(0+0j, 2+2j)
print(line1.point(0.5))  # Should print 1+1j
arc1 = Arc(-1j, 1j, -1)
p = Polygon([4, 4 + 3j, 3j, -2j, 6 - 2j, 6])
print(p.winding(5 - 1j)) # Should print 1

# Möbius transformation
f = Mobius(1, 1, 1, -1) # f(z) = (z+1)/(z-1)
print(f(0)) # -1.0
print(f(line1)) # A Circle

Please see thefull documentation for more details.

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

cxregions-0.1.5.tar.gz (84.2 kB view details)

Uploaded Source

Built Distribution

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

cxregions-0.1.5-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file cxregions-0.1.5.tar.gz.

File metadata

  • Download URL: cxregions-0.1.5.tar.gz
  • Upload date:
  • Size: 84.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cxregions-0.1.5.tar.gz
Algorithm Hash digest
SHA256 fefeb28d5276dcfcfe4ef54f12278682dd7afa8d74ba823a8583077b99cc0203
MD5 7ef50cd72bf215c26cf022367b131003
BLAKE2b-256 0ce5104fd2df80e1b74b10688f77ea2c946024f4f7683627ccc3ec9fb4e4aa25

See more details on using hashes here.

File details

Details for the file cxregions-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: cxregions-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cxregions-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0c277704f328282fd8b18529ca2ebc4337a0aa7e927b383c435e2317000a1be3
MD5 09edba5ea09c75135935a8e935ee7e50
BLAKE2b-256 5a034e84a9ad381376d62b267532e5bfd22d7907cf17cd98a188d541354810b2

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