Jump to content

Voronoi diagram: Difference between revisions

m
J: small note of explanation, and simplify grammar on final noun phrase.
m (J: small note of explanation, and simplify grammar on final noun phrase.)
Line 619:
viewmat 25 voronoi 500 500</lang>
 
Another solution generates Voronoi cells from Delaunay triangulation. The page [[Voronoi diagram/J/Delaunay triangulation]] also contains a convex hull algorithm. This is a vector based approach instead of a pixel based approach and is about twice as fast for this task's example.
 
=== Tacit version ===
Line 626:
 
<lang j>Voronoi=. ,"0/&i./@:] (i. <./)@:(+/@:*:@:-"1)"1 _ ] ?@$~ 2 ,~ [
25 viewmat@:([ load25 bind'viewmat')@:Voronoi 500 500 [ load'viewmat'</lang>
 
=={{header|Java}}==
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.