Skip to main content

Art Maker Pro

On Khan Academy, a while ago, I wrote a program that would allow users to draw a picture, and then the program would generate another program which they could copy and paste and save. The new program would animate the drawing of the same picture. The program was named "Art Maker".

Recently, I created a new version of my program. The original only allowed for black and white; the new version includes color, as well as a dialog box system which I designed. The program uses only my own code - I didn't borrow anybody else's (as far as I can remember).

To embed the program on my blog, I had to use Khan Academy's script; unfortunately, their script isn't working very well here, so the program is cut off at the edge. You can access the program itself here: https://www.khanacademy.org/cs/art-maker-pro/5733417664643072

I finished the program before Christmas so I could release it for everybody to use on that day... so Merry Christmas!

To use:
* Click Generate to generate a JavaScript with Processing program in the pop-up console. You can copy the program and paste it in the New Program window on Khan Academy.
* Click Undo to undo the last stroke. Click Edit to change the palette.
* Pick a color by clicking the palette.
* Hide the top bar by clicking in the upper-right corner of the canvas; show the bar by clicking in the
* upper-left corner.
* Draw by clicking and dragging. This intentionally does work when the Generate Code dialog window is open. White doubles as an eraser.
* To get past the opening screen, either wait or click somewhere on the canvas.

Keyboard shortcuts:
* Enter: Generate code
* Z: Undo
* E: Edit Palette


Art Maker Pro

Comments

Popular posts from this blog

Flipping Quarters

Here's an interesting puzzle involving chance: A man in a park asks you to play a game with him. It's a form of gambling. To play, you must pay the man $5, then flip a coin repeatedly until you get heads. As soon as you get heads, you stop flipping. If you only flipped the quarter once, he'll give you $1. If you flipped it twice, you get $2. Three times, $4. Four times, $8. Each extra flip gets you twice as much money, so the longer it takes before you get tails, the more money you get. Should you play, if you have a lot of time and the man will play as many games as you want? How much money, on average, would you gain (subtracting the $5 fee)? I will give the solution in a later post .

Pluto No Longer on the Horizon

This morning, New Horizons became the first spacecraft to make a flyby observation of the Pluto system. During the mission, the spacecraft captured the most detailed photographs of Pluto's surface we've ever had, and possibly ever will have. It also found many new properties including size, mass, atmosphere, and surface composition. In a period of a few hours, we discovered more about Pluto than we've found in the 85 years since Clyde Tombaugh captured its first photograph. Before After  (images credit: NASA) To complete this mission, the spacecraft flew for more than 9 years through the emptiness of space. This may sound like a long time, but it's actually amazingly quick. In fact, New Horizons set the record for the fastest speed at launch, and during the flyby, the spacecraft was moving at a rate of over 30,000 mph, or roughly 50 times the speed of sound. Picture an object twice as heavy as a grand piano moving 25 times faster than a bullet from a gun. Yikes. The man...

Should Tau Replace Pi?

The digits of π, organized in a very new way Happy π-day! And happy π-month! Today's month and day - that is, March 14 or 3.14 - includes the first 3 digits of π. And today's month and year - March 2014 or 3.14 - also includes the first 3 digits of π. We won't have another double-day for π for the next 100 years, so enjoy this one! For the special occasion, I'm posting two π-related posts - one for π-month, and the other for π-day. In both posts, I'm setting the font size to approximately π * π + π + π. This is the first post, for π-month; to see the second, go to http://greatmst.blogspot.com/2014/03/pi-month-pi-day-post-2-5-common-pi-myths.html . In this post, I am including an essay I wrote about whether π or τ is the more superior constant. This was written for people who know very little about math, so the basic idea should be easy to understand even for people who are not mathematically inclined. Should Tau Replace Pi? A constant is any number or value that ne...