MathGroup Archive 2008

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

Search the Archive

Re: Adding markers on the surface of a Plot3D?


a) yes you are right, it' cant be done :

fun[x_, y_] := Sin[x*y]

  plt = Plot3D[fun[x, y], {x, -Pi, Pi}, {y, -Pi, Pi}];
   xline = ParametricPlot3D[{x, yc, fun[x, yc]}, {x, -Pi, Pi}];
   yline = ParametricPlot3D[{xc, y, fun[xc, y]}, {y, -Pi, Pi}];
     Sphere[{xc, yc, fun[xc, yc]}, 0.1], {AbsoluteThickness[4],
      RGBColor[1, 0, 0], xline[[1]], yline[[1]]}}],
   {{xc, 0}, -Pi, Pi}, {{yc, 0}, -Pi, Pi}

and an other impossible example

fun[x_, y_] := Exp[-x^2 - y^2]

  plt = Plot3D[fun[x, y], {x, -Pi, Pi}, {y, -Pi, Pi},
    PlotStyle -> Opacity[0.5], PlotRange -> All];
   pnt = Append[xy, fun @@ xy];
   Graphics3D[{plt[[1]], Line[{Append[xy, 0], pnt}],
     Sphere[pnt, 0.1], {AbsoluteThickness[4], RGBColor[1, 0, 0],
      Line[{pnt, pnt*{1, 1, 2}}]}}, PlotRange -> All],
   {{xy, {0, 0}}, Slider2D}


Show[] evaluates to a Graphics[]/Graphics3D[] and the FrontEnd
show this graphics lik it show you the result of Expand[(x+1)^1000]
but in older Mathematica versions the FrontEnd need an other program
to display the PostScript and Show[] had a side effect that it paste
a rendered image in the Notebook.


AES wrote:
> I'd like to highlight the two mesh lines that pass through a certain 
> central point -- let's call it the point {xc,yc} -- on a Plot3D by 
> thickening those two lines relative to the other mesh lines, or giving 
> them a distinctive color, or . . . 
> Or put a dot on the surface at the point {xc, yc, f[xc,yc]} to identify 
> this location on the surface . . .
> Or run a vertical "post" up through that point using something like 
> Line[{xc, yc, 0}, {xc, yc, 2*f[xc,yc]}}] (with the part of the post 
> below the surface not being seen if you look at the surface from 
> above) . . .
> I think I've so far tested and confirmed every possible way in which 
> each of these tasks _can't_ be done . . .
> [And would someone want to help me understand _why_  the 
> Show[ - - - - -] command (followed by a semicolon) no longer works, or 
> can no longer be used, as one of a sequence of multiple expressions 
> within a longer cell?  And why it can't even have a semicolon following 
> it as the last line in a cell?  I just can't envision the logic of why 
> this was a necessary (or optional?) interface design decision -- isn't 
> Show[---] an expression?]

  • Prev by Date: Re: Adding markers on the surface of a Plot3D?
  • Next by Date: Re: Inequalities or histogram or something.......
  • Previous by thread: Re: Adding markers on the surface of a Plot3D?
  • Next by thread: Re: Re: Adding markers on the surface of a Plot3D?