This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-08-13 14:27:35

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Circle Tool

Is it possible to create a circle tool in a paint editor?

Current version: http://scratch.mit.edu/projects/LightStreak/2728094


http://i47.tinypic.com/2iaa73k.png

Offline

 

#2 2012-08-13 14:32:06

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Circle Tool

I'm not 100% sure, but I think that it is possible, though you would need to know geometery and you wouldn't be able to preview the circle.


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2012-08-13 14:54:51

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Circle Tool

Bah humbug. I was afraid that somebody might ask. It is possible, but as ErnieParke pointed out, you won't be able to preview it as you can create 1 preview but then cannot clear it as this will destroy the rest.

Usually art is single-rendered, meaning that the pen marks are made and left alone. The only way you can also have this feature is dynamic-rendered (a.k.a multi-rendered or polyrender). This is when pen mark data is stored in a list, and constantly redrawn in single-frame. This allows for single objects to be selected, removed, or modified; it's the SVG of the Scratch world. One script renders the list repeatedly, while another modifies it's contents. With this method, updating previews and other features like that are easy. If you would like an example, just ask.  smile


http://i50.tinypic.com/312u714.jpg

Offline

 

#4 2012-08-13 15:02:05

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: Circle Tool

I get it.  But, no thanks.  Can I have a single-render script?


http://i47.tinypic.com/2iaa73k.png

Offline

 

#5 2012-08-13 15:12:57

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Circle Tool

Here:

pen up
set [ox v] to (mouse x)
set [oy v] to (mouse y)
wait until <not <mouse down?>>
set [nx v] to ((mouse x) - (ox))
set [ny v] to ((mouse y) - (ox))
repeat until <(nx) < (0.1)>
 pen up
 set [step v] to [0]
 go to x: (ox) y: (oy)
 pen down
 repeat (4)
  go to x: (([sin v] of (step)) * (nx)) y: (([cos v] of (step)) * (ny))
  change [step v] by (1)
  ^^ repeat the above 2 blocks 90 times ^^
 end
 change [ox v] by (-0.1)
 change [oy v] by (-0.1)
end
Note: It's not instant.
Note 2: You might need to modify it for it to work.


http://i50.tinypic.com/312u714.jpg

Offline

 

#6 2012-08-13 15:52:19

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: Circle Tool

How does it work?


http://i47.tinypic.com/2iaa73k.png

Offline

 

#7 2012-08-13 15:59:22

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Circle Tool

berberberber wrote:

How does it work?

It draws an ellipse.

nx is the x-axis of the ellipse, ny is the y-axis of the ellipse. (ox, oy) is the center.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#8 2012-08-13 16:04:24

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: Circle Tool


http://i47.tinypic.com/2iaa73k.png

Offline

 

#9 2012-08-13 16:05:32

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Circle Tool

ill make you a circle tool


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#10 2012-08-13 16:10:54

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Circle Tool

Here.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

Board footer