I just added `coordinates`, which lets you access the coordinates of the 
contour lines as follows:

```
c = contours(x,y,z,0) # get contour level at z==0
for line in c.lines # line is a Curve2, which is basically a wrapper around 
a Vector{Vector2}
    xs, ys = coordinates(line)
    plot(xs,ys) # or whatever you want to do with them
end
```

I've tagged a new version and pushed to METADATA, so `Pkg.update()` from 
the REPL should give you this update.

// T

On Tuesday, July 8, 2014 12:37:32 AM UTC+2, Simon Danisch wrote:
>
> Well for GLPlot, Vector{Vector2} is just perfect ;)
> Color information could be given via a color map for the iso values, or 
> just another Vector{Union(Vector3/4, ColorValue/AlphaColorValue)}
>
>
>
> Am Sonntag, 29. Juni 2014 00:34:28 UTC+2 schrieb Tomas Lycken:
>>
>> Huzzah!
>>
>> We’ve just released Contour.jl <https://github.com/tlycken/Contour.jl>, 
>> a light-weight package that provides an algorithm to calculate iso-lines of 
>> a scalar 2D-field f(x,y), such as those shown on a contour plot. The 
>> current implementation uses the Marching Squares 
>> <http://en.wikipedia.org/wiki/Marching_squares> algorithm, and returns 
>> the contour lines in an array of ContourLevel instances, that provide an 
>> abstraction over the actual implementation of curves as geometrical 
>> objects. Currently lists of Vector2s from ImmutableArrays are used to 
>> represent curves, but the idea is that if e.g. a package with general 
>> geometry items emerges, we can seemlessly switch to that.
>>
>> Our hopes is that other packages that have use for isolines (e.g. all 
>> plotting packages that want to plot contours) use this package instead of 
>> each carrying their own implementation, but use cases are of course not 
>> limited to plotting. (I wanted to put this together because I needed to 
>> calculate volumes inside axisymmetric isosurfaces, and this solved a large 
>> part of that problem…)
>>
>> Please, kick the tires and see what you can do with this! =)
>>
>> Finally, a big thanks to Darwin Darakananda 
>> <https://github.com/darwindarak>, who’s done almost all the coding.
>>
>> // Tomas
>> ​
>>
>

Reply via email to