Bezier

Latest version: v2024.6.20

Safety actively analyzes 701370 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 22

0.11.0

[![PyPI link to release 0.11.0](https://img.shields.io/pypi/v/bezier/0.11.0.svg)](https://pypi.org/project/bezier/0.11.0/) [![Documentation for release 0.11.0](https://readthedocs.org/projects/bezier/badge/?version=0.11.0)](https://bezier.readthedocs.io/en/0.11.0/)

Python Changes

Packaging

- Explicit support for Python 3.8 has been added ([\161](https://github.com/dhermes/bezier/pull/161)). On Windows this required using the `os.add_dll_directory()` [function](https://docs.python.org/3/library/os.html#os.add_dll_directory) to load `bezier.dll` (in earlier Python versions, the DLL directory was added by modifying `%PATH%`).

New Features

- Loosened type constraints in `Curve` [constructor](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.curve.html#bezier.curve.Curve) and `Surface` [constructor](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.surface.html#bezier.surface.Surface); now any sequence type is accepted rather than **only** NumPy arrays ([68f7dc7](https://github.com/dhermes/bezier/commit/68f7dc7c1f26bb678d09b4221fd917531fb79860), [a8c68a3](https://github.com/dhermes/bezier/commit/a8c68a3368a1edf90cd76cd6ff77ab698b6c3907), [f5c7869](https://github.com/dhermes/bezier/commit/f5c7869e86b196aca3db272a2e85413357864bc7)). Fixed [\#146](https://github.com/dhermes/bezier/issues/146).
- Added `copy` and `verify` arguments to `Curve` [constructor](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.curve.html#bezier.curve.Curve) and `Surface` [constructor](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.surface.html#bezier.surface.Surface) ([\163](https://github.com/dhermes/bezier/pull/163)). Fixed [\#158](https://github.com/dhermes/bezier/issues/158).
- Added [SymPy](https://docs.sympy.org/)-based helpers for "exact" representations ([\#164](https://github.com/dhermes/bezier/pull/164)). Fixed [\#157](https://github.com/dhermes/bezier/issues/157).
- `Curve.implicitize()` [function](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.curve.html#bezier.curve.Curve.implicitize)
- `Curve.to_symbolic()` [function](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.curve.html#bezier.curve.Curve.to_symbolic)
- `Surface.implicitize()` [function](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.surface.html#bezier.surface.Surface.implicitize)
- `Surface.to_symbolic()` [function](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.surface.html#bezier.surface.Surface.to_symbolic)

Internals

- Re-factored non-public modules so that algorithms implemented in pure Python **only** invoke other algorithms written in pure Python ([\160](https://github.com/dhermes/bezier/pull/160)). Previously these algorithms invoked the equivalent Fortran speedup if present for a given function. Fixed [\#159](https://github.com/dhermes/bezier/issues/159).

Miscellany

- Moved `*.f90` Fortran files **out** of Python source tree ([\152](https://github.com/dhermes/bezier/pull/152)).

ABI Changes

Breaking Changes

- Added `BEZ_` prefix for exported ABI names ([\167](https://github.com/dhermes/bezier/pull/167)). Fixed [\#166](https://github.com/dhermes/bezier/issues/166).

Additive Changes

- Changed all `[in]` arguments in C headers to `const` pointers ([\169](https://github.com/dhermes/bezier/pull/169)). Fixed [\#168](https://github.com/dhermes/bezier/issues/168).

Bug Fixes

- Explicitly handle length 0 curves (with an error) in the `compute_length()` Fortran [subroutine](https://bezier.readthedocs.io/en/0.11.0/abi/curve.html#c.BEZ_compute_length) that is used by the `Curve.length` [property](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.curve.html#bezier.curve.Curve.length) ([a24368f](https://github.com/dhermes/bezier/commit/a24368fc690b2c6d6a676b9d569f25b5919c400d)). Fixed [\#148](https://github.com/dhermes/bezier/issues/148).
- Fixed high-degree error in the `Curve.evaluate()` [method](https://bezier.readthedocs.io/en/0.11.0/python/reference/bezier.curve.html#bezier.curve.Curve.evaluate), via the `evaluate_curve_barycentric()` Fortran [subroutine](https://bezier.readthedocs.io/en/0.11.0/abi/curve.html#c.BEZ_evaluate_curve_barycentric) ([5768824](https://github.com/dhermes/bezier/commit/57688243b9264ca7ea48423f100e8f516ba2fa2f)). Fixed [\#156](https://github.com/dhermes/bezier/issues/156). The code uses `(n C (k + 1)) = (n - k) / (k + 1) (n C k)` to update the value and `(30 - 14) (30 C 14)` overflows a 32-bit signed integer.

Documentation

- Updated install instructions to show how to disable the binary extension via `BEZIER_NO_EXTENSION` ([6262594](https://github.com/dhermes/bezier/commit/626259493997a9d83924d100900189f32b87e6c5), [00c1e61](https://github.com/dhermes/bezier/commit/00c1e619688b93a6a079288be40153a9157fa6c5)). Fixed [\#147](https://github.com/dhermes/bezier/issues/147).
- Added "Citation" section to landing page ([9885063](https://github.com/dhermes/bezier/commit/9885063a2e3795e0bec35a4fc1574dc294d359e0)). Fixed [\#150](https://github.com/dhermes/bezier/issues/150).

0.10.0

[![PyPI link to release 0.10.0](https://img.shields.io/pypi/v/bezier/0.10.0.svg)](https://pypi.org/project/bezier/0.10.0/) [![Documentation for release 0.10.0](https://readthedocs.org/projects/bezier/badge/?version=0.10.0)](https://bezier.readthedocs.io/en/0.10.0/)

Python Changes
==============

Breaking Changes
----------------

- Support for Python 2.7 has been dropped. With the impending [EOL](https://pythonclock.org/) of Python 2.7 on January 1, 2020 many of the `bezier` dependencies such as `numpy`, `scipy` and `pytest` have dropped support for Python 2.7 in their latest releases. Some changes related to this include:
- Removing support for Python 2.7 ([3eaa5aa](https://github.com/dhermes/bezier/commit/3eaa5aaa670d167b2c1340d3d531d5438eaf62cd)).
- Updating all PyPy usage to be Python 3 only ([1e3037f](https://github.com/dhermes/bezier/commit/1e3037fce5acdcfa194cac481ee06ef6bcc329e5)).
- Removing `_bool_patch.h` ([4ccc559](https://github.com/dhermes/bezier/commit/4ccc559e6928f78556c1201f45a2ad7b3b40d7a5)).

Build
-----

- Integrating `black` [code formatter](https://black.readthedocs.io) into the `nox --session lint` session to ensure consistent formatting ([e659532](https://github.com/dhermes/bezier/commit/e659532747d0433bf3a91198a7baf172ed36f069)).
- Fully automating the building of wheels in the `bezier-wheels` [project](https://github.com/dhermes/bezier-wheels) ([recent commits](https://github.com/dhermes/bezier-wheels/compare/ee008511d5ff2736dfb44f770552e7553b00e8f0...424453f50fbb8f240ca60280b637a278f6e9ad4a)). Built wheels are uploaded to a Google Cloud Storage bucket.
- Using the same set of optimal flags for Fortran 77 code (i.e. `.f` files) that are used for Fortran 90 code (i.e. `.f90` files) ([e7eb56e](https://github.com/dhermes/bezier/commit/e7eb56e723f13d43f6eae855e6556b4ccbc1edd9)).
- Unify `requirements.txt` files and add notes about why each dependency is required ([230814d](https://github.com/dhermes/bezier/commit/230814d67e24f42f967a652ff7e8d81ee2176954), [1ae147f](https://github.com/dhermes/bezier/commit/1ae147f81e7a01ba672806a8fd56de25ba2bdcdb), [e710ee6](https://github.com/dhermes/bezier/commit/e710ee6968438cb2462ec8bea8af407159a63925)).
- Changing `imp` usage to `importlib` due to deprecation of the former ([9231d92](https://github.com/dhermes/bezier/commit/9231d92b420df1ed97ae2b159bd0aedf0c1ff888)). Fixed [\#137](https://github.com/dhermes/bezier/issues/137).
- Ditching the `--check-archs` flag in the macOS script for building wheels since we can no longer support 32-bit on macOS due to NumPy ([37be384](https://github.com/dhermes/bezier/commit/37be3845750ff0fe9f200f87a8427b05639c3a61)).
- Improved dev experience with Docker image used on CircleCI by adding a `.dockerignore` file for faster builds, suggesting `--workdir` and flag during local dev, setting `WHEELHOUSE` environment variable directly in the container (rather than in the CircleCI settings) and allowing "default" locations for pre-built wheels at `/wheelhouse` and `${HOME}/wheelhouse` ([08be336](https://github.com/dhermes/bezier/commit/08be336efac467beeb7055cfc80996b97482456a), [26acc38](https://github.com/dhermes/bezier/commit/26acc384d857cf9f5ddd8260ef50b7bcffeeb133), [7634779](https://github.com/dhermes/bezier/commit/763477958c73a4eb6ce0f89b6b37887c66c10706), [f9a8fcf](https://github.com/dhermes/bezier/commit/f9a8fcf275b244d962fae1e93b223af0c78285cc)).

Miscellany
----------

- Make some functional test cases more lenient so that they pass on 32-bit CentOS 5, which is used for `manylinux` ([e7eb56e](https://github.com/dhermes/bezier/commit/e7eb56e723f13d43f6eae855e6556b4ccbc1edd9)). This was part of a large effort to fully automate the building of wheels in the `bezier-wheels` [project](https://github.com/dhermes/bezier-wheels).
- Replacing `pypy` with `pypy3` in testing as the only non-CPython "unofficially supported" runtime. (This is part of the drop in support for Python 2.7.) Unfortunately the currently (as of August 2019) released versions of `pypy3` are not currently working with `numpy >= 1.16` (see [numpy/numpy\12740](https://github.com/numpy/numpy/issues/12740)) so the `numpy == 1.15.4` version is a pinned dependency.
- Specifying the NumPy version in `setup.py` based on `implementation_name` ([7e9046d](https://github.com/dhermes/bezier/commit/7e9046dc9dbe6f448238141221c5a7dff497d8d4)).
- Add `_pypy_speedup.c` built with Cython 0.29.11 because the latest Cython (0.29.13 as of August 2019) corresponds to the versions of NumPy that are incompatible with PyPy ([7813e41](https://github.com/dhermes/bezier/commit/7813e41f7666fa36fbb4a7daf0aa45c2d2bee87f)).
- Pinning to `numpy==1.15.4` and `scipy==1.2.0` in wheelhouse for pre-built Docker container ([7634779](https://github.com/dhermes/bezier/commit/763477958c73a4eb6ce0f89b6b37887c66c10706)).
- Added `nox --session validate_functional_test_cases` session to ensure that functional test cases always adhere to the JSON schema.
- Added `nox` session and fixed some schema file bugs ([618653a](https://github.com/dhermes/bezier/commit/618653a0888cc5e91a5fb1959cf5e04f61e5c1cf)).
- Fixed curve intersections that did not adhere to schema ([35b158a](https://github.com/dhermes/bezier/commit/35b158a9ad4f8c0ed1d4a3cd07a8c157f33b0639)).
- Transposed `nodes` schema for curved polygon ([8c3ca89](https://github.com/dhermes/bezier/commit/8c3ca895512a60c2fe82d8a24ab328244e3abb3f)).
- Enable the `nox` session to run in CircleCI ([5a0a343](https://github.com/dhermes/bezier/commit/5a0a343728ac52933b1aadd3c483fb439f2e043a)).
- Updated `slow` marker for `pytest` because it used a deprecated API ([46f8b57](https://github.com/dhermes/bezier/commit/46f8b57c8b34484236ce1bc9aa9f5ea5fc77c5df)).

Documentation
=============

- Changing all references to Mac OS X to macOS ([b10c2fc](https://github.com/dhermes/bezier/commit/b10c2fc1af424e862143ac40d01f7baa65fc8af0), [c1c2c6b](https://github.com/dhermes/bezier/commit/c1c2c6b767c40c2eb070ae599a110ecc9fb3e793), [131d17b](https://github.com/dhermes/bezier/commit/131d17be3db5546deebff953378252b12b426534)). As of 10.12, the operating system has changed its name.
- Splitting up `algorithms/helpers`. The pre-amble has been moved into the `algorithms` landing page and the geometric and algebraic helpers have been moved into separate docs. ([889c913](https://github.com/dhermes/bezier/commit/889c913436b6d01533d8eb1830717620cea725ef)).

0.9.0

[![PyPI link to release 0.9.0](https://img.shields.io/pypi/v/bezier/0.9.0.svg)](https://pypi.org/project/bezier/0.9.0/) [![Documentation for release 0.9.0](https://readthedocs.org/projects/bezier/badge/?version=0.9.0)](https://bezier.readthedocs.io/en/0.9.0/)

Documentation
-------------

- Documenting the C ABI `libbezier` ([4608364](https://github.com/dhermes/bezier/commit/4608364e9c0a2b3888f7f661e629fceda9d9a431)). Fixed [\#63](https://github.com/dhermes/bezier/issues/63). This [documentation](http://bezier.readthedocs.io/en/0.9.0/abi/index.html) contains a page for each "module" which corresponds to the underlying Fortran module. Each module documents the routines in the corresponding header file, e.g. the [surface](http://bezier.readthedocs.io/en/0.9.0/abi/surface.html) document corresponds to the `bezier/surface.h` header. Fully working C examples have been added for each routine in `bezier/curve.h` and for the enum in `bezier/status.h`.
- Adding section about environment variables to [development](http://bezier.readthedocs.io/en/0.9.0/development.html) document ([5186e24](https://github.com/dhermes/bezier/commit/5186e24a7c7eab5d65ac41ba53e3826b693fc86f)). Fixed [\#78](https://github.com/dhermes/bezier/issues/78).
- Remove dependency on `rawgit.com` ([04d0f8d](https://github.com/dhermes/bezier/commit/04d0f8d3155a22c5a048f52f75a3c6ffcc7eba69)). The website is being turned down. Fixed [\#130](https://github.com/dhermes/bezier/issues/130).
- Renaming the "Native Libraries" document as "Binary Extension" ([f99db20](https://github.com/dhermes/bezier/commit/f99db20312bb4ba7e5943195020a8ced4be9457b)). In the process, changed most references to the "native" Python extension to instead call it a "binary" extension.
- Added a "Cython `.pxd` [Declarations](http://bezier.readthedocs.io/en/0.9.0/python/pxd/index.html)" document ([f99db20](https://github.com/dhermes/bezier/commit/f99db20312bb4ba7e5943195020a8ced4be9457b)). Fixed [\#122](https://github.com/dhermes/bezier/issues/122).
- Moving all Python specific documentation under a specific URL path ([3db483b](https://github.com/dhermes/bezier/commit/3db483b58e2c5dd0f618c15fc01710ec6b1a2907)). In particular, moving
- `/reference/...` to `/python/reference/...`
- `/python-binary-extension.html` to `/python/binary-extension.html`
- `/pxd/...` to `/python/pxd/...`.
- Moving all algorithm specific documentation under a specific URL path ([6e9c825](https://github.com/dhermes/bezier/commit/6e9c82501a222c95c616658e6e5e7bc00c9f4288)). In particular, moving
- `/algorithm-helpers.html` to `/algorithms/helpers.html`
- `/curve-curve-intersection.html` to `/algorithms/curve-curve-intersection.html`

ABI Changes
-----------

New Features

- Added `surface.h::compute_area` helper that can be used to compute the area of both a surface and a curved polygon ([d4d7249](https://github.com/dhermes/bezier/commit/d4d7249729dffd4994df1af899084ceb89dde8fc)).

Breaking Changes

- Removing getters and setters for parameters used during curve-curve intersection ([2fda3ae](https://github.com/dhermes/bezier/commit/2fda3aed2818849363c425e3fce70b4bafe7e9ef)):
- `curve_intersection.h::set_max_candidates`
- `curve_intersection.h::get_max_candidates`
- Removing `dimension` from `curve.h::get_curvature` ([1e39c0c](https://github.com/dhermes/bezier/commit/1e39c0ce0502919d83a81902c8d9affdb6c6b892)).

Python Changes
--------------

New Features

- Added implementation for `Surface.area` [property](http://bezier.readthedocs.io/en/0.9.0/python/reference/bezier.surface.html#bezier.surface.Surface.area) and `CurvedPolygon.area` [property](http://bezier.readthedocs.io/en/0.9.0/python/reference/bezier.curved_polygon.html#bezier.curved_polygon.CurvedPolygon.area) ([eb6077e](https://github.com/dhermes/bezier/commit/eb6077eab4f6ca0d72de6194f1789a2d0eada8b0)).

Non-Public API

- Removing getters and setters for parameters used during curve-curve intersection ([2fda3ae](https://github.com/dhermes/bezier/commit/2fda3aed2818849363c425e3fce70b4bafe7e9ef)):
- `bezier._geometric_intersection.set_max_candidates()`
- `bezier._geometric_intersection.get_max_candidates()`
- Removing cached values for `Curve.length` [property](http://bezier.readthedocs.io/en/0.9.0/python/reference/bezier.curve.html#bezier.curve.Curve.length), `Surface.area` [property](http://bezier.readthedocs.io/en/0.9.0/python/reference/bezier.surface.html#bezier.surface.Surface.area) and `Surface.is_valid` [property](http://bezier.readthedocs.io/en/0.9.0/python/reference/bezier.surface.html#bezier.surface.Surface.is_valid) ([34d48d6](https://github.com/dhermes/bezier/commit/34d48d6900963734d7fb82f13bd3f37416cc6efe)).

Build

- Renaming `libbezier.dll` shared library to `bezier.dll` on Windows ([d17a9bc](https://github.com/dhermes/bezier/commit/d17a9bcee194edc9f103734e35023d178ed8923b)). This follows the correct convention on Windows.
- Adding Python 3.7 support and making it the default version used for testing ([e368e9f](https://github.com/dhermes/bezier/commit/e368e9fd9ab31cfd818fcb9e777dff6dcbd3a7e6)).
- Dropping support for Python 3.5 ([f99db20](https://github.com/dhermes/bezier/commit/f99db20312bb4ba7e5943195020a8ced4be9457b)).
- Adding back `-march=native` for non-wheel builds ([1566019](https://github.com/dhermes/bezier/commit/1566019635b8ffb8a2e4725a2d51830351e03fa5)). This way, when installing from source (either via a local checkout or from the source distribution on PyPI) the most optimal machine instructions will be produced. Fixed [\#99](https://github.com/dhermes/bezier/issues/99).
- Removing all traces of 32-bit support for OS X ([d7620ad](https://github.com/dhermes/bezier/commit/d7620adb862ed6f9be9d2615916f789c3c24c52f)). This was driven by a [decision](https://github.com/numpy/numpy/issues/11625) from the NumPy maintainers.

Miscellany

- Adopted `black` [code formatter](https://black.readthedocs.io/en/stable/) ([f21b52d](https://github.com/dhermes/bezier/commit/f21b52d562daf6c86ddaba326aeee8362361e20f)).
- Adding project URLs and keywords for PyPI ([cfb070d](https://github.com/dhermes/bezier/commit/cfb070d651fba4e7df06216a159f623d57036f02)).
- Added 20 new surface-surface functional tests ([9fd9c1e](https://github.com/dhermes/bezier/commit/9fd9c1e26138034539e91aed04c97ec497a9e4b2)). See [\#121](https://github.com/dhermes/bezier/issues/121) for more information.
- Removed time and memory benchmarks due to flakiness and lack of an environment that could be used for benchmarking ([6a30dc2](https://github.com/dhermes/bezier/commit/6a30dc22abefe7f7573048659b00fbcd968b8ccc)). See [\#125](https://github.com/dhermes/bezier/issues/125) to follow discussion on re-enabling such benchmarks.
- Using `DEBUG=True` environment variable when running unit tests and other related tests ([d84dffb](https://github.com/dhermes/bezier/commit/d84dffb9d0e6fe1ee653e01cb9d4297f83aa11e0)).

0.8.0

[![PyPI link to release 0.8.0](https://img.shields.io/pypi/v/bezier/0.8.0.svg)](https://pypi.org/project/bezier/0.8.0/) [![Documentation for release 0.8.0](https://readthedocs.org/projects/bezier/badge/?version=0.8.0)](https://bezier.readthedocs.io/en/0.8.0/)

New Features
------------

- Adding support for surface-surface intersections that have coincident segments shared between each surface ([cfa2b93](https://github.com/dhermes/bezier/commit/cfa2b93792695b87f11ece9da1959013ecf77678), [0a9645c](https://github.com/dhermes/bezier/commit/0a9645c9a3f1df3274677ad3def3d934c590b642)). See cases:
- 4: [10Q-18Q](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces10Q_and_18Q.png)
- 5: [10Q-19Q](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces10Q_and_19Q.png)
- 43: [29Q-42Q](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces29Q_and_42Q.png)
- 44: [29Q-43Q](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces29Q_and_43Q.png)
- 45: [10Q-44Q](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces10Q_and_44Q.png)
- 46: [1Q-45Q](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces1Q_and_45Q.png)
- 47: [1Q-2C](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces1Q_and_2C.png)
- Adding support for curve-curve intersections that are also points of tangency. This was accomplished by five broad changes to the geometric intersection algorithm:
- Checking if almost-linear curves have disjoint bounding boxes **before** intersecting the linearized segments ([05f0343](https://github.com/dhermes/bezier/commit/05f0343ca1962dbc5ab3b143b5c6fe20b87272d1)).
- Adding a "full" Newton iteration for finding `B1(s) = B2(t)` when known to be near a solution. In particular, this has **special** handling for tangencies, which cause a singular Jacobian and make convergence drop from quadratic to linear and stalls out convergence early ([13a5be5](https://github.com/dhermes/bezier/commit/13a5be5d80d6a07a1a71326493baa06dbda70f13), [4bac61a](https://github.com/dhermes/bezier/commit/4bac61a243b08002c4b0154d2b346cc356097eaf)).
- Changing how "bad" linearized segments are handled. After subdividing to approximately linear curve segments, there were two problems which are now being handled in the same way. If the line segments connecting the subdivided curve endpoints

- are parallel, then the algorithm failed with a `PARALLEL` status
- intersect outside of the unit interval (for either `s` or `t`), the curve-curve candidate was rejected (a small amount, `0.5^{16}`, of "wiggle" room was allowed outside of `[0, 1]`).

Now both cases are handled in the same way. First, the subdivided curve segments will have a convex hull check applied (which is more strict than a bounding box check). If their convex hulls do collide, they are treated as a normal intersection of curved segments ([4457f64](https://github.com/dhermes/bezier/commit/4457f64eaf28bb9fb5c91a8740cd0d618fafc3da), [fe453c3](https://github.com/dhermes/bezier/commit/fe453c3839b19ce4a85dfd0b5ad78f71a0973daf)).
- Using the newly added "full" Newton's iteration for all intersections. Before, a single Newton step was applied after intersection the linearized segments ([d06430f](https://github.com/dhermes/bezier/commit/d06430fbb027eb9d62b6b724f70e62d0efb0732b)).
- Changing how a candidate pair of `s-t` parameters is added. ([c998445](https://github.com/dhermes/bezier/commit/c998445026a5487c59af17c9cbdfc9a6cf4d72c0)). In the previous implementation, a pair was considered a duplicate only if there was a difference of at most 1 [ULP](https://en.wikipedia.org/wiki/Unit_in_the_last_place) from an existing intersection (though this could be toggled via `set_similar_ulps()`). Now, the pair is "normalized" so that `s` and `t` are away from `0`. For example, if `s < 2^{-10}` then we use `1 - s` instead. (This is perfectly "appropriate" since evaluating a B&#xe9;zier curve requires using both `s` and `1 - s`, so both values are equally relevant.) Once normalized, a relative error threshold is used.
- Four curve-curve functional test cases have gone from failing to passing:
- 11: [14-15](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/curves14_and_15.png)
- 31: [38-39](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/curves38_and_39.png)
- 43: [58-59](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/curves58_and_59.png)
- 44: [60-59](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/curves60_and_59.png)

and two surface-surface cases have as well:

- 10: [20Q-21Q](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces20Q_and_21Q.png)
- 42: [41Q-21Q](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces41Q_and_21Q.png)

In order to support the aforementioned surface-surface cases, special support for "tangent corners" was added ([12b0de4](https://github.com/dhermes/bezier/commit/12b0de4e4dae1d84e0681386fd312794ac8736ff)).

ABI Changes
-----------

Breaking Changes

- Removed `BAD_TANGENT` status enum ([b89b2b1](https://github.com/dhermes/bezier/commit/b89b2b1de1726cdc9f508bd761f4c20e7d655321)). The case where that failure was issued has now been handled as an acceptable `TANGENT_BOTH` classification for surface-surface intersection points. (See the `classify_intersection()` [function](http://bezier.readthedocs.io/en/0.8.0/algorithm-helpers.html#bezier._surface_helpers.classify_intersection) for an example.)
- Adding `BAD_INTERIOR` status enum ([6348dc6](https://github.com/dhermes/bezier/commit/6348dc63b5d11453fa8312997429448bbdad0a3f)). (This is a **breaking** change rather than additive because it re-uses the enum value of `5` previously used by `BAD_TANGENT`.) This value is used by `interior_combine()` in the case that the curved polygon intersection(s) cannot be determined from the edge-edge intersections for a given surface-surface pair. See [#101](https://github.com/dhermes/bezier/issues/101).
- Removed `PARALLEL` status enum ([fe453c3](https://github.com/dhermes/bezier/commit/fe453c3839b19ce4a85dfd0b5ad78f71a0973daf)). Now when doing geometric curve-curve intersection, parallel linearized segments are handled by checking if the convex hulls collide and then (if they do) using a modified Newton iteration to converge to a root.
- Adding `BAD_MULTIPLICITY` status enum ([fe453c3](https://github.com/dhermes/bezier/commit/fe453c3839b19ce4a85dfd0b5ad78f71a0973daf)). (This is a **breaking** change rather than additive because it re-uses the enum value of `1` previously used by `PARALLEL`.) This is used when Newton's method fails to converge to either a simple intersection or a tangent intersection. Such failures to converge, when already starting near an intersection, may be caused by one of:
- The intersection was of multiplicity greater than 2
- The curves don't actually intersect, though they come very close
- Numerical issues caused the iteration to leave the region of convergence
- Removed `ulps_away()` ([c998445](https://github.com/dhermes/bezier/commit/c998445026a5487c59af17c9cbdfc9a6cf4d72c0)).
- Removed `set_similar_ulps()` and `get_similar_ulps()` ([c998445](https://github.com/dhermes/bezier/commit/c998445026a5487c59af17c9cbdfc9a6cf4d72c0)).

Surface Changes

- Added `SINGULAR` status enum for cases when a linear system can't be solved due to a singular matrix ([4457f64](https://github.com/dhermes/bezier/commit/4457f64eaf28bb9fb5c91a8740cd0d618fafc3da)).
- Adding `status` as a return value in `newton_refine_curve_intersect()`. This way, when the Jacobian is singular (which happens at points of tangency), the `SINGULAR` status can be returned ([4457f64](https://github.com/dhermes/bezier/commit/4457f64eaf28bb9fb5c91a8740cd0d618fafc3da)). The old behavior would've resulted in a division by zero.

Non-Public API

- Adding custom linear solver for the `2 x 2` case ([a3fb476](https://github.com/dhermes/bezier/commit/a3fb476cf9a82a34754bdd9b9881fbe857883d57)). This is modelled after `dgesv` from LAPACK.

Python Changes
--------------

- (**Bug fix**) The `0.7.0` release broke `Surface.plot()` and `CurvedPolygon.plot()` (when the nodes were transposed, the plotting helpers were not correctly updated). The `add_patch()` helper was fixed to account for the changes in data layout ([80bfaaa](https://github.com/dhermes/bezier/commit/80bfaaa74219f9053585aa8970131018baa516d1)).
- Added custom `UnsupportedDegree` [exception](http://bezier.readthedocs.io/en/0.8.0/reference/bezier.html#bezier.UnsupportedDegree) to be used by routines that have implementations that are hard-coded for specific degrees ([87a1f21](https://github.com/dhermes/bezier/commit/87a1f2171f6b810516544ff1691856d7fadfa12f)). See [#103](https://github.com/dhermes/bezier/issues/103).
- Removed `ulps_away()` ([c998445](https://github.com/dhermes/bezier/commit/c998445026a5487c59af17c9cbdfc9a6cf4d72c0)).
- Removed `set_similar_ulps()` and `get_similar_ulps()` ([c998445](https://github.com/dhermes/bezier/commit/c998445026a5487c59af17c9cbdfc9a6cf4d72c0)).

Non-Public API

- Returning `coincident` flag from curve-curve `all_intersections` ([ebe6617](https://github.com/dhermes/bezier/commit/ebe66178d0ab6f359ba206ded7b5d629d849955c)).
- Adding a `TANGENT_BOTH` classification for surface-surface intersection points that are interior to both surfaces at the point of tangency ([b89b2b1](https://github.com/dhermes/bezier/commit/b89b2b1de1726cdc9f508bd761f4c20e7d655321)). This previously failed with a `NotImplementedError`.
- Added `COINCIDENT` classification for surface-surface intersection points that occur on a segment that is coincident on an edges of each surface ([8b1c59d](https://github.com/dhermes/bezier/commit/8b1c59d2b48281d38275af6c5b6e11c1699b92c6)). Such points previously failed classification because they were interpreted as being tangent and having the same curvature (because the segments are identical).
- Added a `COINCIDENT_UNUSED` classification ([cfa2b93](https://github.com/dhermes/bezier/commit/cfa2b93792695b87f11ece9da1959013ecf77678)) for cases where coincident segments are moving in opposite directions (i.e. the surfaces don't share a common interior). For example see case 44 ([29Q-43Q](https://github.com/dhermes/bezier/blob/0.8.0/docs/images/surfaces29Q_and_43Q.png)).
- Adding custom linear solver for the `2 x 2` case ([764e56d](https://github.com/dhermes/bezier/commit/764e56db5bb4987d31e3c9f5fbabbe6564d6e0c0)). This is modelled after `dgesv` from LAPACK.
- Adding some support for B&xe9;zier clipping algorithm ([fbed62d](https://github.com/dhermes/bezier/commit/fbed62df305b8c2679ff260bba4f57d414e79a77), [ada4ea3](https://github.com/dhermes/bezier/commit/ada4ea34bf31cff5cc34491d6689f0f3a2b9f0a1)). See the original [paper](https://dx.doi.org/10.1016/0010-4485(90)90039-F) by Sederberg and Nishita for more information.

0.7.0

[![PyPI link to release 0.7.0](https://img.shields.io/pypi/v/bezier/0.7.0.svg)](https://pypi.org/project/bezier/0.7.0/) [![Documentation for release 0.7.0](https://readthedocs.org/projects/bezier/badge/?version=0.7.0)](https://bezier.readthedocs.io/en/0.7.0/)

Robustness
----------

- Geometric curve-curve intersection has better handling for cases when the number of intersection candidates grows large (`MAX_CANDIDATES == 64`):
- First tries to reduce the number of candidates by checking if the **actual** convex hulls of each segment in a candidate pair intersect. This is a much "finer" check than using the "blunt" bounding box check.
- If the convex hull refinement fails, checks if the curves are coincident, i.e. different segments / parameterizations along the same algebraic curve. This is done by using the `Curve.locate()` [function](https://bezier.readthedocs.io/en/0.7.0/reference/bezier.curve.html#bezier.curve.Curve.locate) to try to project each of the four endpoints onto the other curve and then re-parameterizing each curve onto a common interval.

Data Structures
---------------

- Storing `xy`-points as columns (rather than rows). This was a **very** large and breaking change, started in [b44af8c](https://github.com/dhermes/bezier/commit/b44af8c3d590add947f905f2bc016af7272fc8e0). See [#51](https://github.com/dhermes/bezier/issues/51) for more information.

Python Changes
--------------

Non-Public API

- Requiring **contiguous** 1D arrays for Cython functions ([9ede37d](https://github.com/dhermes/bezier/commit/9ede37dcbb7eda9899a02675939eb4dd66af8e8c)).

0.6.097

Page 2 of 22

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.