Posted by: dhodgin | February 8, 2010

0.6 The plan to implement PImage into processing.js

Now that 0.5 is pushed up and under review I’ve turned to re-planning my 0.6 release to include PImage.

Originally blocked because of plans to implement asynchronous image loading I brought up the fact that PImage was about 75% completed and there was a large chunk of code that was being held back by it being blocked by the async idea.  So I’ve been tasked with the responsibility of bringing PImage back into the code along with all its methods.

The great thing about PImage code is it has methods for copy, blend, filter, mask, get, set, loadpixel, updatepixel.  All of which are methods for the language as well and some of which are already implemented in a basic or completed form.

Hopefully since I have already worked on PImage code a while back I should be able to relatively quickly (read 2-3 days of work) be able to get it in and start testing it.

The wrench in the works

Apparently PGraphics is something that is currently holding back 3D development past 0.6 so it’s been mentioned that PGraphics should be implemented first before PImage.  Although I am not sure why as in the java code a PGraphics object extends a PImage object so I’m not sure why a PImage wouldn’t come first singe a PGraphics inherits variables from PImage.

The goal is to find out this Thursday on the conference call.

More to come

Posted by: dhodgin | February 6, 2010

0.5 processing.js release contribution

Sat in on this weeks processing.js status call and got a few things sorted out on where to go with the rest of my stuff for release 0.5 and made some plans for 0.6 which was good.

After the status call Anna was nice enough to teach me how to really use Github and how to manage branches, commit new code, and checkout.  It was a HUGE help and as a result I’ve gotten my code fixes for 0.5 up on Github and ready for review.

A quick summary of my 0.5 work.

  1. Rewrote hex() to support all the required functionality.
  2. cleaned up helper functions relating to hex that were no longer needed and exposed to processing code
  3. Rewrote trim() and added recursive support for arrays of strings. or arrays of arrays of strings, etc, etc.
  4. reviewed Andor’s sort(), and binary() functions
  5. Wrote tests for hex(), and trim()
  6. and cleaned up some library code variables that were reserved words, and some duplicate function definitions

I’m preparing to add PImage for 0.6 and its going to be a MASSIVE undertaking. It may span 2 releases to get it all in with proper tests.

Posted by: dhodgin | January 25, 2010

0.4 and triage for processing.js

Well some significant work has been underway over the past week on processing.js by the community.  The goal for release 0.4 was to triage all the patches waiting to go in and check them over for missing implementation, demos, and formatting issues.

I’ve been reviewing a bunch of functions myself and passing most of them up for super-review.  A few didn’t make the cut and have been reassigned to be reworked or recoded for future releases, some got blocked by dependencies, but most of the work I’ve looked at has been good to go.

And then the flu hit me.  I’ve been off my computer for 2 days now basically sleeping non stop fighting off the flu I picked up from my niece.  She’s the cutest little plague monkey ever.  She managed to infect 3 of us with it.  I’m 90% back to myself now though and trying to catch up on 3-4 projects I had planned to finish over the weekend.

Lots of new stuff has been checked in over the last few days. More will come by 0.5 release

Posted by: dhodgin | January 15, 2010

Processing.js 0.4-1.0 project plan

I’m back from a well earned vacation over Christmas break and I’m ready to dig in to the 6th semester workload.

As for DPS911 I’ll be continuing my work with the processing.js team and community towards having a 1.0 quality release version for the end of April.

That will involve a new ‘0.’ release every 2 weeks starting with 0.4 next Friday

Here is a rough starting point for what I personally have planned for my release schedules.

  • 0.4 – Peer review others 0.2-0.3 code which is not checked in yet and polish up any tests I’m missing from my 0.3 work
  • 0.5 – Code the Filter() function
  • 0.6 – Code the long datatype
  • 0.7-1.0 – XMLElement type.  Including the 8 methods that belong to the type.  Approx 2 methods per release.

This is just a rough plan for now until I can investigate the work level required and more may be added for 0.7-1.0 depending on the amount of work or complexity of the XMLElement object. I also suspect the long datatype will either be extremely simple or extremely complex so more content may go into 0.6 or some extra triage or review help might come into play for that release.

Posted by: dhodgin | December 15, 2009

My Great White vs Killer Whale 0.3 patch

After a few snags with how to solve a few issues between Java and JavaScript I am ready to put my 0.3 patch into review-requested mode.  Here is a quick summary of what I’ve added for this patch release.

  1. copy()
  2. blend()
  3. blit_resize() helper function for blend and copy
  4. intersect() helper function for blend
  5. filter_new_scanline() helper function for blend
  6. filter_bilinear() helper function for blend
  7. blendColor()
  8. rgbaToInt(), mix(), peg() helper functions for blendColor
  9. blendColor() blending modes : replace, blend, add, subtract, lightest, darkest, difference, exclusion, multiply, screen, hard_light, soft_light, overlay, dodge, burn.
  10. screen()

A test for blendColor() is up right now but I can’t test blend and copy until I get PImage code from Anna.

The code is currently posted to my wiki until PImage gets pushed into the library.  Then I can test some of the code that I cant right now.

Be back in January for 0.4-1.0 next semester !

Posted by: dhodgin | December 6, 2009

0.3 complications… and one HUGE patch for Al

I’m working away on finishing up the rest of my 0.3 release this week and heres where things stand.

I’ve got screen, and blendColor() finished and tested.  blendColor required writing a huge block of code for support for each of the 15 different blending modes and then a big test of different combinations of blending which I ran in the native processing app and then again in pjs to compare colors.

The test is here and you can use a browser plugin like colorzilla for firefox to sample the color boxes and see that everyone is exactly identical except the yellow block near the bottom right its off by 1 in the green channel which is allowable due to float rounding.

Where I’m at now is about half way through blend() implementation and I’ve realized just how much work I’ve got to do to get this working now.  Blend also requires another 15 implementations of the different modes coupled with that both bilinear filtering and nearest neighbour modes are used which means 30 functions and each of those functions makes calls to my other 15 modes to color blend the pixels.  On top of all that there is another 2-3 helper functions for filtering that need to be ported as well. The original processing JAVA PImage code is here that I’m basing the code off of to get through this.

All in all im looking at about 1000 lines of code to add for my 0.3 and thats without adding filter() … which has another 8 modes for filtering which is 8 additional functions that need to be ported as well.

End result ? I’m bumping filter() to 0.4 due to time constraints and the huge amount of work I didn’t account for when sceduling my initial 0.3 workload.

Posted by: dhodgin | December 1, 2009

Towards 0.3

0.3 is about half way here now and I thought i’d throw up a post about what i’ll be working on and whats currently going on with the project.

Im going to be implementing blendColor(), blend(), copy, and filter().  I’m a little bit blocked at the moment but its semantics I have to sort out with F1LT3R but for now I’ve decided to put it aside while I get a few other projects done for my other classes first so I can dedicate all my time to processing and focus on quality work.

More to come in the next few days

our 0.1 is finally closed too so a new release may come soon.

Posted by: dhodgin | November 22, 2009

‘SixthSense’ technology could change everything

Cellphone in your hand ... literally

If you’ve never heard of TED its a small non profit organization devoted to hosting short 18 minute talks on some of the most intellectual, ground breaking, and informative ideas going.  TED stands for the three worlds it brings together: Technology, Entertainment, and Design.

I downloaded the TED app for my iPhone a month ago or so to watch some of these presentations on the bus on the way in to school or listen to the audio presentations while at work because I find some of them totally fascinating.

One of the most recent presentations I saw was for a device called the ‘SixthSense‘ gesture interface device.

Its being developed by MIT media lab by Pranav Mistry.

The idea behind this technology is to be able to interact with physical objects around us in the digital world.

  • Imagine being able to just make a gesture with your hands to take a picture and then walk up to any surface and display your pictures on it and manipulate them.
  • Imagine being able to take a piece of paper and pinch a paragraph of text and then drop it onto your computer screen and have it appear.
  • Imagine being able to dial a phone number from a keypad on your hand.
  • Imagine being able to pickup the newspaper and see a photograph turn into full motion video related to the news story.

Video on the newspaper

Now imagine if that technology was open sourced to the world to grow and develop.  At the end of the presentation Mistry mentions that the technology will be open sourced and as soon as next month possibly.

This could easily be the next big thing in how we harness the power of information.

Its hard to explain it in words because I’ve never seen anything else like it.

Check out the video of the demo and I promise you won’t be disappointed.

After you watch the video check out their website and read more about it.

What an excellent idea for an FSOSS presentation in the future.

I’m going to be honest. I … hate … git.

Figuring out how to use git to push my changes up for 0.2 took longer than it did to write all my 0.2 code and all the tests and demos that went along with each function (over 1000 lines of code for all the tests and demos).

So to make sure I never have to go through this hell on earth again I’m writing a post to remind myself how to do it later and to help out anyone else who has trouble with git.

This is a ‘git for dummies’ tutorial strictly laid out for the people working on processing.js and the commands are all tailored to what we have to do from start to finish.  From cloning the repo locally to making changes, committing, checking status, and then pushing the changes to your fork.

This will include only the bare essentials to just do it and avoid any of the other crap you just don’t need to know and that will confuse you (and me later when I reread this to do my next releases). A more detailed tutorial for the basics is here.

This tutorial assumes you already have git installed and configured to connect properly.  If you do not have that then read an excellent post by Anna from my DPS909 course on how to setup git for the processing project here.

Steps:

  1. Create a fork of the latest code.
  2. Clone the repository to copy the latest code to your computer. OR pull the latest updates if you have already cloned before.
  3. Make the changes to the code with your new content.
  4. Mark your changed files by committing them and add a comment about the changes you made.
  5. Push your new code up to your fork.
  6. Request a pull of your new code from F1LT3R.

That’s it.  Here are the details

1. Create a fork of the latest code. If you already have an old fork and need to delete it just click the edit button and all the way at the bottom you’ll see a delete option.  git wouldn’t let me have 2 forks going at the same time. Or its a bug that when you click fork on the newest code it doesn’t let you and takes you to your old fork I don’t really know why or care anymore at this point.

From the picture below go to this address and select the fork button.  Give it about 20 seconds and refresh the page and it will be your new fork.

fork the master code base

2. Clone the repository to copy the latest code to your computer. OR pull the latest updates if you have already cloned before. I did a fresh clone in a new directory to make it simple.

clone repository

3. Make the changes to the code with your new content. Change whatever you need to in the code.

4. Mark your changed files by committing them and add a comment about the changes you made.  After making changes to your files you have to commit which files you want to prepare to be pushed up to the repository.

This picture explains the process well.

To commit use the command ‘git commit -a’ for all changed files. Or use ‘git commit <filename>’ for one specific file at a time.  Using commit only queues the file up  to be pushed soon it doesn’t send the file to the repository right away.  Add the attribute -m on the end of the command to specify a comment for the commit when it gets pushed to git hub later.

Look at this picture for how I did it

git commit processing.js -m 'comment'

5. Push your new code up to your fork. Now that your code is marked as committed and ready to be pushed you just have to push it.  First you can check the status of what is ready to be pushed with >git status.

git status

It says no changes added to commit but its wrong don’t worry about that the important part is it says ‘your branch is ahead of origin/master by 1 commit’.  Now your ready to push.

Type >git push git@github.com:<username>/processing-js.git

Assuming your fork is called processing-js.git just substitute <username> for your username.  Just check your fork location in the repository for what to put here.  It’s not jeresig/processing-js.git.

git push

6. Request a pull of your new code from F1LT3R. Go to your fork on the website and click the ‘pull request’ button. From the popup select F1LT3R from the list of people and click ‘Send pull request’ at the bottom.

request a pull

You can check if everything worked ok by looking at the network graph.

check if it worked

Hopefully it worked for you.  If it didn’t … then may your god have mercy on your soul.

Posted by: dhodgin | November 19, 2009

Processing.js 0.2 release

My 0.2 release has been pushed to git hub for review by F1LT3R  !

After 2-3 days of trying to figure out git I finally managed to get everything right and push up my changes.  Thanks to Matthew Lam for showing me how to delete my old fork it was giving me issues.  Once I did that I was able to refork the latest code and then clone, commit, and push the new stuff up.

In the process of banging my head against the wall to get git working I stuck all the commands into a word file so I would remember how to do it later for future releases.  I’m going to post a 2nd blog post after this tonight with a step by step guide to go from having nothing on your PC to downloading, updating, and sending changes up for review.

A full guide to the whole process.

Here’s a quick list of what I added in my 0.2 release.  Full details of the patch are here

Added:

  • nfc()
  • log()
  • exp()
  • tan()
  • asin()
  • acos()
  • atan()

I coded the map() function as well and then realized later it was already in the library but it was never erased from the list of remaining functions to be coded.  My code matched up with what was already in the library exactly though so I knew what I did was correct and that what was already there was correct.  I wrote a good test for map() so I’m confident what is already in the library is ok.

Fixed:

  • nf() crashing with infinite loop
  • color() for 1 argument passed in that has a value outside 0-255 it will be interpreted as a color and not a grayscale now

Older Posts »

Categories