Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: ContourPlot and finite approximation to level sets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68653] Re: [mg68629] ContourPlot and finite approximation to level sets
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Mon, 14 Aug 2006 06:44:39 -0400 (EDT)
  • References: <200608130952.FAA06266@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Let my bumbling converted to experience be your guide:

It is possible to extract contours from graphs, though you should
remember that the contour lines are only approximate. If your function
is complicated, you may want to try a numerical solution for the
contour. Also, be careful that you aren't trying to obtain a contour
from a (fine grained) discrete function that doesn't actually take on
the value of your contour.

Here is an example of contour extraction:
In[1]:=
f[x_,y_]=((x-1)/3)^2+((y-1)/2)^2
In[2]:=
Reap[Graphics@
        ContourPlot[f[x,y],{x,-5,6},{y,-5,5},Contours\[Rule]{2},
          ContourShading\[Rule]False]/.xpr:Line[___]\[RuleDelayed]
        Sow[xpr]][[2]]

You may also want to look at InequalityPlot and ImplicitPlot.


On 8/13/06, dkjk at bigpond.net.au <dkjk at bigpond.net.au> wrote:
> Hi all,
>
> Given a real-valued function f(x,y) over {(x,y) | xmin < x < xmax, ymin
> < y < ymax}, ContourPlot can be used to generate the graph of the level
> set { (x,y) | f(x,y) = c } using
>
> ContourPlot[f[x,y],{x,xmin,xmax},{y,ymin,ymax},Contours->{c},ContourShading->False].
>
> Is there any way to access the coordinates used by Mathematica to paint
> the contour line of height c? If not, can anyone suggest an algorithm,
> such as the one used by Mathematica, to finitely approximate a level
> set?
>
> Thanks very much in advance,
>
> James
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: using answer form reduce
  • Next by Date: more complex Hadamard-Sylvester Matric Self -Similar constructions
  • Previous by thread: ContourPlot and finite approximation to level sets
  • Next by thread: Re: ContourPlot and finite approximation to level sets