From 5e81edce8d7fbb3396b509eb9ea2c9d75898583e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 29 Nov 2019 18:52:12 +0200 Subject: [PATCH] septynkampio centras --- Karto/assignment4/draw.py | 8 +++++++- Karto/assignment4/measure.py | 5 ----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Karto/assignment4/draw.py b/Karto/assignment4/draw.py index 8c7d5b0..677d7ff 100755 --- a/Karto/assignment4/draw.py +++ b/Karto/assignment4/draw.py @@ -4,7 +4,7 @@ import numpy as np import matplotlib.pyplot as plt from collections import namedtuple -from shapely.geometry import LineString, asPolygon +from shapely.geometry import LineString, asPolygon, Point as sPoint from descartes import PolygonPatch from measure import * @@ -134,4 +134,10 @@ for i in range(1, 7): prev_dirang += pi - step ax.add_patch(PolygonPatch(asPolygon(heptagon), linewidth=2, fc='xkcd:white', ec='xkcd:magenta')) +# septynkampio centras +x0, y0 = Points[6].xy +x = x0 + float(D1)/(2*sin(pi/7))*sin(pi/7-float(K1)*pi/180) +y = y0 + float(D1)/(2*sin(pi/7))*cos(pi/7-float(K1)*pi/180) +ax.add_patch(PolygonPatch(sPoint(x, y).buffer(5))) + plt.show() diff --git a/Karto/assignment4/measure.py b/Karto/assignment4/measure.py index 68861b8..d39a26f 100755 --- a/Karto/assignment4/measure.py +++ b/Karto/assignment4/measure.py @@ -65,11 +65,6 @@ L11 = Dec('3.305') L12 = Dec('2.210') L13 = Dec('4.381') -# this is incorrect -#A05_plotis = L2 + L3 -#A08_plotis = sum([L4,L5,L6,L7,L8,L9]) -#G11_plotis = sum([L10,L11,L12,L13]) - A03_plotis = Dec('17.401') + A A05_plotis = Dec('13.705') + B A08_plotis = Dec('29.006') + C