3
$\begingroup$

How can I have two overlapped spheres given by

Graphics3D[{Specularity[White, 50], Blue, Sphere[{0.0, 0, 0}, 1.0], 
Green, Sphere[{.7, 0, .7}]}, Lighting -> "Neutral", Boxed -> False]

enter image description here

in a such way that the result contains one sphere (for example the green one) as

enter image description here

and another (blue one) as

enter image description here

However, these spheres are drawn by another software, and their difference is related to distances between lines on the surfaces.

$\endgroup$
  • $\begingroup$ Use ParametricPlot3D[] instead if you really want mesh lines. $\endgroup$ – J. M. is away Nov 9 '15 at 7:17
  • $\begingroup$ How can I penetrate them to each other with parametricplot3D? $\endgroup$ – Unbelievable Nov 9 '15 at 7:24
  • $\begingroup$ How about this demonstration demonstrations.wolfram.com/… ? $\endgroup$ – Lotus Nov 9 '15 at 13:31
2
$\begingroup$

You can use the following function based on SphericalPlot3D with Mesh -> Full and Mesh -> All options

ClearAll[sphere]

sphere[pos_, r_, mesh_, style_, points_: 20] := 
  GeometricTransformation[
   First@SphericalPlot3D[r, {θ, 0, Pi}, {ϕ, 0, 2 Pi}, Mesh -> mesh, 
     MaxRecursion -> 0, PlotPoints -> points, PlotStyle -> Directive[style]], 
   TranslationTransform[pos]];

Graphics3D[{sphere[{0.0, 0, 0}, 1, All, {Specularity[White, 50], Blue}], 
  sphere[{.7, 0, .7}, 1, Full, {Specularity[White, 50], Green}]}, 
 Lighting -> "Neutral", Boxed -> False]

enter image description here

$\endgroup$
1
$\begingroup$

You might want to start with something like the following:

ParametricPlot3D[
  {Sin[u] Cos[v], Cos[u] Cos[v], Sin[v]}, {u, -Pi, Pi}, {v, -Pi, Pi},
  Mesh -> {45, 45}, PlotStyle -> White, Lighting -> "Neutral"
]

ParametricPlot3D[
  {0.8 + Sin[u] Cos[v], 0.8 + Cos[u] Cos[v], Sin[v]}, {u, -Pi, Pi}, {v, -Pi, Pi},
  Mesh -> {15, 19}, PlotStyle -> Directive[White, Opacity[0.5]], 
  Lighting -> {{"Ambient", RGBColor[0.9, 0.8, 0.9]}}
]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Besides so much thanks, I am trying to use of your answer to intersect two spheres. $\endgroup$ – Unbelievable Nov 9 '15 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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