4
$\begingroup$

I am trying to make a 3D contour plot of a complicated function over a large parameter range, and I am struggling a bit to make it compute nicely and in a reasonable length of time: more specifically, if I chop the range into chunks then I can get those in a reasonable time, but if I go for the whole range then it takes ages, and I'm struggling to get a good compromise between recursion / PlotPoints / timing.

However, I can get an almost good enough plot by just joining together the different chunks of the parameter range, including them inside a single Show:

Show[{
  ContourPlot3D[
   (x - 2 Cos[z])^2 + (y - 2 Sin[z])^2
   , {x, -4, 4}, {y, -4, 4}, {z, 0, π}
   , Contours -> {1}
   , Mesh -> None
   ],
  ContourPlot3D[
   (x - 2 Cos[z])^2 + (y - 2 Sin[z])^2
   , {x, -4, 4}, {y, -4, 4}, {z, π, 2 π}
   , Contours -> {1}
   , Mesh -> None
   ]
  }
 , PlotRange -> All
 , BoxRatios -> {1, 1, 2}
 , ViewVertical -> {0, 1, 0}
 , ImageSize -> 600
 ]

Mathematica graphics

However, that still leaves a mark where the two chunks get welded.

Is it possible to do this join seamlessly?

$\endgroup$
0

1 Answer 1

5
$\begingroup$

Using the option BoundaryStyle -> None in both ContourPlots give

enter image description here

$\endgroup$
1
  • $\begingroup$ Ah, that's where it was. Thanks =). $\endgroup$ Aug 9, 2018 at 13:40

Your Answer

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

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