In this exercise I am using Visual Studio 2017 and the graphics files found here:
https://github.com/l-paz91/principles-practice/tree/master/Graphics%20Files
Chapter 15 // Function Graphing Drills
1. Graph the function double one(double x) {return 1;} in the range [-10,11] with (0,0) at (300,300) using 400 points and no scaling (in the window).
2. Change it to use x scale 20 and y scale 20.
3. From now on use that range, scale, etc. for all graphs.
4. Add double slope(double x) {return x/2;} to the window.
5. Label the slope with a Text "x/2" at a point just above its bottom left end point.
6. Add double square(double x) {return x*x;} to the window.
7. Add a cosine to the window (don't write a new function).
8. Make the cosine blue.
9. Write a function sloping_cos() that adds a cosine to slope() (as defined above) and add it to the window.
Github: https://github.com/l-paz91/principles-practice/tree/master/Chapter%2015/Function%20Graphing%20Drills%202
All of these functions can be found from section 15.2 to 15.3.2. If you have already followed along with the chapter you will have done them.
Drill 2-1:
Drill 2-2:
Drill 2-3, 2-4:
Drill 2-5:
Drill 2-6:
It annoys me that this one doesn't scale
Drill 2-7, 2-8:
Drill 2-9: