Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: extracting contour points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92491] Re: extracting contour points
  • From: "David Park" <djmpark at comcast.net>
  • Date: Wed, 1 Oct 2008 18:34:15 -0400 (EDT)
  • References: <gbulri$ld4$1@smc.vnet.net>

I don't see two lines, but only one line.

f[p_, a_, x_] = -p x + x^(a + 1);

contourpoints =
 First[ContourPlot[
      Arg[f[1, .6, x + I y]] == 0, {x, -2, 2}, {y, -2, 2}]] /.
    GraphicsComplex[pts_, data_] -> pts // Chop // Union
{{1.00552, 0}, {1.01786, 0}, {1.02653, 0}, {1.02653, 0}, {1.05408,
  0}, {1.07143, 0}, {1.10714, 0}, {1.12551, 0}, {1.14286,
  0}, {1.17857, 0}, {1.21429, 0}, {1.25, 0}, {1.28571, 0}, {1.32143,
  0}, {1.3398, 0}, {1.35714, 0}, {1.39286, 0}, {1.42857, 0}, {1.46429,
   0}, {1.5, 0}, {1.57143, 0}, {1.64286, 0}, {1.71429, 0}, {1.78571,
  0}, {1.85714, 0}, {2., 0}}

ListPlot[contourpoints, Frame -> True, Axes -> False]



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


"peterp" <peterp at m.njit.edu> wrote in message 
news:gbulri$ld4$1 at smc.vnet.net...
> Hello all,
>
> I've searched the group but I still have a problem. The contour sought
> below returns two lines (you can actually see them on the graphic output).
> The commands after the contour plot only extract the coordinates of one
> of the two lines. How do I get the second ?
> I tried replacing "First" by "Second" but no dice.
>
> Thanks,
> Peter
>
> f[p_, a_, x_] = - p x + x^(a + 1)
>
> contour =
>  ContourPlot[Arg[f[1, .6, x + I y]], {x, -2, 2}, {y, -2, 2}, Contours
> -> {0},
>     ContourShading -> False, PlotPoints -> 100]
>
> grcontour = Graphics[contour];
> InputForm[grcontour];
> lns = First[
>      Cases[First[grcontour] // Normal, Line[pts_] -> pts, \
> [Infinity]]];
> dat = Table[lns];
> Export["junk.dat", Re[dat]]
> 



  • Prev by Date: Re: signs in the mathematica output
  • Next by Date: Re: data source for demonstration
  • Previous by thread: Re: extracting contour points
  • Next by thread: Re: extracting contour points