Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.6K Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Align / orient a 2D inset within a 3D graphic?

Anonymous User
Anonymous User
Posted 8 years ago

This is what I have gotten to work:

drawSphereRadius = 1/8;
Graphics3D[
 {
  Inset[Plot[x^2, {x, -1, +1}]],
  Sphere[{0, 0, 0}, drawSphereRadius],
  Sphere[{1, 0, 0}, drawSphereRadius],
  Sphere[{0, 1, 0}, drawSphereRadius]
  }
 ]

But it results in the 2D plot facing the viewer dead on. That isn't where I want the 2D plot; I want:

  • the origin of the parabola coincident with the sphere at the 3D origin;
  • the parabola to lie within the plane containing the three spheres;
  • the line splitting the parabola should contain the spheres at 0,0,0 and 0,1,0.

I have no idea how to translate by verbal description into the correct parameters for Inset[]. I have looked at the Inset-function manual page and the inset tutorial, but still unable to do this. Thank you.

POSTED BY: Anonymous User
4 Replies

Yes, you guessed right about the Inset parameters. The remaining two spheres go into place with ViewPoint -> Above. You can still make more fine-tuning of the size parameter of Inset, which is almost but not exactly right already.

POSTED BY: Gianluca Gorni
Anonymous User
Anonymous User
Posted 8 years ago

Thanks again.

POSTED BY: Anonymous User

This may be a way:

drawSphereRadius = 1/8;
Graphics3D[{Inset[Plot[x^2, {x, -1, +1}], {0, 0, 0}, {0, 0}], 
  Sphere[{0, 0, 0}, drawSphereRadius], 
  Sphere[{1, 0, 0}, drawSphereRadius], 
  Sphere[{0, 1, 0}, drawSphereRadius]}, ViewPoint -> Above]

Otherwise

Show[ParametricPlot3D[{x, x^2, 0}, {x, -1, 1}], 
 Graphics3D[{Sphere[{0, 0, 0}, drawSphereRadius], 
   Sphere[{1, 0, 0}, drawSphereRadius], 
   Sphere[{0, 1, 0}, drawSphereRadius]}], PlotRange -> All]
POSTED BY: Gianluca Gorni
Anonymous User
Anonymous User
Posted 8 years ago
POSTED BY: Anonymous User
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard