From 5bc7be827687d039612d8d0fc287b47991e1e9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 28 Nov 2019 18:54:24 +0200 Subject: [PATCH] humble drawing --- Karto/assignment4/draw.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 Karto/assignment4/draw.py diff --git a/Karto/assignment4/draw.py b/Karto/assignment4/draw.py new file mode 100755 index 0000000..27b3c52 --- /dev/null +++ b/Karto/assignment4/draw.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 +import matplotlib.pyplot as plt +from shapely.geometry import LineString +from math import sqrt + +def heptagon(linelen, slant): + inner_angle = 180*5/7 + pts = [(0, 0)] + dx = linelen * sin( + for _ in range(7): + +def plot_line(ax, ob): + x, y = ob.xy + ax.plot(x, y, color='#6699cc', alpha=0.7, linewidth=3, solid_capstyle='round', zorder=2) + +fig, ax = plt.subplots() +line = LineString([(0, 0), (1, 1), (0, 2), (2, 2), (3, 1), (1, 0)]) + +#plot_coords(ax, line) +#plot_bounds(ax, line) +plot_line(ax, line) + +ax.set_title('Užliejamų plotų brėžinys') + +plt.show()