# federgraph-special-sample-maxima

Oct 17th, 2014
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. /* federgraph-special-sample-maxima
2. see federgraph.blogspot.de
3. */
4.
5. kill(all)\$
6.
7. a1: (x-x1)^2 + (y-y1)^2\$
8. a2: (x-x2)^2 + (y-y2)^2\$
9. a3: (x-x3)^2 + (y-y3)^2\$
10.
11. t1: sqrt(a1)\$
12. t2: sqrt(a2)\$
13. t3: sqrt(a3)\$
14.
15. f1: (t1-l)\$
16. f2: (t2-l)\$
17. f3: (t3-l)\$
18.
19. u1: f1 * (x-x1) / t1\$
20. u2: f2 * (x-x2) / t2\$
21. u3: f3 * (x-x3) / t3\$
22.
23. v1: f1 * (y-y1) / t1\$
24. v2: f2 * (y-y2) / t2\$
25. v3: f3 * (y-y3) / t3\$
26.
27. u: u1 + u2 + u3\$
28. v: v1 + v2 + v3\$
29.
30. z: sqrt(u^2 + v^2);
31.
32. /* equilateral triangle with side length a
33. h = height
34. ro = outer circle
35. ri = inner circle
36. */
37.
38. /* side length of triangle defined */
39. a: 100\$
40.
41. h: sqrt(3)/2 * a\$
42. ri: sqrt(3)/3 * a\$
43. ro: sqrt(3)/6 * a\$
44.
45. /* constant triangle coordinates */
46. x1: -ri\$
47. x2: -ri\$
48. x3: ro\$
49. y1: -a/2\$
50. y2: a/2\$
51. y3: 0\$
52.
53. /* Parameter l is the original length of the springs.
54. All springs have the same original length.
55. We are exploring a special case where the minimum for z
56. touches the floor. It value of l is between 83 and 84.
57. But what is the exact value of l in terms of a?
58. ===============================================
59. And what is the x-value of the touchdown?
60. */
61. l: 83.5\$
62.
63. /* We examination of a cross section through surface. */
64. y: 0\$
65.
66. /* The cross section gives us a 2D plot for the special case. */
67. plot2d(z, [x, -100, 100])\$