``0.4.0`` ========= |pypi| |docs| .. |eacute| unicode:: U+000E9 .. LATIN SMALL LETTER E WITH ACUTE :trim: Performance Optimizations ------------------------- - `Adding `__ Fortran `speedups `__ for many crucial computation helpers including - intersecting line segments - (vectorized) Horner's method for evaluating a B |eacute| zier curve at multiple parameters at once - (vectorized) Horner's method for evaluating a B |eacute| zier surface - computing "linearization error" (how close a curve is to a line) - specializing a B |eacute| zier curve to a sub-interval - using Newton's method to refine a curve-curve intersection - `Adding `__ ``_verify`` switch to ``Surface.locate()`` (`doc `__) and ``Curve.intersect()`` (`doc `__) to selectively disable overly defensive value checking. (Making sure to use this switch during "internal" computation.) - Making sure NumPy arrays are Fortran-contiguous as often as possible (e.g. snippets and source, via ``np.asfortranarray()``). This is to avoid (and emphasize) a non-trivial overhead when passing a C-contiguous array to a Fortran function. (`03a7242 `__, `6064e4c `__, `f1804f4 `__) - Using Horner's method in ``Curve.evaluate_multi()`` and ``Surface.evaluate_barycentric()``, rather than inferior (sometimes non-vectorized) approaches (`dee8181 `__, `2611e64 `__) - Made surface-surface intersection more resilient / lenient for corner intersections. For "nearby" intersections, parameter values can be rounded to ``0`` or ``1``. (`4a8458c `__) New Features ------------ - `Adding `__ optional ``strategy`` argument (one of geometric or algebraic) to the ``Surface.intersect()`` `method `__ - Added "algebraic" ``IntersectionStrategy`` `enum `__ via curve `implicitization `__ (`reference `__) - Adding ``Curve.reduce_()`` `method `__ which acts as a partial inverse to ``Curve.elevate()`` `method `__. It is only a complete inverse when a curve is degree-elevated, otherwise it returns the "best" reduced form (in the least squares sense). Interface Changes ----------------- - (**Breaking change**) `Removing `__ ``show`` keyword from ``Curve.plot()`` (`doc `__), ``Surface.plot()`` (`doc `__) and ``CurvedPolygon.plot()`` (`doc `__) - `Adding `__ ``color`` keyword to ``Curve.plot()`` `method `__ - `Adding `__ ``alpha`` keyword to ``Curve.plot()`` `method `__ - (**Breaking change**) `Splitting `__ the ``Surface.evaluate_multi()`` `method `__ into ``Surface.evaluate_barycentric_multi()`` (`doc `__) and ``Surface.evaluate_cartesian_multi()`` (`doc `__) - `Adding `__ ``__dict__`` helpers on ``Curve``, ``CurvedPolygon`` and ``Surface``. These are ``@property``\ s intended only for REPL use, since classes with ``__slots__`` no longer have a ``__dict__`` attribute. Miscellany ---------- - Adding ``IntersectionClassification`` `enum `__ to docs (`ref `__) - `Moving `__ most plotting into a dedicated module. More importantly, importing plotting helpers at **runtime** rather at **import time**. So if computational code never plots, it won't eat the import cost of ``matplotlib``. `Removing `__ ``matplotlib`` as a dependency. .. |pypi| image:: https://img.shields.io/pypi/v/bezier/0.4.0.svg :target: https://pypi.org/project/bezier/0.4.0/ :alt: PyPI link to release 0.4.0 .. |docs| image:: https://readthedocs.org/projects/bezier/badge/?version=0.4.0 :target: https://bezier.readthedocs.io/en/0.4.0/ :alt: Documentation for release 0.4.0