Contour levels
- To: mathgroup at smc.vnet.net
- Subject: [mg83766] Contour levels
- From: sigmundv at gmail.com
- Date: Fri, 30 Nov 2007 05:15:26 -0500 (EST)
A few days ago a question was posted on how to extract the coordinates defining each of the contours returned by ContourPlot[]. Then I would like to ask if there is any way to also get the level they belong to? Let me illustrate the question by an example: If I plot the contours (or level curves) of the scalar function f(x,y) = x^2 + y^2 by using cplot = ContourPlot[x^2+y^2,{x,-1,1},{y,-1,1}] in Mathematica 6.0, I get a few circles. The points defining these circles are extracted as follows: Cases[First[cplot] // Normal, Line[pts_] -> pts, Infinity]; This returns a few lists, each containing a selection of points on a circle. Then my question is, if there is any way I can get the level to which each of these lists belong. That is, can I ask Mathematica which list of points belongs to f(x,y) = 0.4, for example, or, which level does a given list of points belong to? Kind regards, Sigmund Vestergaard