Sunday, August 23, 2009

Quadratic Factoring with Processing

Inspired by Sam J. Shah’s post entitled Factoring, Schmactoring, I created this applet using Processing to explore factorization of quadratics of the form y=x2+bx+c, where b and c are integers. In the picture below, yellow means factorable in rationals, blue means factorable into reals, and green are factorable in complex numbers. Columns represent b and rows represent c in the quadratic.


Downloading and installing Processing was quick and easy. But it was about 2 hours of going through the various examples on their website before I realized the code samples and examples were included with the software that I downloaded. I played with one of their samples Primitive 3D to get a feel for how to create and manipulate basic objects. After I created a grid I played with having the camera rotate and zoom in, but after about 2 hours of experimentation I didn’t feel like I was getting closer to anything that might be visually compelling and useful for the classroom. I ended up using orthographic projection view just to fit the entire grid.

The final product is a little disappointing, especially after seeing what other people are able to create with it on YouTube and Vimeo. But for a Processing newbie who hasn’t touched java in ages, to be able to use the examples and sample code to come up with the above, I give Processing a lot of credit. I will probably play more with it during winter break.

UPDATE: Removed the applet and replaced it with image. Click on the image to go to the processing applet.
UPDATE 2: You can try the presets or just play with Quadratic Grid, which has similar visualization of the original Processing applet but done with javascript and has more options.
UPDATE 3: Reposted here. Added new screenshot and did some editing.

No comments:

Post a Comment