FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   DBN to Proce55ing + Helping DBNers transition
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: DBN to Proce55ing + Helping DBNers transition  (Read 745 times)
Josh Nimoy

jtnimoy WWW Email
DBN to Proce55ing + Helping DBNers transition
« on: Oct 29th, 2002, 9:48am »

For those new to Proce55ing who are already comfortable with Design By Numbers, here is a translation table that juxtaposes elements of DBN with their Proce55ing counterparts.
 
http://stage.itp.nyu.edu/~jn429/p5/fromdbn.html
 
fry


WWW
Re: DBN to Proce55ing + Helping DBNers transition
« Reply #1 on: Oct 29th, 2002, 6:16pm »

thanks josh, this is useful..
 
one note.. 'set [x y]' is similar to setPixel, and getPixel works like [x y] used by itself (as a variable).
 
and for simpler converting of apps, the following:
 
void setup() {
  size(101, 101);
  colorMode(RGB, 101);
}
 
will get your the 100x100 square and 100 levels of gray that everyone is probably missing from dbn.  
 
(ok, it's not 100 levels or 100x100 exactly, because as mentioned in the book, it's 101 since it's 0 to 100 inclusive)
 
on another note.. i had written a dbn->java code converter into the dbn app but never exposed it, maybe i'll re-enable it to export p5 code instead of regular java.
 
thanks again.
« Last Edit: Oct 29th, 2002, 6:16pm by fry »  
REAS


WWW
Re: DBN to Proce55ing + Helping DBNers transition
« Reply #2 on: Oct 30th, 2002, 12:37pm »

yes, this is extremely useful. thank you.  
 
i agree that setPixel() and getPixel() are better for beginners.
 
we need to determine a way of exposing this type of information to people it would benefit...
 
Josh Nimoy

jtnimoy WWW Email
Re: DBN to Proce55ing + Helping DBNers transition
« Reply #3 on: Nov 16th, 2002, 3:41am »

ok, i added the getPixel and setPixel just now.
 
yes - i also agree that getPixel() and setPixel() are better for beginners. In creating this rosetta stone, I wanted to set it up so that people could do a 1-to-1 translation between those chunks of code without thinking too conceptually. This is also why I'm doing the strange boolean thing with 'key' -- hopefully the links to those sections will direct them towards using p5 in a p5 way and not a dbn way.
 
-j
 
Pages: 1 

« Previous topic | Next topic »