stud

study spacejunk
Log | Files | Refs | LICENSE

commit 5e81edce8d7fbb3396b509eb9ea2c9d75898583e (tree)
parent aa96fa2c908b27a88fcdcb873645721de32dd3f6
Author: Motiejus Jakštys <desired.mta@gmail.com>
Date:   Fri, 29 Nov 2019 18:52:12 +0200

septynkampio centras

Diffstat:
MKarto/assignment4/draw.py | 8+++++++-
MKarto/assignment4/measure.py | 5-----
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git 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 @@ -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