Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how do i draw a circle with the pen
- levi-the-1
-
2 posts
how do i draw a circle with the pen
im trying to make a game for my math class and i want to make it about areas of circles and i dont know how to use the circle tool. i would love some help. i have until friday to submit it. and this is the last week of school for me. also i will be going to baltimore tomorrow after school.
- Spentine
-
1000+ posts
how do i draw a circle with the pen
You can use
set pen size to ()to set the diameter of a circle. To render the circle, you can use this:
pen downYou can set the color of a circle with
pen up
set pen color to [#000000]I hope this helps!
- levi-the-1
-
2 posts
how do i draw a circle with the pen
thanks for the help. You can useset pen size to ()to set the diameter of a circle. To render the circle, you can use this:pen downYou can set the color of a circle with
pen upset pen color to [#000000]I hope this helps!
but i am using variables for the radius and diameter so players can answer the question about the area.
- sCrAtCh_139508
-
100+ posts
how do i draw a circle with the pen
to make blank circle with an outline:
click the box that sais run without screen refresh
click the box that sais run without screen refresh
define render circle (diameter) (xpos) (ypos) (outline size)
set [a v] to [0]
set pen size to (outline size)
pen up
repeat (360)
change [a v] by (1)
go to x: ((([cos v] of (a)) * (diameter)) + (xpos)) y: ((([sin v] of (a)) * (diameter)) + (ypos))
pen down
end
pen up
set [diameter v] to (diameter)
set [radius v] to ((diameter :: variables) / (2))
set [pi v] to (3.1415926535897932384626433832795028841971) // make there as many digits as you like but people most likely just use 3.14
set [radius^2 v] to ((radius) * (radius))
set [area v] to ((pi) * (radius^2))
set [circumference v] to ((pi) * ((diameter :: variables) * (2)))
- Spentine
-
1000+ posts
how do i draw a circle with the pen
Then set the blocks' size to the diameter?thanks for the help. -snip-
but i am using variables for the radius and diameter so players can answer the question about the area.
What are you asking?
- Discussion Forums
- » Help with Scripts
-
» how do i draw a circle with the pen