       Re: SphericalPlot3D: shifting the origin

• To: mathgroup at smc.vnet.net
• Subject: [mg101742] Re: [mg101705] SphericalPlot3D: shifting the origin
• From: "David Park" <djmpark at comcast.net>
• Date: Thu, 16 Jul 2009 08:15:24 -0400 (EDT)
• References: <20263497.1247656892881.JavaMail.root@n11>

```This is easy with the Presentations package. This is because we just draw
one thing after another, mixing in any other primitives wanted. And since we
are dealing directly with the primitives it is easy to do geometric
transformations such as a translation. Here is an example with two spherical
plots.

Needs["Presentations`Master`"]

Draw3DItems[
{ColorData["Legacy"]["ManganeseBlue"],
SphericalDraw3D[(Sin[\[Theta]] Cos[\[Phi]]) (Sin[\[Theta]] Sin[\
\[Phi]]), {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi},
Mesh -> False],
ColorData["Legacy"]["CornflowerBlue"],
SphericalDraw3D[(1 + 2 Cos[2 \[Theta]])/6, {\[Theta], 0,
Pi}, {\[Phi], 0, 2 Pi},
Mesh -> False] // TranslateOp[{1, 0, 0}]},
NeutralLighting[0, .5, .1],
NiceRotation,
Boxed -> False,
ImageSize -> 400]

I'm certain this can also be done within regular Mathematica using Show, but
it is not so easy and I'll leave it to someone else to figure it out.

David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/

From: Dmitry [mailto:dpesin at gmail.com]

Hello,

I am plotting d-orbitals using SphericalPlot3D, here is the code for
the xy orbital:

SphericalPlot3D[(Sin[\Theta] Cos[\Phi])(Sin[\Theta]Sin[\Phi]), {\
[Theta], 0,
Pi}, {\[Phi], 0, 2 Pi}, Mesh -> False, Axes -> False,
Boxed -> False, PlotRange -> All];

I would like to be able to show two of such orbitals displaced by some
vector. Is there a simple way to do it, without having to solve for R
(\Theta,\Phi) for a displaced orbital?

Thanks,
Dmitry

```

• Prev by Date: Problems with Complie and generating a nested list
• Next by Date: Re: Re: Refine, assumptions, domains
• Previous by thread: SphericalPlot3D: shifting the origin
• Next by thread: inputing nothing in a manipulate box