jump to navigation

DPS909 – week 4 – Initial Project Plan September 27, 2009

Posted by Andor Salga in Open Source, Processing.js.

This blog post marks the official start of my work on the Processing.js project.

What Is Processing.js?

Before getting into the details of Processing.js, Processing must first be discussed. Processing is a Java-like language developed by Ben Fry and Casey Reas to allow designers and animators to quickly and easily learn scripting and render animations. The project also encompass an environment, specifically the PDE, the Processing Development Environment. The PDE is simple and very easy to use. It offers only necessary features and makes development relatively painless. The combination of the simple language and environment create a perfect gateway for introduction to programming. Some high schools and universities are actually using the language to teach introductory programming. Processing has been used in commercial applications and is currently supported by volunteers.

As the Web matured, it became evident to John Resig that JavaScript was the language of the Web, not Java. Java will always remain a plug-in, but JavaScript will be part of the browser. Seeing the potential of Processing, Resig decided to bring that functionality to the Web without the need for a plug-in such as Java. Indeed, Processing.js is targeted to users who don’t want their animations to be dependent on plug-ins such as Java, Flash and what’s that other one? Silver-something? Silverware?.

With all the elements in place (HTML5, the canvas tag, and JavaScript) Resig decided to port the Processing language to where he felt it belongs. The language itself was not changed, but a new JavaScript library was developed to parse and render processing code.

One of the most powerful aspects of Processing.js is that it runs on all leading browsers including FireFox, Opera, Safari and even IE (with the help of ExplorerCanvas). That’s quite significant seeing how any one of these can be written quickly and rendered on a friend’s system without concern about browser compatibility or absent plug-ins. That, is really cool.

Where We Come In

As it stands, many of the 2D functionality Processing offers has been emulated with Processing.js. Albeit, there are still some empty functions which need implementation as well as missing 3D functionality which needs to be completed. This is where we come in. We have been given the opportunity to work with the library to add/fix/modify existing Processing.js code.

I decided to join this project because I have a strong interest in rendering and graphics. I have some experience with rendering on the Web from working on C3DL and hope some of what I learned can be integrated into this project. Conversely, I hope what I learn from working on Processing.js can later be incorporated back into C3DL.

Since this project has eight students, staying connected, collaborating and keeping everything organized is that much more important. We will stay connected via IRC on the #seneca and #processing.js channels. We will collaborate and stay organized using our blogs as well as Processing.js project page on Zenit and the project task list on MDC. If face to face meetings are required, we will book the CDOT T1042 meeting room.

How Will I Slay This Dragon?

With duct tape. I’ll try to put the scant good programming practices aside and try the duct tape approach. Get it done. Get it out the door. Blog about the success.

Release 0.1

Dave suggested we each pick two tasks which require implementation and complete them for 0.1. He suggested one task should be simple just to get some practice and get our feet wet. I scanned the last few tasks and saw mag() among some math functions, I looked up the Processing reference pages and saw it’s a magnitude function which returns the length of a 2D or 3D vector. I figured I could handle that. Next I chose the ambientLight() funciton since that’s quite simple too. I soon realized it would be difficult to test that function since there is no means to even draw a 3D object! After talking to Dave, he told me I would have to add a couple of categories and complete those first. So, for 0.1, I have signed up to first port the existing C3DL code to use WebGL instead of the Canvas3D plug-in. Since it’s been a while since I have worked on the setup and initialization part of C3DL, doing this will refresh my memory. It will also give me a chance to jot down the steps required to get a 3D context ready for rendering.

Release 0.2 and Onward

I know my plans will drastically change, but here are my goals for the next few releases:

For 0.2, I plan to get some 3D objects rendered. Rendering a cube is more complex than rendering a point, but should be easy enough a task to liken my success. If successful, I will take on other important tasks such as getting the matrix stack working. I will accomplish this by making use of the C3DL code, referring to OpenGL books, bugging people on IRC, blogging about problems I encounter and reading the variety of blog posts online. Using the duct tape approach, I will know I’m successful when what I wrote is mostly working without crashing. Then I can post a blog about it and move on.

0.3 onward might include implementing lights. There are a three standard lights in the realm of 3D graphics. These are directional lights, point lights and spotlights. Each of these have components including diffuse, ambient and specular colors. Implementing this is almost a whole other project. I know this because it involved so much work when I implemented it in C3DL. Then again, I may be able to extract large portions of the code from C3DL. If I manage to reduce coding time because of this, I’ll adjust and try to take on more tasks.

There is something very exciting about working with technology which has zero published books. On one hand it’s frustrating because you must rely on blog posts and IRC which isn’t as reliable. On the other hand, it’s very exciting! I am very thankful I am able to work on this project as it truly is innovative and cutting edge technology. I love Seneca.

There is a whole lot of learning which will be required of me to accomplish my goals. Most of which will likely involve reading books, man pages, blogs, wikis and talking to IRC folk. I figure I will be spending my time on most on these pages :

Collaboration and Contribution

Because there are eight students writing blogs about Processing.js, it may catch the interest of someone who has some spare time who might be interested in helping. I think as long as we give credit to anyone helping us and

One requirement in this course is that we must collaborate with other students and help them with some task. Finding another student who needs help shouldn’t be a problem. I think we’ll all run into problems soon enough. In our last group meeting, we decided five of the eight of us will be working on 2D functions and the rest will work on 3D functions. So helping another student with 2D content will be a nice break from 3D when I get stuck on bug.

Possible Resistance

My main concerns I have going into this project is how I will manage to get everything completed on time. I will have to stay organized and diligent as I work on this project. I do have an affinity for the project, so just knowing I can work on it will be enough incentive to sit down and code. Albeit, with new technology, there are always bugs. I already got an e-mail a few days ago about problems with the canvas tag behaving incorrectly. I know I will run into bugs and I will do my best not to work in isolation. If I discover a problem or get lost on some task, I will write a blog post about it and hopefully my peers will be able to help me.

My largest fear is taking up this project and not being able to complete my allotted work or being late in my releases. The ORI/CDOT can be a quiet facility, especially at 3AM, so making use of the research area overnight will likely have to be done sometime during the semester. That’s a last case resort. Hopefully careful time management and planning will prevent such a need.

I already began working on 0.1 and should have something ready when the time comes!


1. F1LT3R - September 28, 2009

Slaying Dragons with Duct Tape, have not seen that before! Should be fun to watch😉 Nice background on the Processing language btw.

2. Green Screen « Andor Salga - September 30, 2009

[…] be discussing my current progress with the Processing.js project. My goals for the Processing.js project include completing some of the outstanding tasks which involve 3D […]

3. Andor Salga - October 15, 2009

[…] 15, 2009 Posted by asalga in open source. trackback The 0.1 deadline for my DPS909 class is coming up and I have to make sure all the functions I wrote are working. I […]

4. My Processing.js Project Plan « Andor Salga - January 13, 2010

[…] collaborating via IRC, blogs, wikis, Lighthouse as well as in person. I have already written a very brief description on Processing.js, so I won’t go into the details, this post mainly serves as an official start to the second […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: