Browse Source

Como en el libro

Luis Albertorio 8 years ago
parent
commit
29a614a571
2 changed files with 90 additions and 62 deletions
  1. 46
    33
      README-en.md
  2. 44
    29
      README-es.md

+ 46
- 33
README-en.md View File

@@ -1,4 +1,3 @@
1
-
2 1
 #Arithmetic Expressions - Pretty Plots
3 2
 
4 3
 ![rsz_heart.png](images/rsz_heart.png)
@@ -36,25 +35,24 @@ Before you get to the laboratory you should have:
36 35
 
37 36
 2. Studied the concepts and instructions for the laboratory session.
38 37
 
39
-3. Taken the Pre-Lab quiz that can be found in Moodle.
40
-
41 38
 ---
39
+
42 40
 ---
43 41
 
44 42
 
45 43
 ## Parametric Equations
46 44
 
47
-*Parametric equations* allow us to represent a quantity as a function of one or more independent variables called *parameters*. In many occasions it is useful to represent curves using a set of parametric equations that express the coordinates of the points of the curve as functions of the parameters. For example, in your trigonometry course you should have studied that the equation of the circle of radius $r$ and centered at the origin has the following form:
45
+*Parametric equations* allow us to represent a quantity as a function of one or more independent variables called *parameters*. In many occasions it is useful to represent curves using a set of parametric equations that express the coordinates of the points of the curve as functions of the parameters. For example, in your trigonometry course you should have studied that the equation of the circle of radius $$r$$ and centered at the origin has the following form:
48 46
 
49 47
 
50 48
 $$x^2+y^2=r^2.$$
51 49
 
52
-The points $(x,y)$ that satisfy this equation are the points that form the circle of radius $r$ and center at the origin. For example, the circle with $r=2$ and center at the origin has equation
50
+The points $$(x,y)$$ that satisfy this equation are the points that form the circle of radius $$r$$ and center at the origin. For example, the circle with $$r=2$$ and center at the origin has equation
53 51
 
54 52
 
55 53
 $$x^2+y^2=4,$$
56 54
 
57
-and its points are the ordered pairs $(x,y)$ that satisfy this equation. A parametric representation of the coordinates of the points in the circle of radius $r$ and center at the origin is:
55
+and its points are the ordered pairs $$(x,y)$$ that satisfy this equation. A parametric representation of the coordinates of the points in the circle of radius $$r$$ and center at the origin is:
58 56
 
59 57
 
60 58
 
@@ -62,20 +60,20 @@ $$x=r \cos(t)$$
62 60
 
63 61
 $$y=r \sin(t),$$
64 62
 
65
-where $t$ is a parameter that corresponds to the measure (in radians) of the positive angle  with initial side that coincides with the positive part of the $x$-axis and terminal side that contains the point $(x,y)$, as it is illustrated in Figure 1.
63
+where $$t$$ is a parameter that corresponds to the measure (in radians) of the positive angle  with initial side that coincides with the positive part of the $$x$$-axis and terminal side that contains the point $$(x,y)$$, as illustrated in Figure 1.
66 64
 
67 65
 
68 66
 ---
69 67
 
70 68
 ![figura1.jpg](images/circuloAngulo01.png)
71 69
 
72
-**Figure 1.** Circle of radius $r$ and centered at the origin.
70
+**Figure 1.** Circle of radius $$r$$ and centered at the origin.
73 71
 
74 72
 
75 73
 
76 74
 ---
77 75
 
78
-To plot a curve that is described  by parametric equations, we compute the $x$ and $y$ values for a set of values of the parameter. For example, Figure 2 shows the $t$, $x$ y $y$ values for some of the points in the circle with $r = 2$.
76
+To plot a curve that is described by parametric equations, we compute the $$x$$ and $$y$$ values for a set of values of the parameter. For example, Figure 2 shows the $$t$$, $$x$$ y $$y$$ values for some of the points in the circle with $$r = 2$$.
79 77
 
80 78
 
81 79
 ---
@@ -83,11 +81,28 @@ To plot a curve that is described  by parametric equations, we compute the $x$ a
83 81
 
84 82
 ![figura2.jpg](images/circuloPuntos01.png)
85 83
 
86
-**Figure 2.** Some of the coordinates of the points $(x,y)$ of the circle of radius $r=2$ and centered at the origin.
84
+**Figure 2.** Some of the coordinates of the points $$(x,y)$$ of the circle of radius $$r=2$$ and centered at the origin.
85
+
86
+---
87
+
88
+---
89
+
90
+
91
+!INCLUDE "../../eip-diagnostic/expressions-pretty-plots/en/diag-quadratic-frog-01.html"
92
+<br>
93
+
94
+!INCLUDE "../../eip-diagnostic/expressions-pretty-plots/en/diag-quadratic-frog-08.html"
95
+<br>
96
+
97
+!INCLUDE "../../eip-diagnostic/expressions-pretty-plots/en/diag-quadratic-frog-09.html"
98
+<br>
87 99
 
88 100
 ---
101
+
89 102
 ---
90 103
 
104
+
105
+
91 106
 ## Laboratory session:
92 107
 
93 108
 ### Exercise 1
@@ -96,10 +111,11 @@ In this exercise you will plot the graphs of some parametric equations of intere
96 111
 
97 112
 **Instructions**
98 113
 
99
-1. Double click the file `prettyPlot.pro` that is inside the `Documents/eip/Expressions-PrettyPlots` folder to load the project `prettyPlot` into Qt Creator.
100
-You can also download the folder `Expressions-PrettyPlots` from  `http://bitbucket.org/eip-uprrp/expressions-prettyplots`.
114
+1. Download the folder `expressions-prettyplots` from `Bitbucket` usig a terminal, moving to the direcory `Documents/eip`, and writing the command `git clone http://bitbucket.org/eip-uprrp/expressions-prettyplots`.
115
+
116
+2. Load the project `prettyPlot` by doube cliking on the `prettyPlot.pro` file that can be found in the `Documents/eip/expressions-prettyplots` directory on your computer.
101 117
 
102
-2. Configure the project and run the program by clicking the green arrow in the menu on the left side of the Qt Creator window. The program should display a window similar to the one in Figure 3.
118
+3. Configure the project and run the program by clicking the green arrow in the menu on the left side of the Qt Creator window. The program should display a window similar to the one in Figure 3.
103 119
 
104 120
 	---
105 121
 
@@ -109,7 +125,7 @@ You can also download the folder `Expressions-PrettyPlots` from  `http://bitbuck
109 125
 
110 126
 	---
111 127
 
112
-3. The file `main.cpp` (in Sources) contains the function `main()` where you will be adding code. Open this file and study the code.
128
+4. The file `main.cpp` (in Sources) contains the function `main()` where you will be adding code. Open this file and study the code.
113 129
 
114 130
         QApplication a(argc, argv);
115 131
         XYPlotWindow wLine;
@@ -134,13 +150,13 @@ You can also download the folder `Expressions-PrettyPlots` from  `http://bitbuck
134 150
         wLine.Plot();
135 151
         wLine.show();
136 152
 
137
-    The line  `XYPlotWindow wLine;` creates the object `wLine`, that is the window that will show the plot of a graph, in this case the graph of a segment. Look at the `for` cycle. In this cycle several values for $t$ are generated and a value for $x$ and $y$ is computed for each $t$. Each ordered pair $(x,y)$ is added to the graph of the segment by the method `AddPointToGraph(x,y)`.  After the cycle, there is a call to the  method  `Plot()`, to "draw" the points in the graph, and to the method `show()`, to show the plot. The *methods* are functions that allow us to work with the data of an object. Note that each of the methods is written after `wLine`, and followed by a period. In a future laboratory experience you will learn more about objects and practice how to create them and invoke their methods.
153
+    The line  `XYPlotWindow wLine;` creates the object `wLine`, that is the window that will show the plot of a graph, in this case the graph of a segment. Look at the `for` loop. In this cycle several values for $$t$$ are generated and a value for $$x$$ and $$y$$ is computed for each $$t$$. Each ordered pair $$(x,y)$$ is added to the graph of the segment by the method `AddPointToGraph(x,y)`.  After the cycle, there is a call to the  method  `Plot()`, to "draw" the points on the graph, and to the method `show()`, to show the plot. The *methods* are functions that allow us to work with the data of an object. Note that each of the methods is written after `wLine`, and followed by a period. In a future laboratory experience you will learn more about objects and practice how to create them and invoke their methods.
138 154
 
139
-	The expressions for $x$ and $y$ are parametric equations for the line that passes through the origin and has the same value for $x$ and $y$. Explain why this line only goes from 0 to approximately 6.
155
+	The expressions for $$x$$ and $$y$$ are parametric equations for the line that passes through the origin and has the same value for $$x$$ and $$y$$. Explain why this line only goes from 0 to approximately 6.
140 156
 
141
-4.	You will now write the code needed to plot a circle. The line `XYPlotWindow wCircle;` creates the object `wCircle`  for the window that will contain the plot of the circle. Using as inspiration the code that plotted the segment, write the necessary code for your program to graph a circle of radius 3 and centered at the origin. Run your program and, if it is necessary, modify the code until you get the right plot. Remember that the circle should be plotted inside the `wCircle` object. Thus, when you invoke the `AddPointToGraph(x,y)`, `Plot` and `show` methods, they should be preceeded by `wCircle`; e.g. `wCircle.show()`.
157
+5.	You will now write the code needed to plot a circle. The line `XYPlotWindow wCircle;` creates the object `wCircle`  for the window that will contain the plot of the circle. Using the code that plotted the segment as inspiration, write the necessary code for your program to graph a circle of radius 3 and centered at the origin. Run your program and, if it is necessary, modify the code until you get the right plot. Remember that the circle should be plotted inside the `wCircle` object. Thus, when you invoke the `AddPointToGraph(x,y)`, `Plot` and `show` methods, they should be preceeded by `wCircle`; e.g. `wCircle.show()`.
142 158
 
143
-5. Your next task is to plot a curve with the following parametric equations:
159
+6. Your next task is to plot a curve with the following parametric equations:
144 160
 
145 161
 	$$x=16 \sin^3(t)$$
146 162
 
@@ -148,14 +164,13 @@ You can also download the folder `Expressions-PrettyPlots` from  `http://bitbuck
148 164
 
149 165
 	If you implement the equations correctly, you will see the image of a heart. This plot should be obtained inside an `XYPlotWindow` object called `wHeart`.
150 166
 
151
-
152
-6.  You will now plot the curve of the following parametric equations:
167
+7.  You will now plot the curve of the following parametric equations:
153 168
 
154 169
 	$$x=5\cos(t) \left[ \sin^2(1.2t) + \cos^3(6t) \right]$$
155 170
 
156 171
 	$$y= 10\sin(t) \left[ \sin^2(1.2t) +  \cos^3(6t) \right].$$
157 172
 
158
-	Note that both expressions are almost the same, the only difference is that one starts  with $5\cos(t)$ and the other with $10\sin(t)$. Instead of computing $ \sin^2(1.2t) + \cos^3(6t)$ twice, you can assign its value to another variable $q$ and compute $x$ and $y$ as follows:
173
+	Note that both expressions are almost the same, the only difference is that one starts  with $$5\cos(t)$$ and the other with $$10\sin(t)$$. Instead of computing $$ \sin^2(1.2t) + \cos^3(6t)$$ twice, you can assign its value to another variable $$q$$ and compute $$x$$ and $$y$$ as follows:
159 174
 
160 175
 	$$q =  \sin^2(1.2t) + \cos^3(6t)$$
161 176
 
@@ -163,11 +178,9 @@ You can also download the folder `Expressions-PrettyPlots` from  `http://bitbuck
163 178
 
164 179
 	$$y = 10  \sin(t)(q).$$
165 180
 
166
-	Implement the above expressions,  change the condition for termination of the  `for` to   `t < 16*M_PI`, and look at the plot that it is displayed. It should look like a butterfly. This plot should be obtained inside an `XYPlotWindow` object called `wButterfly`.
167
-
168
-7. Use "Deliverable 1" in Moodle to submit the file  `main.cpp` containing the code with the parametric equations for the graphs of the circle, the heart, and the butterfly. Remember to use good programming practices, to include the names of the programmers and to document your program.
169
-
181
+	Implement the above expressions,  change the condition for termination of the  `for` to   `t < 16*M_PI`, and look at the plot that is displayed. It should look like a butterfly. This plot should be obtained inside an `XYPlotWindow` object called `wButterfly`.
170 182
 
183
+8. Use "Deliverable 1" in Moodle to submit the file  `main.cpp` containing the code with the parametric equations for the graphs of the circle, the heart, and the butterfly. Remember to use good programming practices, to include the names of the programmers and to document your program.
171 184
 
172 185
 In [2] and [3] you can find other parametric equations of interesting curves.
173 186
 
@@ -177,25 +190,25 @@ In [2] and [3] you can find other parametric equations of interesting curves.
177 190
 
178 191
 In this exercise you will write a program to obtain a student's grade point average (GPA).
179 192
 
180
-Suppose that all courses in Cheo's University are 3 credits each and have the following point values: $A = 4$ points per credit; $B = 3$ points per credit; $C = 2$ points per credit; $D = 1$ point per credit y $F = 0$ points per credit.
193
+Suppose that all courses in Cheo's University are $$3$$ credits each and have the following point values: $$A = 4$$ points per credit; $$B = 3$$ points per credit; $$C = 2$$ points per credit; $$D = 1$$ point per credit y $$F = 0$$ points per credit.
181 194
 
182 195
 **Instructions**
183 196
 
184
-1. Start a new "Non-Qt" project called "Average". Your `main()` function will contain the necessary code to ask the user for the number of A's, B's, C's, D's and F's obtained and compute the grade point average (GPA).
197
+1. Start a new "Non-Qt" project called Average. Your `main()` function will contain the necessary code to ask the user for the number of A's, B's, C's, D's and F's obtained and compute the grade point average (GPA).
185 198
 
186
-2. Your code should define the **constants**  $A=4, B=3, C=2, D=1, F=0$ for the points per credit, and ask the user to input the values for the variables  $NumA$, $NumB$, $NumC$, $NumD$, $NumF$. The variable $NumA$ represents the number of courses in which the student obtained A, $NumB$ represents the number of courses in which the student obtained B, etc. The program should display the GPA using the 0-4 point scale.
199
+2. Your code should define the **constants**  $$A=4, B=3, C=2, D=1, F=0$$ for the points per credit, and ask the user to input the values for the variables  $$NumA$$, $$NumB$$, $$NumC$$, $$NumD$$, $$NumF$$. The variable $$NumA$$ represents the number of courses in which the student obtained $$A$$, $$NumB$$ represents the number of courses in which the student obtained $$B$$, etc. The program should display the GPA using the 0-4 point scale.
187 200
 
188 201
 	**Hints:**
189 202
 
190
-	1. You can obtain the GPA by adding the credit points corresponding to the grades (for example, an A in a 3 credit course has a value of 12 points), and dividing this sum by the total number of credits.
203
+	a. You can obtain the GPA by adding the credit points corresponding to the grades (for example, an A in a 3 credit course has a value of 12 points), and dividing this sum by the total number of credits.
191 204
 
192
-	2. Remember that, in C++, when both operands in the division are integers, the result will also be an integer; the remainder will be discarded. Use "type casting": `static_cast<type>(expression)` to solve this problem.
193
-
194
-3. Verify your program by computing the GPA of a student that has two A's and 2 B's; what is the average of this student?. When your program is correct, save the `main.cpp` file and submit it using "Deliverable 2" in Moodle. Remember to follow the instructions regarding the names and types of the variables,  to include the names of the programmers, to document your program and to use good programming practices.
205
+	b. Remember that, in C++, when both operands in the division are integers, the result will also be an integer; the remainder will be discarded. Use "type casting": `static_cast<type>(expression)` to solve this problem.
195 206
 
207
+3. Verify your program by computing the GPA of a student that has two A's and 2 B's; what is the average of this student? When your program is correct, save the `main.cpp` file and submit it using "Deliverable 2" in Moodle. Remember to follow the instructions regarding the names and types of the variables,  to include the names of the programmers, to document your program and to use good programming practices.
196 208
 
197 209
 
198 210
 ---
211
+
199 212
 ---
200 213
 
201 214
 ## References:
@@ -204,4 +217,4 @@ Suppose that all courses in Cheo's University are 3 credits each and have the fo
204 217
 
205 218
 [2] http://paulbourke.net/geometry/butterfly/
206 219
 
207
-[3] http://en.wikipedia.org/wiki/Parametric_equation
220
+[3] http://en.wikipedia.org/wiki/Parametric_equation

+ 44
- 29
README-es.md View File

@@ -1,4 +1,3 @@
1
-
2 1
 # Expresiones aritméticas - Gráficas Bonitas 
3 2
 
4 3
 ![rsz_heart.png](images/rsz_heart.png)
@@ -8,7 +7,7 @@
8 7
 [version 2016.01.29]
9 8
 
10 9
 
11
-Las expresiones aritméticas son parte esencial de casi cualquier algoritmo que resuelve un problema útil.  Por lo tanto,  implementar expresiones aritméticas correctamente es una destreza básica en cualquier lenguaje de programación de computadoras. En esta experiencia de laboratorio practicarás la implementación de expresiones aritméticas en C++ escribiendo  ecuaciones paramétricas para graficar curvas interesantes.
10
+Las expresiones aritméticas son parte esencial de casi cualquier algoritmo que resuelve un problema útil. Por lo tanto, implementar expresiones aritméticas correctamente es una destreza básica en cualquier lenguaje de programación de computadoras. En esta experiencia de laboratorio practicarás la implementación de expresiones aritméticas en C++ escribiendo ecuaciones paramétricas para graficar curvas interesantes.
12 11
 
13 12
 
14 13
 
@@ -38,52 +37,69 @@ Antes de llegar al laboratorio debes:
38 37
 
39 38
 2. Haber estudiado los conceptos e instrucciones para la sesión de laboratorio.
40 39
 
41
-
42 40
 ---
41
+
43 42
 ---
44 43
 
45 44
 ## Ecuaciones paramétricas
46 45
 
47
-Las *ecuaciones paramétricas* nos permiten representar una cantidad como función de una o más variables independientes llamadas *parámetros*. En muchas ocasiones resulta útil representar curvas utilizando un conjunto de ecuaciones paramétricas que expresen las coordenadas de los puntos de la curva como funciones de los parámetros. Por ejemplo, en tu curso de trigonometría debes haber estudiado que la ecuación de un círculo con radio $r$ y centro en el origen tiene una forma así:
46
+Las *ecuaciones paramétricas* nos permiten representar una cantidad como función de una o más variables independientes llamadas *parámetros*. En muchas ocasiones resulta útil representar curvas utilizando un conjunto de ecuaciones paramétricas que expresen las coordenadas de los puntos de la curva como funciones de los parámetros. Por ejemplo, en tu curso de trigonometría debes haber estudiado que la ecuación de un círculo con radio $$r$$ y centro en el origen tiene una forma así:
48 47
 
49 48
 $$x^2+y^2=r^2.$$
50 49
 
51 50
 
52
-Los puntos $(x,y)$ que satisfacen esta ecuación son los puntos que forman el círculo de radio $r$ y centro en el origen.  Por ejemplo, el círculo con $r=2$ y centro en el origen tiene ecuación
51
+Los puntos $$(x,y)$$ que satisfacen esta ecuación son los puntos que forman el círculo de radio $$r$$ y centro en el origen.  Por ejemplo, el círculo con $$r=2$$ y centro en el origen tiene ecuación
53 52
 
54 53
 $$x^2+y^2=4,$$
55 54
 
56
-y sus puntos son los pares ordenados $(x,y)$ que satisfacen esa ecuación. Una forma paramétrica de expresar las coordenadas de los puntos de el círculo con radio $r$ y centro en el origen es:
55
+y sus puntos son los pares ordenados $$(x,y)$$ que satisfacen esa ecuación. Una forma paramétrica de expresar las coordenadas de los puntos de el círculo con radio $$r$$ y centro en el origen es:
57 56
 
58 57
 $$x=r \cos(t)$$
59 58
 
60 59
 $$y=r \sin(t),$$
61 60
 
62
-donde $t$ es un parámetro que corresponde a la medida (en radianes) del ángulo positivo con lado inicial que coincide con la parte positiva del eje de $x$, y lado terminal que contiene el punto $(x,y)$, como se muestra en la Figura 1.
61
+donde $$t$$ es un parámetro que corresponde a la medida (en radianes) del ángulo positivo con lado inicial que coincide con la parte positiva del eje de $$x$$, y lado terminal que contiene el punto $$(x,y)$$, como se muestra en la Figura 1.
63 62
 
64 63
 
65 64
 ---
66 65
 
67 66
 ![figura1.jpg](images/circuloAngulo01.png)
68 67
 
69
-**Figura 1.** Círculo con centro en el origen y radio $r$.
68
+**Figura 1.** Círculo con centro en el origen y radio $$r$$.
70 69
 
71 70
 
72 71
 
73 72
 ---
74 73
 
75
-Para graficar una curva que está definida usando ecuaciones paramétricas, computamos los valores de $x$ y $y$ para un conjunto de valores del parámetro. Por ejemplo, la Figura 2 resalta algunos valores de $t$, $(x,y)$ para el círculo con $r = 2$.
74
+Para graficar una curva que está definida usando ecuaciones paramétricas, computamos los valores de $$x$$ y $$y$$ para un conjunto de valores del parámetro. Por ejemplo, la Figura 2 resalta algunos valores de $$t$$, $$(x,y)$$ para el círculo con $$r = 2$$.
76 75
 
77 76
 ---
78 77
 
79 78
 
80 79
 ![figura2.jpg](images/circuloPuntos01.png)
81 80
 
82
-**Figura 2.** Algunas coordenadas de los puntos $(x,y)$ del círculo con radio $r=2$ y centro en el origen.
81
+**Figura 2.** Algunas coordenadas de los puntos $$(x,y)$$ del círculo con radio $$r=2$$ y centro en el origen.
82
+
83
+---
84
+
85
+---
86
+
87
+
88
+!INCLUDE "../../eip-diagnostic/quadratic-frog/es/diag-quadratic-frog-01.html"
89
+<br>
90
+
91
+!INCLUDE "../../eip-diagnostic/quadratic-frog/es/diag-quadratic-frog-08.html"
92
+<br>
93
+
94
+!INCLUDE "../../eip-diagnostic/quadratic-frog/es/diag-quadratic-frog-09.html"
95
+<br>
83 96
 
84 97
 ---
98
+
85 99
 ---
86 100
 
101
+
102
+
87 103
 ## Sesión de laboratorio:
88 104
 
89 105
 ### Ejercicio 1
@@ -92,20 +108,19 @@ En este ejercicio graficarás algunas ecuaciones paramétricas que generan curva
92 108
 
93 109
 **Instrucciones**
94 110
 
95
-1. Descarga la carpeta `Expressions-Pretty-Plots` de `Bitbucket` usando un terminal, moviéndote al directorio `Documents/eip`,  y escribiendo el comando `git clone http://bitbucket.org/eip-uprrp/expressions-prettyplots`.
111
+1. Descarga la carpeta `expressions-prettyplots` de `Bitbucket` usando un terminal, moviéndote al directorio `Documents/eip`,  y escribiendo el comando `git clone http://bitbucket.org/eip-uprrp/expressions-prettyplots`.
96 112
 
97
-2. Carga a Qt Creator el proyecto `prettyPlot`  haciendo doble "click" en el archivo `prettyPlot.pro` que se encuentra en la carpeta `Documents/eip/Expressions-PrettyPlots` de tu computadora.
113
+2. Carga a Qt Creator el proyecto `prettyPlot`  haciendo doble "click" en el archivo `prettyPlot.pro` que se encuentra en la carpeta `Documents/eip/expressions-prettyplots` de tu computadora.
98 114
 
99 115
 3. Configura el proyecto y ejecuta el programa marcando la flecha verde en el menú de la izquierda de la interface de Qt Creator. El programa debe mostrar una ventana parecida a la Figura 3.
100 116
 
101
-	---
117
+    ---
102 118
 
103
-	![figura3.png](images/segment01.png)
104
-	
119
+    ![figura3.png](images/segment01.png)
105 120
 
106
-	**Figura 3.** Segmento de línea desplegado por el programa <i>PrettyPlot</i>.
121
+    **Figura 3.** Segmento de línea desplegado por el programa <i>PrettyPlot</i>.
107 122
 
108
-	---
123
+    ---
109 124
 
110 125
 4. El archivo `main.cpp` (en Sources) contiene la función `main()` donde estarás añadiendo código. Abre ese archivo y estudia el código.
111 126
 
@@ -132,15 +147,16 @@ En este ejercicio graficarás algunas ecuaciones paramétricas que generan curva
132 147
         wLine.Plot();
133 148
         wLine.show();
134 149
 
135
-    La línea `XYPlotWindow wLine;` crea el objeto `wLine` que será la ventana en donde se dibujará una gráfica, en este caso la gráfica de un segmento. Observa el ciclo `for`. En este ciclo se genera una serie de valores para $t$ y se computa un valor de $x$ y $y$ para cada valor de $t$. Cada par ordenado $(x,y)$  es añadido a la gráfica del segmento por el método `AddPointToGraph(x,y)`. Luego del ciclo se invoca el método `Plot()`, que "dibuja" los puntos, y el método `show()`, que muestra la gráfica. Los *métodos* son funciones que nos permiten trabajar con los datos de los objetos. Nota que cada uno de los métodos se escribe luego de `wLine`, seguido de un punto. En una experiencia de laboratorio posterior aprenderás más sobre objetos y practicarás cómo crearlos e invocar sus métodos.
150
+    La línea `XYPlotWindow wLine;` crea el objeto `wLine` que será la ventana en donde se dibujará una gráfica, en este caso la gráfica de un segmento. Observa el ciclo `for`. En este ciclo se genera una serie de valores para $$t$$ y se computa un valor de $$x$$ y $$y$$ para cada valor de $$t$$. Cada par ordenado $$(x,y)$$  es añadido a la gráfica del segmento por el método `AddPointToGraph(x,y)`. Luego del ciclo se invoca el método `Plot()`, que "dibuja" los puntos, y el método `show()`, que muestra la gráfica. Los *métodos* son funciones que nos permiten trabajar con los datos de los objetos. Nota que cada uno de los métodos se escribe luego de `wLine`, seguido de un punto. En una experiencia de laboratorio posterior aprenderás más sobre objetos y practicarás cómo crearlos e invocar sus métodos.
136 151
 
137
-	Las expresiones que tiene tu programa para $x$ y $y$  son ecuaciones paramétricas para la línea que pasa por el origen y tiene el mismo valor para las  coordenadas en $x$ y $y$. Explica por qué la línea solo va desde 0 hasta aproximadamente 6.
152
+	Las expresiones que tiene tu programa para $$x$$ y $$y$$  son ecuaciones paramétricas para la línea que pasa por el origen y tiene el mismo valor para las  coordenadas en $$x$$ y $$y$$. Explica por qué la línea solo va desde 0 hasta aproximadamente 6.
138 153
 
139 154
 5.	Ahora escribirás el código necesario para graficar un círculo. La línea `XYPlotWindow wCircle;` crea el objeto `wCircle` para la ventana donde se graficará el círculo. Usando como inspiración el código para graficar el segmento, escribe el código necesario para que tu  programa grafique un círculo de radio 3 con centro en el origen.  Ejecuta tu programa y, si es necesario, modifica el código hasta que obtengas la gráfica correcta. Recuerda que el círculo debe graficarse dentro del objeto `wCircle`. Por esto, al invocar los métodos `AddPointToGraph(x,y)`, `Plot` y `show`, éstos deben ser precedidos por `wCircle`, por ejemplo, `wCircle.show()`.
140 155
 
141 156
 6. Tu próxima tarea es graficar una curva cuyas ecuaciones paramétricas son:
142 157
 
143 158
 	$$x=16 \sin^3(t)$$
159
+
144 160
 	$$y=13 \cos(t) - 5 \cos(2t) - 2 \cos(3t) - \cos(4t)-3.$$
145 161
 
146 162
 	Si implementas las expresiones correctamente debes ver la imagen de un corazón.  Esta gráfica debe haber sido obtenida dentro de un objeto `XYPlotWindow` llamado `wHeart`.
@@ -148,12 +164,15 @@ En este ejercicio graficarás algunas ecuaciones paramétricas que generan curva
148 164
 7. Ahora graficarás una curva cuyas ecuaciones paramétricas son:
149 165
 
150 166
 	$$x=5\cos(t) \left[ \sin^2(1.2t) + \cos^3(6t) \right]$$
167
+
151 168
 	$$y= 10\sin(t) \left[ \sin^2(1.2t) +  \cos^3(6t) \right].$$
152 169
 
153
-	Observa que ambas expresiones son casi iguales, excepto que una comienza con $5\cos(t)$ y la otra con $10\sin(t)$. En lugar de realizar el cómputo de $ \sin^2(1.2t) + \cos^3(6t)$ dos veces, puedes asignar su valor a otra variable $q$ y realizar el cómputo así:
170
+	Observa que ambas expresiones son casi iguales, excepto que una comienza con $$5\cos(t)$$ y la otra con $$10\sin(t)$$. En lugar de realizar el cómputo de $$ \sin^2(1.2t) + \cos^3(6t)$$ dos veces, puedes asignar su valor a otra variable $$q$$ y realizar el cómputo así:
154 171
 
155 172
 	$$q =  \sin^2(1.2t) + \cos^3(6t)$$
156
-	$$x = 5 \cos(t)(q)$$
173
+
174
+	$$x = 5 \cos(t)(q)$$ 
175
+
157 176
 	$$y = 10  \sin(t)(q).$$
158 177
 
159 178
 	Implementa las expresiones de arriba, cambia la condición de terminación del `for` a `t < 16*M_PI` y observa la gráfica que resulta. Se supone que parezca una mariposa. Esta gráfica debe haber sido obtenida dentro de un objeto `XYPlotWindow` llamado `wButterfly`.
@@ -167,13 +186,13 @@ En [2] y [3] puedes encontrar otras ecuaciones paramétricas de otras curvas int
167 186
 
168 187
 En este ejercicio escribirás un  programa para obtener el promedio de puntos para la nota de un estudiante.
169 188
 
170
-Supón que todos los cursos en la Universidad de Yauco son de $3$ créditos y que las notas tienen las siguientes puntuaciones: $A = 4$ puntos por crédito; $B = 3$ puntos por crédito; $C = 2$ puntos por crédito; $D = 1$ punto por crédito y $F = 0$ puntos por crédito.
189
+Supón que todos los cursos en la Universidad de Yauco son de $$3$$ créditos y que las notas tienen las siguientes puntuaciones: $$A = 4$$ puntos por crédito; $$B = 3$$ puntos por crédito; $$C = 2$$ puntos por crédito; $$D = 1$$ punto por crédito y $$F = 0$$ puntos por crédito.
171 190
 
172 191
 **Instrucciones**
173 192
 
174 193
 1. Crea un nuevo proyecto "Non-Qt" llamado Promedio. Tu función `main()`  contendrá el código necesario para pedirle al usuario el número de A's, B's, C's, D's y F's obtenidas por el estudiante y computar el promedio de puntos para la nota (GPA por sus siglas en inglés).
175 194
 
176
-2. Tu código debe definir las **constantes** $A=4, B=3, C=2, D=1, F=0$ para la puntuación de las notas, y pedirle al usuario que entre los valores para las variables $NumA$, $NumB$, $NumC$, $NumD$, $NumF$. La variable $NumA$ representará el número de cursos en los que el estudiante obtuvo $A$,  $NumB$ representará el número de cursos en los que el estudiante obtuvo $B$, etc. El programa debe desplegar el GPA del estudiante en una escala de 0 a 4 puntos.
195
+2. Tu código debe definir las **constantes** $$A=4, B=3, C=2, D=1, F=0$$ para la puntuación de las notas, y pedirle al usuario que entre los valores para las variables $$NumA$$, $$NumB$$, $$NumC$$, $$NumD$$, $$NumF$$. La variable $$NumA$$ representará el número de cursos en los que el estudiante obtuvo $$A$$,  $$NumB$$ representará el número de cursos en los que el estudiante obtuvo $$B$$, etc. El programa debe desplegar el GPA del estudiante en una escala de 0 a 4 puntos.
177 196
 
178 197
 	**Ayudas:**
179 198
 
@@ -181,10 +200,11 @@ Supón que todos los cursos en la Universidad de Yauco son de $3$ créditos y qu
181 200
 
182 201
 	b. Recuerda que, en C++, si divides dos números enteros el resultado se "truncará" y será un número entero. Utiliza "type casting": `static_cast<tipo>(expresión)` para resolver este problema.
183 202
 
184
-3. Verifica tu programa calculando el promedio de un estudiante que tenga dos A y dos B; ¿qué promedio tendría este estudiante?. Cuando tu programa esté correcto, guarda el archivo `main.cpp` y entrégalo  utilizando  "Entrega 2" en Moodle. Recuerda seguir las instrucciones en el uso de nombres y tipos para las variables,  incluir el nombre de los programadores, documentar tu programa y utilizar buenas prácticas de programación.
203
+3. Verifica tu programa calculando el promedio de un estudiante que tenga dos A y dos B; ¿qué promedio tendría este estudiante? Cuando tu programa esté correcto, guarda el archivo `main.cpp` y entrégalo  utilizando  "Entrega 2" en Moodle. Recuerda seguir las instrucciones en el uso de nombres y tipos para las variables,  incluir el nombre de los programadores, documentar tu programa y utilizar buenas prácticas de programación.
185 204
 
186 205
 
187 206
 ---
207
+
188 208
 ---
189 209
 
190 210
 ##Referencias:
@@ -194,8 +214,3 @@ Supón que todos los cursos en la Universidad de Yauco son de $3$ créditos y qu
194 214
 [2] http://paulbourke.net/geometry/butterfly/
195 215
 
196 216
 [3] http://en.wikipedia.org/wiki/Parametric_equation
197
-
198
----
199
----
200
----
201
-