{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaGeometry/VoronoiDelaunay.jl/issues/11","labels_url":"https://api.github.com/repos/JuliaGeometry/VoronoiDelaunay.jl/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/JuliaGeometry/VoronoiDelaunay.jl/issues/11/comments","events_url":"https://api.github.com/repos/JuliaGeometry/VoronoiDelaunay.jl/issues/11/events","html_url":"https://github.com/JuliaGeometry/VoronoiDelaunay.jl/issues/11","id":60153671,"number":11,"title":"How to work with Voronoi tessellations","user":{"login":"robertdj","id":5703657,"avatar_url":"https://avatars.githubusercontent.com/u/5703657?v=3","gravatar_id":"","url":"https://api.github.com/users/robertdj","html_url":"https://github.com/robertdj","followers_url":"https://api.github.com/users/robertdj/followers","following_url":"https://api.github.com/users/robertdj/following{/other_user}","gists_url":"https://api.github.com/users/robertdj/gists{/gist_id}","starred_url":"https://api.github.com/users/robertdj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertdj/subscriptions","organizations_url":"https://api.github.com/users/robertdj/orgs","repos_url":"https://api.github.com/users/robertdj/repos","events_url":"https://api.github.com/users/robertdj/events{/privacy}","received_events_url":"https://api.github.com/users/robertdj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaGeometry/VoronoiDelaunay.jl/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-06T20:23:03Z","updated_at":"2015-03-09T18:57:30Z","closed_at":null,"body":"Hi,\r\n\r\nThis looks like just the package I need: \r\nI want to compute a Voronoi tessellation and then the area of each (bounded) cell.\r\n\r\nHowever, playing around with the examples in the README there are some things I don't understand:\r\n\r\n- The command `tess = DelaunayTessellation()` seems to produce the same output if I provide a `sizehint` input.\r\n- Can I extract individual points from `tess`?\r\n- After calling `voronoiedges`, can I extract the corners of a given cell?\r\n\r\nCan you help me out?\r\n\r\nThanks,\r\n\r\nRobert"},"comment":{"url":"https://api.github.com/repos/JuliaGeometry/VoronoiDelaunay.jl/issues/comments/77918934","html_url":"https://github.com/JuliaGeometry/VoronoiDelaunay.jl/issues/11#issuecomment-77918934","issue_url":"https://api.github.com/repos/JuliaGeometry/VoronoiDelaunay.jl/issues/11","id":77918934,"user":{"login":"skariel","id":2347816,"avatar_url":"https://avatars.githubusercontent.com/u/2347816?v=3","gravatar_id":"","url":"https://api.github.com/users/skariel","html_url":"https://github.com/skariel","followers_url":"https://api.github.com/users/skariel/followers","following_url":"https://api.github.com/users/skariel/following{/other_user}","gists_url":"https://api.github.com/users/skariel/gists{/gist_id}","starred_url":"https://api.github.com/users/skariel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skariel/subscriptions","organizations_url":"https://api.github.com/users/skariel/orgs","repos_url":"https://api.github.com/users/skariel/repos","events_url":"https://api.github.com/users/skariel/events{/privacy}","received_events_url":"https://api.github.com/users/skariel/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T18:57:30Z","updated_at":"2015-03-09T18:57:30Z","body":"hi, sorry for the late reply, for some reason I was not notified when you opened this issue.\r\n\r\nAbout your questions:\r\n\r\n* Indeed `tess = DelaunayTessellation()` will produce the same output regardless of the `sizehint` input. The `sizhint` is intended to affect only performance aspects\r\n* You can extract individual points from `tess`, for e.g by iterating over the triangles or by just keeping a copy of the points that you pushed inside, I'm not completely sure what you mean here...\r\n* By iterating over `voronoiedges` you get the corners of all cells, but I believe you want to ask how to get all corners of a specific cell. This package gives all the basic functionality needed to do this but currently there is no high level method to do this, so you'd have to do this yourself, it should not be very hard to achieve: just use a point type with an index, and then when you iterate over all voronoi cell edges with `voronoiedges` put the corresponding corners (point a and b) into some other data structure, something alond these lines:\r\n\r\n```Julia\r\nfor edge in voronoiedges(tess)\r\n    a = geta(edge)\r\n    b = getb(edge)\r\n    gen_a = getgena(edge)\r\n    gen_b = getgenb(edge)\r\n    \r\n    # push corners to cell a\r\n    push!(celledges[gen_a.index], a)\r\n    push!(celledges[gen_a.index], b)\r\n\r\n    # push corners to cell b\r\n    push!(celledges[gen_b.index], a)\r\n    push!(celledges[gen_b.index], b)\r\nend\r\n``` \r\nthis should be very efficient. Maybe I'll implement something like this next, so lets leave this issue open, and keep me updated if this works for you"}}