1
$\begingroup$

I have a plot of a tennis racket hitting a tennis ball

sur[r_, phi_] := {1.4*r*Sin[phi], r*Sin[phi]*Cos[phi], 0};
gauss[x_, y_] := {0, 0, 1/5*Exp[-((x - 0.6)^2 + (y/1.5)^2)/0.02]};
handle = ParametricPlot3D[{u, 0, 0}, {u, 0, -0.2}, PlotStyle -> {Black, Thickness[0.007]}];
surfacegraph = ParametricPlot3D[sur[r, phi] + gauss[r*Sin[phi], r*Cos[phi]], {r, 0, 1}, {phi, 0,Pi}];
boundary = ParametricPlot3D[sur[1, phi], {phi, 0, Pi}, PlotStyle -> {Black, Thickness[0.007]}];
Show[handle, surfacegraph, boundary, PlotRange -> {{-0.5, 2}, {-0.6, 0.6}, {0, 0.3}},PlotRangeClipping -> False, Boxed -> False, Axes -> False]

How can I draw a Cartesian mesh on the racket? I tried playing around with FaceGrid, but could not make it work.

enter image description here

$\endgroup$
1
  • $\begingroup$ @kglr Works indeed. Many thanks! $\endgroup$
    – 220284
    Jan 21, 2021 at 13:09

1 Answer 1

3
$\begingroup$

Add the options MeshFunctions {# &, #2 &, #3 &} and Mesh -> 10 when you create surfacegraph:

surfacegraph = ParametricPlot3D[sur[r, phi] + gauss[r*Sin[phi], r*Cos[phi]],
   {r, 0, 1}, {phi, 0, Pi}, 
   MeshFunctions -> {# &, #2 &, #3 &}, Mesh -> 10];

Show[handle, surfacegraph, boundary, 
  PlotRange -> {{-0.5, 2}, {-0.6, 0.6}, {0, 0.3}}, 
  PlotRangeClipping -> False, Boxed -> False, Axes -> False, 
  ImageSize -> Large]

enter image description here

Note: Default setting for the option MeshFunctions for ParametricPlot3D is {#4&} or {#4&, #5&}.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.