I've had the Processing book for about a week now. It arrived in the bookshop sooner than expected. I've been playing with 2D arrays and some basic code is shown below. This just draws a "gradient" type of effect as output:
/*
My First Experiment with 2D Arrays
Mark Moran
19-11-08
*/
float[][] myArray;
myArray = new float[200][200];
size(200, 200);
background(0);
for(int i=0; i<200; i++) {
for(int j=0; j<200; j++) {
myArray[i][j] = i;
}
}
for(int i=0; i<200; i++) {
for(int j=0; j<200; j++) {
stroke(myArray[i][j]);
point(i, j);
}
}
The stuff in the book about loading an image from a file and manipulating it appeals to me in particular. I feel a jigsaw type of application coming on! This would probably be more suitable for the main program, i.e. not the one which is given as a primary example to the student. For the latter, something more simple should suffice...
Tuesday, December 9, 2008
Wednesday, November 19, 2008
Processing book
I've ordered the Processing book from Hodges & Figgis. Waterstones here in Dublin didn't seem to even stock it! It will take about three weeks to arrive as it is an American import.
Having said that I notice that Chunk 39 has no reference to the book so this leaves me free to do some writing anyway and I notice there are examples of 2D arrays in the Processing software itself.
Still not sure exactly what kind of stimulating graphical code I'm going to produce but it will be interesting to see if I can produce 3D effects from a 2D plane. Looking forward to this!
Having said that I notice that Chunk 39 has no reference to the book so this leaves me free to do some writing anyway and I notice there are examples of 2D arrays in the Processing software itself.
Still not sure exactly what kind of stimulating graphical code I'm going to produce but it will be interesting to see if I can produce 3D effects from a 2D plane. Looking forward to this!
Friday, November 14, 2008
Chosen chunk
I've chosen chunk 39 as multi-dimensional arrays are something that have always interested me due to their various uses. I'm waiting to see if I was the first to request this! I hope so :)
My thoughts based on the chunk description are that each referenced element in the 2D array could represent part of an image (or a pixel) and an interesting graphics program(s) could be developed to create some form of pattern...
I've also downloaded and installed Processing and am finding the examples quite interesting. The syntax looks easy enough and gives me hope that this project could be quite enjoyable!
My thoughts based on the chunk description are that each referenced element in the 2D array could represent part of an image (or a pixel) and an interesting graphics program(s) could be developed to create some form of pattern...
I've also downloaded and installed Processing and am finding the examples quite interesting. The syntax looks easy enough and gives me hope that this project could be quite enjoyable!
Thursday, November 13, 2008
Making a Start!
Well, here's my first blog entry for the OU Mass Writing project!
I'm off to seek out the Greenberg book in Waterstones this weekend (Saturday) so I hope to really get moving by next week.
I'm off to look at the Chunks now and try to come to a decision as soon as possible...
I'm off to seek out the Greenberg book in Waterstones this weekend (Saturday) so I hope to really get moving by next week.
I'm off to look at the Chunks now and try to come to a decision as soon as possible...
Subscribe to:
Posts (Atom)