From a5cde8583de6c89b44857cb2cbab59c39ac438be Mon Sep 17 00:00:00 2001 From: Henry Walker Date: Sun, 26 Mar 2017 21:41:22 -0400 Subject: [PATCH 1/4] racket file containing my exploration explored the turtle graphics library --- turt.rkt | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 turt.rkt diff --git a/turt.rkt b/turt.rkt new file mode 100644 index 0000000..a5c751a --- /dev/null +++ b/turt.rkt @@ -0,0 +1,75 @@ +#lang racket + (require teachpacks/racket-turtle) + +(define square1 + (list + ;;(turn-right 90) + ;; (forward 100) + (turn-left 90) + (forward 100) + (turn-left 90) + (forward 100) + (turn-left 90) + (forward 100) + (turn-left 90) + (forward 100) + )) + +(define (square2 s) + (list (forward s) + (turn-left 90) + (forward s) + (turn-left 90) + (forward s) + (turn-left 90) + (forward s) + )) + + (define coordinate-square + (list (set-origin) + (pen-up) + (go-to -5 25) + (pen-down) + (go-to -5 125) + (go-to -105 125) + (go-to -105 25) + (go-to -5 25))) + + (define move-down + (list (pen-up) + (forward -30) + (pen-down) + )) + +(define move-up + (list (pen-up) + (forward 130) + (pen-down))) + +(define move-left + (list (pen-up) + (turn-left 90) + (forward 230) + (pen-down))) + +(define move-right + (list (pen-up) + (turn-left 90) + (forward -30) + (pen-down))) + + +(define square-list + (list + (set-bg-grid 130 130 "red") + square1 + move-up + square1 + move-left + square1 + move-left + square1 + )) + +(draw square-list) + ;;(draw (list (set-bg-grid 130 130 "red") coordinate-square)) \ No newline at end of file From f45f88fa49a4739af07a2dfc1743267d32ef50a8 Mon Sep 17 00:00:00 2001 From: Henry Walker Date: Sun, 26 Mar 2017 21:42:49 -0400 Subject: [PATCH 2/4] output from exploration --- turtleboard.png | Bin 0 -> 2817 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 turtleboard.png diff --git a/turtleboard.png b/turtleboard.png new file mode 100644 index 0000000000000000000000000000000000000000..04c927c1b62907c7ad442c191cc70e0da2da90c8 GIT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edb7f72af05db Mon Sep 17 00:00:00 2001 From: Henry Walker Date: Sun, 26 Mar 2017 22:11:00 -0400 Subject: [PATCH 3/4] updated readme --- README.md | 54 ++++++++++++++++++------------------------------------ 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index dbc599b..0403df3 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,26 @@ -# FP3: Final Project Assignment 3: Exploration 2 -Due Sunday, March 26, 2017 +## Turtle Graphics +My name: Henry Walker -This assignment is the same as [FP1], except definitely choose a library that you expect to use for your full project. +I explored the turtle graphics library. Since my partner and I will likely be making a 2048 type game, I figured I should check out a graphics library to guide our game. I basically set up the inital game board and created some squares inside the board +This was done mostly through using turn and forward to make the blue squares and a function from the library to make the board. Managing the actual turtle was alot harder than I was expecting. The window refreshes very fast so its quite difficult to keep track of the turtles direction and current position. I am currently unsure of whether I will use this specific graphics library due to this problem. However, there might be a way to manage the refresh speed and I can continue experimenting with creating squares from a fixed point, which would make my move functions much more consistent. -You will be in your team before you complete this assignment. You and your teammate(s) must coordinate to (1) both choose libraries relevant to your project, and (2) each choose a different library. +``` + (define coordinate-square + (list (set-origin) + (pen-up) + (go-to -5 25) + (pen-down) + (go-to -5 125) + (go-to -105 125) + (go-to -105 25) + (go-to -5 25))) +``` -The report template is below, beginning with "Library Name Here." +This is my favorite peice of code, it took me a really long time to get the specific coords to make the center square +I liked this type of square alot cause theoretically I could just make a function to transform the points, but it ended up being alot more complicated than that so I went with the turn and forwards instead. It also had a little tail when it was created due to it creating a line from the origin point to the first point. This was very confusing at first because I would plot 4 points and find 5. -## How to Prepare and Submit This Assignment +![turtle image](/turtleboard.png?raw=true "turtle board") -1. To start, [**fork** this repository][forking]. -1. Add your `.rkt` Racket source file(s) to the repository. -1. Add any images to the repository. -1. Modify the `README.md` file and [**commit**][ref-commit] changes to complete your report. -1. Ensure your changes (report in `md` file, added `rkt` file(s), and images) are committed to your forked repository. -1. [Create a **pull request**][pull-request] on the original repository to turn in the assignment. - -## Library Name Here -My name: **put your real name here** - -Write what you did! -Remember that this report must include: - -* a narrative of what you did -* highlights of code that you wrote, with explanation -* output from your code demonstrating what it produced -* at least one diagram or figure showing your work - -The narrative itself should be no longer than 350 words. - -You need at least one image (output, diagrams). Images must be uploaded to your repository, and then displayed with markdown in this file; like this: - -![test image](/testimage.png?raw=true "test image") - -You must provide credit to the source for any borrowed images. - -Code should be delivered in two ways: - -1. Full files should be added to your version of this repository. -1. Key excerpts of your code should be copied into this .md file, formatted to look like code, and explained. [FP1]: https://github.com/oplS17projects/FP1 From f88f6a77dcbf87390382b1e178d7f0ff47deba34 Mon Sep 17 00:00:00 2001 From: Henry Walker Date: Sun, 26 Mar 2017 22:12:10 -0400 Subject: [PATCH 4/4] deted test image --- testimage.png | Bin 4291 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 testimage.png diff --git a/testimage.png b/testimage.png deleted file mode 100644 index 891344ad15be0a7b035c9e450cf1b52313a374fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4291 zcmd5=S5y;g*PclrbcleI01^vDK?q21(iLe|iVB2|Qlp5{hZgmSN|7Q;@qh{_5Q>5r zLJR^&DZv5+X+eZgrS|~ec)t7Z>c9BcdS<=r-FvTnF?-MR>^*l++no^L#qa_EAYgUU z{44+1Yct>k?;n(eE<4sjn+pQGz8SkkYSWCOo%A9DWH`ZjPFfZkCqApkV~ z4~!uY1^}Y|fJ5RB{_FU^_0=sk2^+gM#_a5{ciCI{jj#DXu2lv;xd34%Ge)?T<_fS> zhR<{9pOIo=zDVi9$Ak3jOuH>Dp1}Nji9MWTTaR>b6Co<5wfBp+rwLTHbz?5d zl8{<2Uj#jyVJw!9R7Pr62-c69K+drXb>?OJvDEgwnXH{{nYYf?T9jDjnfKEHTYQN2 zpO!yrb7z8D=tmvh(D>1UTZdom>l+)4t|3K=4UC~ago}rEy*nNj5wWN{8rZdz)UfU7 z*3FM#x7aLP_LE!jiB4I%&Z1em#)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