> For the complete documentation index, see [llms.txt](https://gitbook.testingwaters.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.testingwaters.in/lists/image-based-point-density.md).

# Image based Point Density

Higher concentration at darker colors

![](https://1430428134-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8QK19sjP1I9rhLouo%2F-MMoEXcAUmITDFvpsfhp%2F-MMoRREPc0dG4XQgV3DZ%2Fperf_2020-11-23_03-00-53.png?alt=media\&token=be7fa813-285b-4fc4-a87e-ee5838e9719c)

```d
img01 = Image.ReadFromFile(img00);
dim01 = Image.Dimensions(img01);
wdt01 = dim01["width"]/25;
hgt01 = dim01["height"]/25;
pxl01 = Image.Pixels(img01,wdt01,hgt01);
bgt01 = Color.Brightness(pxl01);
pnt01 = Point.ByCoordinates((0..wdt01-1)<1>,(0..hgt01-1)<2>);
bgt02 = List.FilterByBoolMask(bgt01,bgt01 > 0.5);
bgt11 = List.TakeEveryNthItem(bgt02["in"]<1>,2,0);
rad01 = List.TakeEveryNthItem(bgt11,2,0) * 0.5;
pnt02 = List.FilterByBoolMask(pnt01,bgt01 > 0.5);
pnt11 = List.TakeEveryNthItem(pnt02["in"]<1>,2,0);
cen01 = List.TakeEveryNthItem(pnt11,2,0);
rad02 = (Math.Floor(bgt02["out"])+0.1)*1.75;
cir01 = Circle.ByCenterPointRadius(cen01,rad01);
cir02 = Circle.ByCenterPointRadius(pnt02["out"],rad02);
[cir01,cir02];
```
