# Particle moving on curve which is the intersection of a surface and a plane

Surface

z = 2 x^3 - 5 y^4


Plane

z = x + y + 5


Plot A curve is formed by the intersection of the surface and the plane. I would like to add a point to the plot that can be moved by the user along the curve of intersection.

Thanks!!!

to work animation, i had to change line

anim = Table[ Show[p3D, Graphics3D[{PointSize[0.02], Point[par[j]]}], ViewPoint -> {-1, -1, 1}], {j, -10, 10, 0.1}];

to:

Animate[Show[p3D,Graphics3D[{PointSize[0.02],Point[par[j]]}],ViewPoint->{-1,-1,1}],{j,-10,10,0.1}]

But where is equation of motion of the material point in this solution?

• And have you looked up the documentation page for Manipulate? – march Jun 14 '16 at 22:46
• Fully agree with @march. Try to use Solve to figure out the function of crossing, then use Manipulate to show it. – Wjx Jun 14 '16 at 23:33
• You can format inline code and code blocks by selecting the code and clicking the {} button above the edit window. The edit window help button ? is also useful for learning how to format your questions and answers. You may also find this meta Q&A helpful – Michael E2 Jun 18 '16 at 22:27

You can use MeshFunctions to visualize the intersection. The following is one way to parametrize curve.

f[x_, y_] := 2 x^3 - 5 y^4;
p[x_, y_] := x + y + 5;
expr = x /. Quiet[First@Solve[f[x, y] == p[x, y], {x, y}, Reals]];
t[u_] := expr /. y -> u;
par[w_] := {t[w], w, p[t[w], w]};
p3D = Plot3D[{f[x, y], p[x, y]}, {x, -20, 20}, {y, -10, 10},
MeshFunctions -> (f[#1, #2] - p[#1, #2] &), Mesh -> {{0}},
MeshStyle -> {Red, Thick}, PlotStyle -> Opacity[0.5]];
anim = Table[
Show[p3D, Graphics3D[{PointSize[0.02], Point[par[j]]}],
ViewPoint -> {-1, -1, 1}], {j, -10, 10, 0.1}]; 