From e2c0c968eecec4a90ea5a432e1db1ba4a50df93e Mon Sep 17 00:00:00 2001 From: Hong-Phuc Bui <hong-phuc.bui@htwsaar.de> Date: Fri, 30 May 2025 11:28:38 +0200 Subject: [PATCH] fix docstring --- nicegui-tk-bezier/README.md | 5 +++++ nicegui-tk-bezier/bezier.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/nicegui-tk-bezier/README.md b/nicegui-tk-bezier/README.md index 8df778b..8ee8d86 100644 --- a/nicegui-tk-bezier/README.md +++ b/nicegui-tk-bezier/README.md @@ -1,5 +1,7 @@ # Demo NiceGUI vs Tk +Eine kleine Demonstration von Plot-Möglichkeiten in NiceGUI via HTML-Canvas und Tk Canvas + ## Install ```bash @@ -11,6 +13,9 @@ ## Run +In beide Programm kann man 4 Punkten einer (Kubischen) Bezier-Kurve mit Mouse-Klicks bestimmen, +danach wird eine Kurve angezeigt. + ### Tk ```bash diff --git a/nicegui-tk-bezier/bezier.py b/nicegui-tk-bezier/bezier.py index b491a1a..26f8eed 100644 --- a/nicegui-tk-bezier/bezier.py +++ b/nicegui-tk-bezier/bezier.py @@ -2,12 +2,12 @@ Module related to bezier curve """ def make_cubic_bezier(control_points: [(float, float)], n: int = 10) -> [(float, float)]: - """" + r"""" Interpolate a Bezier-curve by split it into segments of lines (=polyline). A Bezier-Curve is defined by \[ - B(P_0, P_1, P_2, P_3:t) = (1-t)^3*P_0 + 3(1-t)^2*t*P_1 + 3(1-t)*t^2*P_2 + t^3*P_3 + B(P_0, P_1, P_2, P_3:t) = (1-t)^3*P_0 + 3(1-t)^2*t*P_1 + 3(1-t)*t^2*P_2 + t^3*P_3 \] for $t \in \[0, 1\]$ -- Gitblit v1.10.0-SNAPSHOT