For this project, we started out by creating new drawing styles: broken and dash. After that, we made some images demonstrating our new drawing styles. After that, we were to change our indoor scene to look like it was drawn by hand using our newly created drawing styles. Finally, we were to make our own l-system.
To solve the tasks, I first started making the broken line style. To make the broken style, we first had to find the midpoint of the two endpoints of the line. After doing that I drew the first line from the jittered start point to the jittered midpoint. Then, I drew another line from another place at the jittered midpoint to a jittered version of the endpoint. After that, I made a file called taskA.py which drew three copies of a shape that I had already created. When that was done, it looked like this:
After taskA, I started to create a dash style line. To do that, I first added a field to the interpreter._init_ method called dashLength. I also created a setDash method to the interpreter class and a setDash method with another dashLength field to the shape class. To make the dashed line, I had to use the distance formula and then check if each dash would go over the final distance and scale them according to dashLength. To show that, I made a file taskB.py which ended up looking like this:
After that was done, I moved on to edit my indoor scene to look more non photo realistic. To do that, I simply used the setStyle method I had written for the shape class to change the style to jittered and broken. Once that was done, it looked like this:
Finally, I started to write my own l-system using sysTree1 from the lab. To edit it, I turned it into a stochastic l-system to give it more options helping the tree look more asymmetrical. I edited the rules so that sometimes the branches would be shorter and sometimes they would be longer. When that was done, it ended up looking like this:
When looking at extensions, I tried to use command line arguments to edit taskA but for some reason could not get them to work. The code that is being submitted is my attempt at making it work, but is not code that was fully functional. The fully functional code had basic strings in the setStyle method.
From doing this project, I learned how changing a very little bit of code can make a big difference on how pictures look. I also learned more about parametrized and multiple rule l-systems. Overall, I learned more about how all of these files come together to change a lot about images and how small changes can make images that look like they could have been drawn by hand.