Lab 7: patterns | Creative Computing Skip to main content ANU Extension Creative Computing Open main menu Search this site Navigation menu ANU Extension Creative Computing People Labs Show labs submenu Hide labs submenu Labs Year 11 Year 11 Year 12 Year 12 Deliverables Show deliverables submenu Hide deliverables submenu Deliverables Year 11 Year 11 Year 12 Year 12 Resources Close main menu Search this site Search this site (powered by Google) Powered by Google Close search EXTN1019 / Year 11 Labs / Lab 7: patterns Lab 7: patterns create your own wallpaper or screensaver Skip table of contents On this page Outline Introduction Part 1: create your own pattern Part 2: variations Part 3: What to include in your blog post? Screenshots and/or screen recordings Discussions Summary Outline create your own geometric pattern exchange patterns with someone next to you create some variations of your classmate’s pattern Introduction Welcome back to another creative computing lab! Last week, we learned how to write code which repeats a set of instructions every frame (i.e. with each iteration of the draw() loop). To do this, we used a programming construct called a for-loop. This week, you will use for-loops to create a static or dynamic pattern. The pattern can be for whatever you like; some wallpaper, a kaleidoscope, fabric/clothing or a screen saver. To start, fork and clone the lab 7 template repo. Part 1: create your own pattern For this activity, you are going to create your own pattern using for-loops. You can either use one of the patterns you made last week as a starting point. If you want to start from scratch, have a look at some of the patterns on open processing. These patterns were all created using the Java library from which p5.js was derived; that library is called processing. Have a go at creating your own pattern and remember to ask your instructors if you have any questions. Your pattern can either be static or dynamic. Remember that a pattern is simply a sketch where certain visual elements are repeated. do: Once you’re satisfied with your pattern, make sure you commit and push your code to git before you move on to the next section of this lab. Part 2: variations In the second part of this lab, you will be swapping your code with one of your classmates. Your task for this activity is to use your classmate’s pattern as a starting point and create your own variation of their pattern by modifying their code. If you haven’t already, introduce yourself to someone next to you :) You will be working together for the rest of this lab. The first thing you’ll need to do is share your code with your classmate. You can send your classmate a direct message via Teams and either attach your sketch.js file in the message or copy-paste the code in your sketch.js file into your direct message. do: Send your classmate the code from your sketch.js file either by attaching the file in a direct message on Teams, or you can copy-paste the code into a direct message. Once you receive your classmate’s code, you can either drag and drop the sketch.js file into your template repo directory OR you can just paste their code into your sketch.js file. Once you’ve done this, calls over one of the instructors to make sure you can both access and modify each other’s code. do: Before you start making any changes of your own, commit and push to git. This commit and push should include your classmates code in its original state. Open your classmate’s code and run the live server. While the live server is running, try introducing some of your own changes to their code. If you’re not sure how it works, you can always ask your classmate. Alternatively, you can just start changing the code and observe what the effects are in your browser. do: Generate at least one variation to your classmate’s pattern. When you create a variation you like, 1) take a screenshot of the pattern so you can include it in your blog post and 2) commit and push your changes to git. Your commit message should include a number to indicate the version of the variation e.g. pattern-ver-1.jpg. talk: Before we finish up for the day, spend a few minutes sharing the changes you made with your classmate. Ask them what their approach was for generating changes to your pattern and share your own approach for generating changes to theirs. do: Add all your screenshots to the assets\ folder of your template repo and make one final commit and push to git. Part 3: What to include in your blog post? You will be discussing what you created in class in your blog post which is due at 11:59pm this Friday. A reminder that we are not assessing the “quality” of the sketches you present in the blog post. The blog posts are just a way for you to regularly sketch with code and reflect on your work. Screenshots and/or screen recordings We want to see the thing! Add at least one screenshot/screen recording of your original pattern. You should also include a screenshot/screen recording of each variation you made to your classmate’s pattern. Discussions We want to read the thing! Write a short paragraph which covers the following discussion points: Discuss the approach you took to implement your original pattern? Discuss the approach you took to produce each of the variations you made to your classmate’s pattern? What sorts of variations did you find the most interesting? Of all the changes you made to your classmate’s code, which changes were the most effective at generating interesting changes? Summary Congratulations! In this lab you: created your own geometric pattern created some variations to your classmate’s pattern Labs-year-11 Lab 1: putting a circle on the internet Lab 2: interpretation Lab 3: take shape Lab 4: animation Lab 5: time will tell Lab 6: repetition > Lab 7: patterns Back to top Acknowledgement of Country The Australian National University acknowledges, celebrates and pays our respects to the Ngunnawal and Ngambri people of the Canberra region and to all First Nations Australians on whose traditional lands we meet and work, and whose cultures are among the oldest continuing cultures in human history. Twitter Facebook Instagram Youtube LinkedIn WeChat Contact ANU Copyright Disclaimer Privacy Freedom of Information The Australian National University, Canberra CRICOS Provider : 00120C ABN : 52 234 063 906 Updated: 08 Jun 2022 | Responsible Officer: School of Computing Director | Page Contact: Ben Swift | Licence: Creative Commons Licence BY-NC-SA 4.0 bars search caret-down plus minus arrow-right times arrow-up creative-commons creative-commons-by creative-commons-nc creative-commons-sa