# Hide a part of a graph

How to hide a part of a torus. I mean in the following torus

ParametricPlot3D[{ (3 + Cos[v]) Sin[u], (3+ Cos[v]) Cos[u], Sin[v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi}]

I want to hide the shaded part

• Try {u, -Pi/8, Pi/8}. Is that what you mean? – Rohit Namjoshi Jun 20 '19 at 5:33

Simplest way is to change the u range as suggested by Rohit in comments.

Using RegionFunction:

ParametricPlot3D[{(3 + Cos[v]) Sin[u], (3 + Cos[v]) Cos[u],
Sin[v]}, {u, -Pi, Pi}, {v, 0, 2 Pi},
RegionFunction -> (-Pi + Pi/16 <= #4 <= Pi - Pi/16 &)]


ParametricPlot3D[{(3 + Cos[v]) Sin[u], (3 + Cos[v]) Cos[u],
Sin[v]}, {u, -Pi, Pi}, {v, 0, 2 Pi}, MeshFunctions -> {#4 &},
Mesh -> {{-Pi + Pi/16, Pi - Pi/16}},
Axes -> False, Boxed -> False]


• Thanks! Can I also remove the frame box and the axes? I mean I only need the torus! – user21210 Jun 20 '19 at 5:58
• I actually got another question here. I would like to have the wrapping line (ParametricPlot3D[{Cos[Sqrt[2] t](3 + Cos[t]), Sin[Sqrt[2] t] ( 3+Cos[t]),Sin[t]}, {t, 0, 50}}) only on the shown part of the torus above. Can I do that? Thanks a lot ! – user21210 Jun 20 '19 at 6:29
• @AbdelRahmanAl-Amrat, can think of a quick answer b/c the scales are not the same. – kglr Jun 20 '19 at 7:37
• I have tried to modify the picture based on your answer to this question. I am sorry, I thought the idea of doing things in Mathematica is the same always. I asked a new question about animation again including the situation above. If you can help me in answering this new question that would be very great.. Thank you so much! mathematica.stackexchange.com/questions/200699/… – user21210 Jun 20 '19 at 21:15