Python turtle shapes
11,310
Solution 1
turtle.shape
changes the shape of the turtle as it's drawing. To actually draw that shape where it is, you need turtle.stamp()
:
up()
goto(-200,-200)
down()
shape("circle")
shapesize(2,1,1)
fillcolor("black")
stamp()
up()
goto(-300,-100)
down()
shape("circle")
shapesize(4,4,1)
fillcolor("black")
stamp()
up()
goto(-100,-100)
down()
shape("circle")
shapesize(4,4,1)
fillcolor("black")
stamp()
Solution 2
use the turtle.stamp()
function
Author by
Isu
Updated on June 14, 2022Comments
-
Isu almost 2 years
I am drawing something with python turtle , i used the shape functions but the shapes overdraw the others before them (i can see the shapes moving) , and i get just the last shape:
`up() goto(-200,-200) down() shape("circle") shapesize(2,1,1) fillcolor("black") up() goto(-300,-100) down() shape("circle") shapesize(4,4,1) fillcolor("black") up() goto(-100,-100) down() shape("circle") shapesize(4,4,1) fillcolor("black")`
I am looking forward for your answers , thank you !
-
TemporalWolf about 6 yearsWhat do you expect to happen?
-
Isu about 6 yearsI want those shapes to stay in place (i was trying to draw a skull (the eyes and nose)) while i could use turtle.circle for the eyes the nose i was trying to draw has an elliptic form
-
Qbik almost 5 yearsI have the same problem, moving shapes as default behavior is suprising form me, but ok
-