Skip to content

Commit 7c72a61

Browse files
committed
WIP: code to compute bezier segment / path lengths
1 parent f0ddafc commit 7c72a61

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/matplotlib/bezier.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ def point_at_t(self, t):
215215
"""Return the point on the Bezier curve for parameter *t*."""
216216
return tuple(self(t))
217217

218+
def arc_length(self, tol=1e-6):
219+
pass
220+
218221
def arc_area(self):
219222
r"""
220223
(Signed) area swept out by ray from origin to curve.

lib/matplotlib/path.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,9 @@ def intersects_bbox(self, bbox, filled=True):
656656
return _path.path_intersects_rectangle(
657657
self, bbox.x0, bbox.y0, bbox.x1, bbox.y1, filled)
658658

659+
def length(self, **kwargs):
660+
pass
661+
659662
def signed_area(self, **kwargs):
660663
"""
661664
Get signed area filled by path.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy