-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revisions to Guide as part of Fiverr gig #1419
base: master
Are you sure you want to change the base?
Changes from 1 commit
3f04fb8
b60a0fe
eec3295
466e082
9c401c5
a17a7a5
03f4d68
deb5c38
f051f94
7b5e2d9
0b4ec70
5c93e3e
6abd151
1a85671
4890ec9
3e11b42
a77c5ad
00b1273
0f35720
1353af4
a739e6a
03af14b
9e6b278
a10b670
e9506f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1842,9 +1842,7 @@ you want to draw a butterfly. You might start by writing: | |
|
||
~~~~~ . clickable | ||
program = drawingOf(butterfly & coordinatePlane) | ||
butterfly=leftWing & rightWing | ||
leftWing = polyline([(0,0),(-1,2),(-3,4),(-4,4),(-5,3),(-5,-3),(-4,-4),(-3,-4),(-1,-2),(0,0) ]) | ||
rightWing= polyline([(0,0),(1,2),(3,4),(4,4),(5,3),(5,-3),(4,-4),(3,-4),(1,-2),(0,0) ]) | ||
butterfly = polyline([ ]) | ||
~~~~~ | ||
|
||
Now run your program, and you have a coordinate plane to measure what | ||
|
@@ -1858,7 +1856,7 @@ lines back to the starting point or curving all over the place. Once your | |
points are in the right place, it's easy to change the function to the one | ||
you want. | ||
|
||
You can see what your shape looks like so far by trying your code out | ||
You can see what your shape looks like at each step by running your code | ||
often. Every new vertex or two is a great time to click that Run button | ||
and make sure the shape looks the way you expected. | ||
|
||
|
@@ -1896,12 +1894,37 @@ y axis, since those are the angles in between the numbers -90 and 90. But the | |
expression `arc(270, 90, 5)` covers the angles to the left of the y axis, | ||
because those are the numbers between 270 and 90. | ||
|
||
To see a half circle with radius 5 drawn on the corrdinate plane, use this code: | ||
|
||
~~~~~ . clickable | ||
program = drawingOf(halfCircle & coordinatePlane) | ||
halfCircle=arc(-90,90,5) | ||
~~~~~ | ||
|
||
Following the same pattern as most other shapes, the `thickArc` function is | ||
just like `arc`, except that you give it one extra number representing the | ||
thickness of the line to draw. The `sector` function is sort of like the | ||
thickness of the line to draw. | ||
|
||
To draw half of a tire, use this code: | ||
|
||
~~~~~ . clickable | ||
program = drawingOf(halfTire & coordinatePlane) | ||
halfTire=thickArc(-90,90,5,4) | ||
~~~~~ | ||
|
||
Notice the thickness is split between both sides of the arc. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure it will be clear what you mean by this, and you may need to be more explicit and refer to the coordinate plane: for example, by pointing out that when the curve intersects the x axis, it is centered around an x value of 5, but it extends all the way from 3 through 7. It could be useful to copy the image with the coordinate plane, and show it here. (Copying an image is a little tricky. Basically, you want to run the program, right-click on it, then wait for the on-screen controls to go away before choosing "Save image as..." in your browser. Then you can add the file to your git branch in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeh. I was having trouble with the wording but though it was important to point out how the thickness worked. I'll add more of a description and an image. |
||
|
||
The `sector` function is sort of like the | ||
solid variant of `arc`, in that it draws one slice of a solid circle. That | ||
looks like a piece of pie or pizza. | ||
|
||
To draw a slice of pizza, use the code: | ||
|
||
~~~~~ . clickable | ||
program = drawingOf(pizzaSlice & coordinatePlane) | ||
pizzaSlice=sector(0,45,5) | ||
~~~~~ | ||
|
||
Transforming colors | ||
------------------- | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit: I'd like to encourage students to use spaces around the equal sign, so let's at least model that for them. Same for the other two examples you added here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha