Closed boa2145 closed 1 year ago
@boa2145 Yes. Fill the figure, and it will be fixed! And don't ask me Why! You can fill the figure with a transparent color if you want:
Jags = 5
Turtle.X = 300
Turtle.Y = 300
Turtle.Speed = 30
GW.PenWidth = 20
Turtle.CreateFigure()
For I = 1 To Jags
Turtle.Move(100)
Turtle.Turn(2 * 360 / Jags)
Turtle.Move(100)
Turtle.Turn(-360 / Jags)
Next
GraphicsWindow.BrushColor = Colors.Transparent
Turtle.FillFigure()
Good morning Mohammad,
Thanks for your reply with the source code and its output. I didn't know that I can fill a shape with a transparent color. That's great, but there was still a tiny mistake. I enclose two pics to demonstrate it. If you hide the turtle at the end of the source code, you'll see it. I found a solution. You have to add a last move by the turtle outside of the loop with the same length and it was fixed.
Yesterday I coded the flag of Marocco. This flag has one five star with a thick green line in the middle of it. With this fixed five star I can complete my exercise with sVB and your important help. 👍 With Small Basic it is not possible to draw an exact five star.
Regards ... Gregor
Your source code:
The output of your source code:
My added source code:
The output of my added source code:
Hello Mohammad,
I want to draw a five-pointed star with thick lines and I have the problem, that I cannot draw such a star with correct points at the ends. So I enclose two screenshots with turtle programming via sVB and via Python. You see the different ends of the lines. Is it possible to draw a five-pointed star with correct points?
Regards ... Gregor
sVB:
Python: