Programming

All pictures are drawn using code

All codes are drawn by turning the turtle and making them advance a certain amount of steps. All codes are pretty simple, its all about finding the right angles to turn and how many steps to advance, click the images to see the code!
Spiral

Flower

Color ball

Triral

Name Credits of Triral: James Bamford



In addition to netlgo we also used python to create images and games. Below are some of the images made using code. Click the image to see the code!

Coding in python is pretty simple. You just need to think like a computer. A computer will follow every instruction to the letter. It won't think for itself. You need to be very careful with what you type. Often when you first write a program you will get an error, about 90% of the time. Don't be discouraged keep going, normally it is something very small like a misspelled word or a missing colon. Sometimes you just need to add quotes. Overall python is a simple language where the basics can be mastered easily. From there you can go pretty much anywhere using this language






We made to different number games, one where the computer guessed your number, and one where you guessed the computers number. The first one was much harder, due to the fact that more user input was required.





Processing

The next program we used for programming was called processing. It is a simplified version of java and you were able to run many interesting programs. The first thing we made with processing was a smiley face. It was quite simple, all we had to do was type ellipse(255,255,100,100). This was the code to make a circle for the head. The first two number are x and y coordinates and the second two numbers coordinate to the height and width of the circle. The face is a bunch of circles and lines, so it was easy once we understood how to make one shape. Once we had made the face, we animated it, making it fly around the screen. However it would leave a trail of faces. To fix this we had to constantly reset the background. That was the main challenge over with. What we did from there was mess around with color changing based on x and y coordinates. Here is a picture of the face I made.

Here is a picture of the multi color faces. Try and find the end of the train.

Click the picture to find the answer

Home