MathGroup Archive 2009

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

Search the Archive

Re: How to get plot Exclusions for a numerical function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102563] Re: How to get plot Exclusions for a numerical function?
  • From: antononcube <antononcube at gmail.com>
  • Date: Fri, 14 Aug 2009 05:58:52 -0400 (EDT)
  • References: <h60ert$pj8$1@smc.vnet.net>

You might find the following code to be useful:

(* This defines a numerical function with a discontinuity *)
f[x_?NumericQ, y_?NumericQ, z_?NumericQ] := If[x^2 + y^3 - 2 x y + 0.1
> x z, 0, 1];

(* Using NIntegrate to get the sampling points of a global adaptive
integrator.
The sampling points will be clustered around the discontinuity.  *)
Clear[c, x, y, z]
c = 2;
rng = Rescale[Range[1, 2], {-c, c}];
pnts = Reap[
     NIntegrate[
      f[x, y, z], {x, -c, c}, {y, -c, c}, {z, -c, c} // Evaluate,
      MinRecursion -> 3, MaxRecursion -> 4, PrecisionGoal -> 4,
      EvaluationMonitor :>
       Sow[{x, y, z},
        Method -> {GlobalAdaptive, SingularityHandler -> None,
          Method -> {TrapezoidalRule, Points -> 5},
          SymbolicProcessing -> 0}]]][[2, 1]]; // AbsoluteTiming

(* Plot the points using small point size. Rotate the plot... *)
Graphics3D[{PointSize[0.00051], Point[pnts]}]



On Aug 13, 3:20 am, asdf qwerty <bradc355... at yahoo.com> wrote:
> I have a complex analytic function that I'm computing numerically, and
> it has branch cuts along arbitrary curves that I can't know
> beforehand. Does anyone have any ideas on how I can get Exclusions-
> like functionality from Plot3D for this case?
>
> With the allowed form "Exclusions -> {{lhs = rhs, ineqs}, ...}", I
> can't think of an easy way to do it numerically... maybe something
> like "Exclusions -> {{True, <something clever>}}"? Has anyone tackled
> this problem before?



  • Prev by Date: Re: Bug: ListPlot and Tooltip
  • Next by Date: ListLogLinearPlot with two y-axis
  • Previous by thread: How to get plot Exclusions for a numerical function?
  • Next by thread: Re: How to get plot Exclusions for a numerical function?