I am plotting a surface using ParametricPlot3D. Is there a way that only the region with negative Gaussian curvature is plotted?
1 Answer
$\begingroup$ $\endgroup$
1 There is a ResourceFunction that can compute Gaussian curvature which allows you to incorporate the comment by Ulrich Neumann
Clear[surf, curv] surf[u_, v_] = ResourceFunction["Cyclide"][.3, 1.5, {u, v}]; curv[u_, v_] = ResourceFunction["GaussianCurvature"][#, {u, v}] &@surf[u, v]; ParametricPlot3D[ surf[u, v], {u, -\[Pi], \[Pi]}, {v, -2 \[Pi], 2 \[Pi]}, RegionFunction -> Function[{u, v}, curv[u, v] < 0]] - $\begingroup$ In version 14.3,
RegionGaussianCurvaturebecame a system function. $\endgroup$Domen– Domen2025-08-11 14:21:47 +00:00Commented Aug 11 at 14:21

RegionFunction! It would be very helpful if you provide a minimal example. $\endgroup$ParametricPlot3D[ ResourceFunction["Cyclide"][.3, 1.5, {u, v}], {u, -\[Pi], \[Pi]}, {v, -2 \[Pi], 2 \[Pi]}]and I only wanted to plot the regions with negative Gaussian curvature. I wasn't sure how to use RegionFunction. thank you for your reply! $\endgroup$curv[u,v]tryParametricPlot3D[…,RegionFunction->Function[{u,v},curv[u,v]<0]]$\endgroup$