0
$\begingroup$

I have the following code

f[x_, y_, \[Alpha]_: 0] := x^3 - y^3 + 3 \[Alpha] x y
Manipulate[Plot3D[f[x, y, \[Alpha]], {x, -10, 10}, {y, -10, 10}], {\[Alpha],-5,5, 1}]

and I want to mark the points f[0,0,\[Alpha]] and f[1,-1,\[Alpha]] in the graph. I saw some other questions similar to this one but it doesnt deal with interactive content so in all cases I searched in the forum the solutions have static variables that cant be applied to this case.

I will be glad if some one shows me how to add these points to the graph. Thank you.

$\endgroup$

1 Answer 1

2
$\begingroup$

The interactivity doesn't really change anything. Just use Show in the standard way:

f[x_, y_, α_: 0] := x^3 - y^3 + 3 α x y;
Manipulate[
 Show[
  Plot3D[f[x, y, α],
   {x, -10, 10}, {y, -10, 10}],
  Graphics3D[
   {
    AbsolutePointSize[15],
    Point[{
      {0, 0, f[0, 0, α]},
      {1, -1, f[1, -1, α]}
      }]
    }
   ]
  ],
 {α, -5, 5, 1}
 ]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.