Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do I draw a circle using scripts?
- HeroBrineNZK
-
82 posts
How do I draw a circle using scripts?



Hi everyone, can you please tell me how to draw a circle using blocks?
Thnx



- drmcw
-
1000+ posts
How do I draw a circle using scripts?
Easiest way is
when flag clicked
go to x: (0) y: (100)
point in direction [90 v]
clear
pen down
repeat (360)
move (1) steps
turn cw (1) degrees
end
pen up
- HeroBrineNZK
-
82 posts
How do I draw a circle using scripts?
Ok, thanks
Colorful!
Colorful!
when flag clicked
go to x: (0) y: (0)
point in direction [90 v]
clear
repeat (360)
move (1) steps
turn cw (1) degrees
change pen color by (1)
pen down
end
pen up
Last edited by HeroBrineNZK (Sept. 20, 2013 06:31:17)
- -appletree-
-
43 posts
How do I draw a circle using scripts?
when green flag clicked
forever
turn ccw (15) degrees
move (10) steps
end
- -appletree-
-
43 posts
How do I draw a circle using scripts?
when green flag clicked
forever
turn ccw (15) degrees
move (10) steps
end
pen down
oh do pen down!
- Cyoce
-
500+ posts
How do I draw a circle using scripts?
define draw circle with radius (r) at x: (x) y: (y)
set [i v] to [0]
pen up
go to x: (x) y: ((y)+(r))
pen down
repeat (360)
go to x: ((x)+((r)*([sin v] of (i)))) y: ((y)+((r)*([cos v] of (i))))
change [i v] by (1)
Last edited by Cyoce (Jan. 3, 2015 21:49:46)
- hppavilion
-
100+ posts
How do I draw a circle using scripts?
And if he wants an ellipse he should use:define draw circle with radius (r) at x: (x) y: (y)
set [i v] to [0]
pen up
go to x: (x) y: ((y)+(r))
pen down
repeat (360)
go to x: ((x)+((r)*([sin v] of (i)))) y: ((y)+((r)*([cos v] of (i))))
change [i v] by (1)
define draw ellipse with radii (r1),(r2) at x: (x) y: (y)
set [i v] to [0]
pen up
go to x: (x) y: ((y)+(r))
pen down
repeat (360)
go to x: ((x)+((r1)*([sin v] of (i)))) y: ((y)+((r2)*([cos v] of (i))))
change [i v] by (1)
Last edited by hppavilion (Jan. 4, 2015 01:47:30)
- Harakou
-
1000+ posts
How do I draw a circle using scripts?
This thread is over a year old and it looks like the question has already been answered. Please don't bump up old threads.when green flag clicked
forever
turn ccw (15) degrees
move (10) steps
end
- Discussion Forums
- » Help with Scripts
-
» How do I draw a circle using scripts?