Surface normal

[color=#999999]This activity belongs to the GeoGebra [i][url=https://www.geogebra.org/m/r2cexbgp]Road Runner (beep, beep)[/url][/i] book. [/color][br][br]In the construction of the previous activity, instead of traveling along a curve, we can travel along a surface. Or rather, we can travel along a path on a surface.[br][br]Let F(u, v) be the expression of a surface according to the parameters u and v. If u(t) and v(t) are, in turn, expressions of the parameters u and v according to a parameter t, then the expression f(t) = F(u(t), v(t)) will correspond to a curve on the surface.[br][br]Let's see an example. In the construction, the toroidal surface F is parametrically defined, based on two given radii R and r, as follows:[br] Fx(u, v) = (R + r cos(u)) cos(v)[br] Fy(u, v) = (R + r cos(u)) sen(v)[br] Fz(u, v) = r sen(u)[br][br]If we now take u(t) = 3t and v(t) = 2t, we obtain the curve f(t) defined by:[br] fx(t) = Fx(u(t), v(t)) = (R + r cos(3t)) cos(2t) [br] fy(t) = Fy(u(t), v(t)) = (R + r cos(3t)) sen(2t) [br] fz(t) = Fz(u(t), v(t)) = r sen(3t)[br][br]Thus, we can travel along the surface F following the curve f. In the construction, the [img]https://www.geogebra.org/resource/njceatrr/VDybceHABmIBMmu5/material-njceatrr.png[/img] button allows opening or closing a configuration panel. In it, you can choose whether to display the lines of the surface and the Frenet frame.[br][br]Now arises a dilemma. We can choose to travel along the curve f or choose to travel along the surface F, following the path of f. Both are the same for an external observer (as we are now when viewing the scene shown by the construction), but not for someone traveling in the place of the point. For that traveler, traveling along the surface means staying perpendicular to it at all times (either "outward" or "inward"), that is, maintaining the direction of the [b][color=#00ffff]normal[/color][/b] to the surface at that point. While traveling along the curve means staying in the direction of the binormal vector [b][color=#0000ff]B[/color][/b] of the Frenet frame (perpendicular to the direction of motion, [b][color=#cc0000]T[/color][/b], and to the direction of curvature, [b][color=#6aa84f]N[/color][/b]). [br][br]Therefore, when we adopt the local point of view of this traveler, the scene shown at each moment will change depending on our choice: [br][list=1][*]If we activate the [b]Surface [color=#00ffff]Normal[/color][/b], checkbox, we will see the scene as if we were traveling along the surface, always staying perpendicular to it (i.e., perpendicular to the tangent plane to the surface at that point). We can choose between direction 1 or direction 2, as the normal accepts both directions. We can also choose (checkbox [b]Show[/b]) whether to display the selected normal vector or not.[/*][br][*]If the [b]Surface [color=#00ffff]Normal[/color][/b] checkbox is deactivated, we will see the scene as if we were traveling along the curve, that is, as if the surface did not exist. In this case, our "vertical" will be given by the direction of the binormal vector [color=#6aa84f][b][b][color=#0000ff]B[/color][/b][/b][/color] of the Frenet frame.[/*][/list]To calculate the [b][color=#00ffff]normal[/color][/b] vector to the surface F(u, v) at the point C = c([b][color=#ff7700]p[/color][/b]) with (path) parameter [b][color=#ff7700]p[/color][/b] of the curve c(t), with the parameter t varying between t1 and t2, we perform the following instructions, based on the [b]homotopy s[/b]:[br][list][*][b]s[/b] = (1 - [b][color=#ff7700]p[/color][/b]) t1 + [b][color=#ff7700]p[/color][/b] t2[/*][*]duF = {Derivative(Fx(x, v(s))), Derivative(Fy(x, v(s))), Derivative(Fz(x, v(s)))}[/*][*]duFs = {duF(1, u(s)), duF(2, u(s)), duF(3, u(s))}[/*][*]dvF = {Derivative(Fx(u(s), x)), Derivative(Fy(u(s), x)), Derivative(Fz(u(s), x))}[/*][*]dvFs = {dvF(1, v(s)), dvF(2, v(s)), dvF(3, v(s))}[/*][*][b][color=#00ffff]normal[/color][/b] = UnitVector((duFs(1), duFs(2), duFs(3))) ⊗ UnitVector((dvFs(1), dvFs(2), dvFs(3)))[/*][/list]The first instruction performs the homotopy. The next two calculate the derivative of F with respect to parameter u at the point C = c([b][color=#ff7700]p[/color][/b]) = F(u([b]s[/b]), v([b]s[/b])). The following two calculate the derivative of F with respect to parameter v at the point C. The [b][color=#00ffff]normal[/color][/b] vector is calculated in the last instruction, or its opposite, depending on the chosen direction.
[color=#999999][color=#999999]Author of the construction of GeoGebra: [color=#999999][url=https://www.geogebra.org/u/rafael]Rafael Losada[/url][/color][/color][/color]

Informacja: Surface normal