DSDN 101

DSDN 112

DSDN 141

DSDN 142

DSDN 144

DSDN 171

Thursday 23 August 2012

DSDN 142: Project 2

Structure and Noise

Research

This was the first time I attempted loops within my code. What loops do is that they make it easier for you to draw more shapes with less lines. For example if I wanted to draw a square 100 times, most people that have just started using the program would draw a square 100 times. Loops are a more efficient way of doing that. If you use a loop you only have to draw one square, then by adding a loop to it that shape can be repeated as many times as you want. I have demonstrated this below on the first image.


With this one I experimented with putting more variables inside the loop. What I did was I drew a line, and added 'count' and 'space' to in it. This would mean that every time it drew another line on the page, the line would get bigger and the space between the line would get smaller. It resulted with a really cool effect.


The last one has a similar code to the previous one, but contains more variables within it and also has floats. But I added a 'random' variable within it so that the shapes could change positions as it flowed through the box. This also worked with adding the random and count together to change the colours in each rectangle as well.


No comments:

Post a Comment