Categories Another Processing sketch, fairly simple. This one does introduce a function (or subroutine) named ‘makeBox’ that we pass some values into.

You can also see where we used height/2 which is the proper way to center something on the screen, rather than taking the 600 we specified and just using 300 as the halfway point.

```/*
* 20110509.pde
*/

void setup() {
size(800, 600);
background(0);
stroke(255);
noFill();
}

void draw() {

for (int xVal = 5; xVal < (width - 20); xVal = xVal + 20) {
int myWidth = 10;
int myHeight = xVal/2;
int yVal = (height/2) - (myHeight/2);
int myColor = xVal/4;

makeBox(xVal, yVal, myWidth, myHeight, myColor);

}

}

void makeBox(int x, int y, int w, int h, int c) {
stroke(c);
rect(x, y, w, h);
}
```

(These sketches may not be all that impressive, but it’s giving me a chance to flex my programming muscles in Processing.)
{"ft_lang_label":"__label__en","ft_lang_prob":0.70897907,"math_prob":0.9912012,"size":843,"snap":"2022-27-2022-33","text_gpt3_token_len":250,"char_repetition_ratio":0.10846245,"word_repetition_ratio":0.0,"special_character_ratio":0.33451957,"punctuation_ratio":0.18644068,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9539907,"pos_list":[0,1,2],"im_url_duplicate_count":[null,4,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-07-06T01:01:55Z\",\"WARC-Record-ID\":\"<urn:uuid:f54a82be-3a67-453e-b55a-73ef471a2835>\",\"Content-Length\":\"48440\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:febd68ca-d1d8-4194-bf33-7cb7a6d74bf0>\",\"WARC-Concurrent-To\":\"<urn:uuid:5e853061-17cc-4381-a927-80339d419339>\",\"WARC-IP-Address\":\"69.55.228.16\",\"WARC-Target-URI\":\"http://rasterweb.net/raster/2011/05/09/processing-fader-boxes/\",\"WARC-Payload-Digest\":\"sha1:GQGV4HBHQB2P4THLXCU73N2ONX3LGPZJ\",\"WARC-Block-Digest\":\"sha1:KR6WRO7VFU3RRKWWQXOBAN7BALJJXHXG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656104655865.86_warc_CC-MAIN-20220705235755-20220706025755-00210.warc.gz\"}"}