MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Plot3D, show and text

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98334] RE: [mg98311] Plot3D, show and text
  • From: "David Park" <djmpark at comcast.net>
  • Date: Mon, 6 Apr 2009 05:02:30 -0400 (EDT)
  • References: <7354553.1238930437040.JavaMail.root@n11>

Here is a solution using the Presentations package. This gives you real 3D
text that is in the right position, rotates with the image, and hides behind
surfaces. You can also easily add any other items to the graphic. The 3D
text can be rotated, styled with Style, and scaled.

Needs["Presentations`Master`"]

Draw3DItems[
 {(* Draw the surface *)
  Draw3D[-8 (x^2 + y^2) + (x^2 + y^2)^2, {x, -3, 3}, {y, -3, 3},
   Mesh -> None,
   RegionFunction -> Function[{x, y, z}, x^2 + y^2 < 9 && x < 2],
   MaxRecursion -> 3],
  (* Draw the labels with Text3D *)
  Black,
  VerticalText3D["abc", {1, 1, 2}, 90 \[Degree], {.2, 1}],
  VerticalText3D["def", {2, 2, 4}, 90 \[Degree], {.2, 1}]
  (* Draw any other objects that you wish... *)},
 NiceRotation,
 Boxed -> False,
 BoxRatios -> {3, 4, 2},
 Axes -> True,
 AxesOrigin -> {0, 0, -16.5},
 ImageSize -> 500
 ]


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


From: Marc ESCALIER [mailto:marc.escalier at dbmail.com] 

Hello,

Is there an expert over there, who would able to add, using mathematica:
a text "abc" at position "1,1,2" and
a text "def" at position "2,2,4", by :

keeping same looking at the original plot (no changing of ratio x, y, z)
keeping Show (because i need to put other stuff inside)

Show[Plot3D[-8*(x*x+y*y)+(x*x+y*y)*(x*x+y*y),{x,-3,3},{y,-3,3},BoxRatios-=
>{3,4,2},Mesh->None,ClippingStyle->None,RegionFunction->Function[{x,y,z},=
x^2+y^2<9 && x<2],Boxed->False,Axes->True,AxesOrigin->{0,0,-16.5}]

thank you




  • Prev by Date: Re: Plot3D, show and text
  • Next by Date: Re: Is there a BNF for Mathematica?
  • Previous by thread: Re: Plot3D, show and text
  • Next by thread: Re: Can nobody help me? Re: selecting a column in a grid