sourcelibs/Geometry/demos/hull.xtl

1⍝!/usr/bin/env xetal 2⍝│ A fence round scattered trees: the convex hull of 40 random points 3⍝│ (seeded, so it repeats), its corners, the area it encloses and its 4⍝│ center, and its picture. Run with "just demo Geometry hull". 5 6"ge:" u̲se< "Geometry" 7"r:" u̲se< "Random" 8trees ← 2 40 r̲eshape 100.0 × ʳu̲niform! 80 9fence ← ᵍᵉh̲ull trees 10t̲ally o̲\ fence ⍝ corners 11ᵍᵉa̲rea fence ⍝ square meters inside 12ᵍᵉc̲entroid fence 13picture ← ᵍᵉs̲how! fence