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.6.tar.gz (89.5 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.6-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cxregions-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5a70ef8f65faf19593451832dc272997e5e461b03287c5133522139d63093187
MD5 d566e077a4f51f0b9542d1d548db4adb
BLAKE2b-256 cae1ebb89da82804d53b70effd072736705c0067746533253259ae387c0770da

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cxregions-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ead4bcd784dc428f1cc032dd36edbd133a81b958a590707894530beebfe1b4df
MD5 4a6ed444cbfb8e4fe30ed07296b703ad
BLAKE2b-256 677b57a5d6511994d152e4038c188bca09738ef13cf5dd0fd46b730a42d53b37

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