# Showing separate surfaces

The XYZPipeJunction is removed using circular trig functions from Both.

Both = ContourPlot3D[
x^4 + y^4 + z^4 - (x^2 + y^2 + z^2)^2 + 3 (x^2 + y^2 + z^2) ==
3, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]

Dice = ContourPlot3D[
x^4 + y^4 + z^4 - (Cos[x] Cos[y] Cos[z])^2 +
3 (Cos[x] Cos[y] Cos[z]) == 3, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]


because for small arguments, $\cos x \cos y \cos z = 1- (x^2+y^2+z^2)/2.$

How to remove Dice from Both and keep only XYZPipeJunction? I believe only a small tweaking needed.

EDIT1

Changed to a more suitable Title

EDIT2:

I can do the RegionFunction. Taking liberty with the function itself to be plotted I wish to get it in changed trigonometric form without polynomials.It may involve small mathematics as indicated. Surfaces (Dice,within) are slightly different with such change in sectional view:

within = ContourPlot3D
x^4 + y^4 + z^4 - (x^2 + y^2 + z^2)^2 + 3 (x^2 + y^2 + z^2) ==
3, {x, -2, 2}, {y, -2, 2}, {z, -2, 2},
RegionFunction -> Function[{x, y, z}, x^2 + y^2 + z^2 < 1.5^2]]

Show[{Dice, within}, PlotRange -> {{-2, 0}, {0, 2}, {-2, 2}}]


So also "without" and next modified XYZpipeJunction, whose trig form is sought to be proposed or suggested could also be a bit different in shape/size.

EDIT 3

Apologies about clarity on this topic. I will clean the board and present it afresh with as much clarity as I can.Shall retain the above for a while for reference.

The surface

$$x^{2n} + y^{2n} + z^{2n} = 1$$

approximates towards a "dice" with corners getting more rounded with positive integer n increasing.

$$\cos x \cos y \cos z = a < 1$$

is also one such shape in the appropriate octant.It may be variously called a spheroid, a "deep" sphere, a non-linear spheroid.. etc.

For small arguments an approximation

$$\cos x \cos y \cos z = 1- (x^2+y^2+z^2)/2.$$

is valid, as do $\cos 2x , \cos 2y, \cos 2z..$ for fourth order approximations with doubled, quadrupled arguments that go to represent a multiplicity of surfaces.This is necessitated by the implicit nature of binding $F(x,y,z) = 0$

Now consider the following one such combined representation with such two sets of spheroids and Hexapods.. if you will. Due to their period $\pi$ ( inside and outside the Hexapods) separation of spheroids to Show separately is easier done than for Hexapods.

$$\cos 2 x \cos 2 y \cos 2 z - \cos x \cos y \cos z + \frac{1}{2} =0$$

C3[x_, y_, z_] = Cos[x] Cos[ y] Cos[ z] ;
ThreeSurfaces = ContourPlot3D[C3[2 x, 2 y, 2 z] - C3[x, y, z] + .5 == 0 , {x, -Pi, Pi}, {y, -Pi,Pi}, {z, -Pi, Pi}, PlotLabel -> Three Surfaces, PlotRange -> All]


My query is:

1) How far is "ThreeSurfaces" representative of "Both"? It is more to do with math.

2) How to put "Both" in implicit/periodic form, changing monotonic behavior at points far away from origin to periodic. This also is to do with math.

3) How to isolate and Show the Hexapod separately? to do with Mathematica. RegionFunction3D cannot be readily applied.

It is like gaming for creative fun, hope you enjoy ..

• use RegionFunction option of ContourPlot3D. – Stelios Jan 2 '15 at 14:02
• @Stelios: Sorry, corrected my typo. – Narasimham Jan 2 '15 at 14:23
• This is a poor, vague title, which will be of little use to others. A title that involves "RegionFunction in 3D" or similar phrase would be far more valuable. – David G. Stork Jan 2 '15 at 16:34
• By "trig form", do you mean to convert to spherical coordinates? The question seems to be changing, from one to which the answer was look up RegionFunction in the docs, to another....If the question is going to change that much, it's better to ask a new question. At least one other has evidently taken the trouble to explore your original question already. – Michael E2 Jan 2 '15 at 20:02
• This seems to have turned into yet another completely different question. – Rahul Jan 5 '15 at 19:02

without = ContourPlot3D[