Center Points from Image

I have this pattern in a JPEG format. I would like to place center points based on Black and White areas. Any ideas how I can proceed from here?

I have it started, but pretty new at Dynamo

Please find my linked JPEG file here

look at the Dynamo Primer

There is an example of using zero touch with the AForge library that is almost identical to what you want

1 Like

A good place to look @Andrew_Hannell and a good place for you to get some python tips @mkom

You could try the below to get you going, and then adjust for your workflow…


Worked perfectly. Thanks @Ewan_Opie!
Is there a way to separate points so that they correspond to black and white areas?

Thank you Andrew! I’ll definitely take a look at it.

List.GroupByKey using the brightness at a given pixel location as the key should do the trick.


Thanks Jacob! Do you have any similar examples of List.GroupByKey using brightness that you can recommend to look at? I am having difficulties making it work.
Points Grouping.dyn (46.1 KB)

mkom, you will have to ask each point if that point is in a dark or light area, then you can use that data (a list with 1/0 to filter by :slight_smile: ) I’ll take a look at your script

1 Like

Hey i got it!
Take a look at this:

2020-04-10 Points Grouping.dyn (43.3 KB)

Also just a quick question, what are you going to do with this?


Oh nice! Thanks Daan.
I was playing with weaving and then plastering over it, but now I want to see it applied on a building, see attached image. There’re a few of weaving techniques done in dynamo, but they have plain weaves. I am trying to see if more complex textile patterns could be used.

In other words, I am trying to achieve this seamless woven pattern where it could be applied onto a surface.

Oh i see! Looks really good!

Points Sorting Issues. Can someone please check what I am doing wrong here?
I am trying to sort the points so that the NurbsCurve goes through points that are grouped by brightness,

Points Sorting.dyn (93.5 KB)

I think I got it. I used List.SortNatural to get the points sorted. Thanks for helping everyone.

1 Like

weave.dyn (55.7 KB)

Edit: Updated weave pattern


Thanks Vikram!
Your way looks pretty advanced, I am still new at this…
Points Sorting.dyn (141.7 KB)

1 Like