Contour Plot Construction

Contour Plot Construction
Loading the math board and drawing, please wait…
2016-04-28 22:29
This example demonstrates how to create a contour plot in 2D space, visually representing the gradient and level curves of a function. Key math concepts include vectors, differential calculus, functions, and binomial distribution. Construction highlights GeoGebra commands like Polygon, PointIn, Segment, Function, Sum, and objects such as n, rr, and z_Step. Ideal for high school students and math enthusiasts studying function visualization and spatial geometry relations.

GeoGebra Commands & Parameters

  1. Polygon((x_{min}, y_{min}), (x_{max}, y_{min}), (x_{max}, y_{max}), (x_{min}, y_{max})) → poly1, b, c, d, e
  2. PointIn(poly1) → PTest
  3. If(Length[RemoveUndefined[Join[Zip[Mirror[{Roots[f0(a, x), y_{min}, y_{max}]}, y = x] + (a, 0), a, Sequence[x_{min} + ((x_{max} - x_{min}) / N_P * i), i, 0, N_P]]]]] ≟ 0, false, true) → lb1
  4. If(lb1, RemoveUndefined[Join[Zip[Reverse[{Roots[f0(x, a), x_{min}, x_{max}]}] + (0, a), a, Sequence[y_{min} + ((y_{max} - y_{min}) / N_P * i), i, 0, N_P]]]], Sequence[(10000, 10000), k, 1, 50]) → P2yyx
  5. If(lb1, RemoveUndefined[Join[Zip[Mirror[{Roots[f0(a, x), y_{min}, y_{max}]}, y = x] + (a, 0), a, Sequence[x_{min} + ((x_{max} - x_{min}) / N_P * i), i, 0, N_P]]]], Sequence[(10000, 10000), k, 1, 50]) → P1xxy
  6. Segment(B02, B01) → a
  7. Textfield(v_1) → inputBox2
  8. Textfield(f) → inputBox3
  9. Textfield(N_C) → inputBox1
  10. Textfield(x_{min}) → inputBox4
  11. Textfield(x_{max}) → inputBox5
  12. Textfield(y_{max}) → inputBox6
  13. Textfield(z_{max}) → inputBox7
  14. Textfield(y_{min}) → inputBox8
  15. Textfield(z_{min}) → inputBox9
  16. Point(a, 1 - zzii_B) → A
  17. Textfield(N_P) → inputBox10
  18. Sum(Sequence[If[f(x(PTest), y(PTest)) - f(x(Element[lr01, i]), y(Element[lr01, i])) > 0, 1, 0], i, 1, n]) → ext1
  19. Textfield(step) → inputBox12
  20. Function(f(a, b), a, x_{min} - 0.2, x_{max} + 0.2, b, y_{min} - 0.2, y_{max} + 0.2) → g
  21. Textfield(zoom_{3D}) → InputBox1
  22. Sequence((x(Element[lr01, i]), y(Element[lr01, i]), f(x(Element[lr01, i]), y(Element[lr01, i]))), i, 1, n) → lr013
  23. Sequence((x(Element[lr02, i]), y(Element[lr02, i]), f(x(Element[lr02, i]), y(Element[lr02, i]))), i, 1, n) → lr023
  24. RemoveUndefined(Sequence[If[f(x(PTest), y(PTest)) - f(x(Element[lr01, i]), y(Element[lr01, i])) > 0, i, NaN], i, 1, n]) → lr04
  25. Zip(Vector[b, a], a, Sequence[Element[lr01, Element[lr04, i]], i, 1, Length[lr04]], b, Sequence[Element[lr02, Element[lr04, i]], i, 1, Length[lr04]]) → lr06
  26. Zip(Vector[b, a], a, Sequence[Element[lr013, Element[lr04, i]], i, 1, Length[lr04]], b, Sequence[Element[lr023, Element[lr04, i]], i, 1, Length[lr04]]) → lr063
  27. Zip(Vector[a, b], a, Sequence[Element[lr01, Element[lr05, i]], i, 1, Length[lr05]], b, Sequence[Element[lr02, Element[lr05, i]], i, 1, Length[lr05]]) → lr07
  28. Zip(Vector[a, b], a, Sequence[Element[lr013, Element[lr05, i]], i, 1, Length[lr05]], b, Sequence[Element[lr023, Element[lr05, i]], i, 1, Length[lr05]]) → lr073
  29. RemoveUndefined(Sequence[If[f(x(PTest), y(PTest)) - f(x(Element[lr01, i]), y(Element[lr01, i])) > 0, i, (-i)], i, 1, n]) → lr04c
  30. Append(lr04c, Element[lr04c, 1]) → lr04cc
  31. Sum(Sequence[If[(Element[lr04cc, i] * Element[lr04cc, i + 1]) < 0, 1, 0], i, 1, n + 1]) → lr04ccc
  32. If(ext1 ≟ n, "Max", If[ext1 ≟ 0, "Min", If[(lr04ccc > 2) ∧ (lr04ccc ≤ 4), "saddle ? ", "?"]]) → TT1
  33. IntersectPath(o, g(x, y)) → s