kleine Verbesserungen
This commit is contained in:
parent
4148826c43
commit
f4bf49c6d4
|
@ -72,24 +72,24 @@ class Circle:
|
|||
self.__offset = (self.__distance / 100) * val
|
||||
|
||||
def circle_generation(self):
|
||||
|
||||
x1 = 10
|
||||
y1 = 10
|
||||
y = y1
|
||||
v = 1
|
||||
g = 1
|
||||
x = self.__radius
|
||||
y = self.__radius
|
||||
i = 1
|
||||
|
||||
canvas = draw.Drawing(self.__length, self.__height, origin=(0, 0))
|
||||
|
||||
while y <= self.__height:
|
||||
x = x1 + self.__offset * v
|
||||
while x <= self.__length:
|
||||
while y + self.__radius <= self.__height:
|
||||
while x + self.__radius <= self.__length:
|
||||
canvas.append(draw.Circle(x, y, self.__radius, fill='none', stroke_width=1, stroke='black'))
|
||||
x = x + self.__distance
|
||||
y = y + self.__distance
|
||||
v = -((1 - g) / 2)
|
||||
g = -g
|
||||
|
||||
if i % 2 == 0:
|
||||
x = self.__radius
|
||||
else:
|
||||
x = self.__radius + self.__offset
|
||||
|
||||
y = y + self.__distance
|
||||
i = i + 1
|
||||
canvas.save_svg(f'{self.__filepath}/{self.__name}.svg')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue