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

#1 2010-12-24 08:42:17

HD123
Scratcher
Registered: 2009-12-05
Posts: 500+

Ellipse

I am currently working on a new version of my paint program: PaintPlus.  I can't quite figure out how to make a circle tool.  I have been trying to find out a little bit about ellipses, and I found the Cartesian Equation.

http://mathbin.net/equations/57075_0.png

Even though I found that equation, I still need a little help using that in PaintPlus.  Thanks in advance.

Last edited by HD123 (2010-12-24 08:42:47)


~~HD123~~
Treat others as you want to be treated. |  big_smile  | http://i.imgur.com/OaNrY.gif | http://blocks.scratchr.org/libstatus.php?user=HD123&online=http://lemonfanatic.webs.com/ONLINE.png&offline=http://lemonfanatic.webs.com/OFFLINE.png

Offline

 

#2 2010-12-24 08:49:46

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Ellipse

I worked on a featured paint program called DCrawer a few months ago. I worked on a second version that included circles (though I never published it.)

For circles I used a circle sprite with a size affected by the mouse pointer as this solved the stamping and clearing problem of constantly redrawing the circle as you move the mouse.

Ellipses however, if you wanted to use the same technique to show where the ellipse will be drawn, you'd have to use horizontal and vertical stretch blocks.

Scratch does not have these, so if you wanted this to be possible (believe me, the stretch block do a LOT of useful things in a paint program (such as a one costume line that stretches to follow your mouse pointer) You'd either have to open the Scratch browser and edit your copy of Scratch, making your own stretch blocks, or you can use Panther - a modification of Scratch which has those and a load of other blocks you can use for a paint editor (such as a [color of pixil x: y:] block that lets you create colour pickers) Which is what I did.

Best of luck to you  smile


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#3 2010-12-24 10:19:42

HD123
Scratcher
Registered: 2009-12-05
Posts: 500+

Re: Ellipse

sparks wrote:

I worked on a featured paint program called DCrawer a few months ago. I worked on a second version that included circles (though I never published it.)

For circles I used a circle sprite with a size affected by the mouse pointer as this solved the stamping and clearing problem of constantly redrawing the circle as you move the mouse.

Ellipses however, if you wanted to use the same technique to show where the ellipse will be drawn, you'd have to use horizontal and vertical stretch blocks.

Scratch does not have these, so if you wanted this to be possible (believe me, the stretch block do a LOT of useful things in a paint program (such as a one costume line that stretches to follow your mouse pointer) You'd either have to open the Scratch browser and edit your copy of Scratch, making your own stretch blocks, or you can use Panther - a modification of Scratch which has those and a load of other blocks you can use for a paint editor (such as a [color of pixil x: y:] block that lets you create colour pickers) Which is what I did.

Best of luck to you  smile

Erm.. that's not exactly what I meant.  I want to be able to do it without using stretch blocks.  It will probably be tricky, but I'm sure it's possible.  Does anybody know how to do it without using stretch blocks?


~~HD123~~
Treat others as you want to be treated. |  big_smile  | http://i.imgur.com/OaNrY.gif | http://blocks.scratchr.org/libstatus.php?user=HD123&online=http://lemonfanatic.webs.com/ONLINE.png&offline=http://lemonfanatic.webs.com/OFFLINE.png

Offline

 

#4 2010-12-24 10:35:35

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Ellipse

Oh I see... No. Try searching "orbit" or "ellipse" in the Scratch search bar as a project. If you find one, you can take it apart  smile

How do you plan to let the user see where their ellipse will be before they draw it?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#5 2010-12-24 10:45:27

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Offline

 

#6 2010-12-25 18:46:49

HD123
Scratcher
Registered: 2009-12-05
Posts: 500+

Re: Ellipse

http://scratch.mit.edu/projects/randalpik/615782, and http://scratch.mit.edu/projects/1tchy/87884 are the best results I found on the first page of the search.  I will go download them and see the scripts.  BTW, I will download yours too, TheSuccessor.  Thanks for helping TheSuccessor and sparks!


~~HD123~~
Treat others as you want to be treated. |  big_smile  | http://i.imgur.com/OaNrY.gif | http://blocks.scratchr.org/libstatus.php?user=HD123&online=http://lemonfanatic.webs.com/ONLINE.png&offline=http://lemonfanatic.webs.com/OFFLINE.png

Offline

 

#7 2010-12-26 05:49:22

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Ellipse

No problem! I didn't really do anything, but hey.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#8 2010-12-26 19:01:56

HD123
Scratcher
Registered: 2009-12-05
Posts: 500+

Re: Ellipse

Okay, I got it to work!  Anyone can use this as a reference if they want to.


~~HD123~~
Treat others as you want to be treated. |  big_smile  | http://i.imgur.com/OaNrY.gif | http://blocks.scratchr.org/libstatus.php?user=HD123&online=http://lemonfanatic.webs.com/ONLINE.png&offline=http://lemonfanatic.webs.com/OFFLINE.png

Offline

 

#9 2010-12-26 19:03:23

HD123
Scratcher
Registered: 2009-12-05
Posts: 500+

Re: Ellipse

A mod can close this topic now.


~~HD123~~
Treat others as you want to be treated. |  big_smile  | http://i.imgur.com/OaNrY.gif | http://blocks.scratchr.org/libstatus.php?user=HD123&online=http://lemonfanatic.webs.com/ONLINE.png&offline=http://lemonfanatic.webs.com/OFFLINE.png

Offline

 

#10 2010-12-27 14:30:07

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: Ellipse

Closed by request of topic owner ^^


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

Board footer