generated from mwc/project_drawing
spiderweb with spider finished
I wrote two saparate files to draw spider and spiderweb, then I found that they work individually but cannot draw together in drawing py I tried to 1) change the variable in spider to make it align with spiderweb, not work 2) write them into one file and call their function at end, it work but does not work well Then I realized that it's position thing, when I finish drawing spiderweb, I didn't put the direction back So I tried to fix this in spiderall and it worked; Then I think it should also work in drawing project, which then works too! future project might be make the spider gif from up to down and make firework effect
This commit is contained in:
11
spiderweb.py
11
spiderweb.py
@@ -36,7 +36,7 @@ def connect_segments():
|
||||
# Skip connections if either segment is near the x-axis or y-axis
|
||||
if segment_positions[j][i][0] == -350 or segment_positions[next_j][i][1] == 350:
|
||||
continue
|
||||
|
||||
|
||||
penup()
|
||||
goto(segment_positions[j][i]) # Go to the current segment
|
||||
pendown()
|
||||
@@ -47,8 +47,9 @@ def draw_web(side_length):
|
||||
draw_web_line(side_length)
|
||||
connect_segments()
|
||||
|
||||
# Draw the web lines
|
||||
draw_web(400)
|
||||
hideturtle()
|
||||
done()
|
||||
|
||||
# Draw the web lines
|
||||
# draw_web(300)
|
||||
# hideturtle()
|
||||
# done()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user