Point density from a coloured mesh

is there any possible way to get the point density(with their average distances) from a coloured mesh in grasshopper, the and then split the point list in three parts according to RGB?

Kinda like what Charles wanted in this thread ?

1 Like

im sorry , im pretty new in grasshopper …i didn’t really understand the kmeans implementation but im looking for something similar to this and further splitting this into 3 list of points according to the color of he mesh
01 02

Er … what represent the circles?

Other than that you want:

  1. to get the mesh vertices average distance to their neighbor vertices (you need a VV mesh connectivity for that one like the one that Sandbox does [V for vertex]).
  2. to “group” mesh faces (the term is: cluster by the way) according to the average RGB value (if available: meaning that if the mesh has colors assigned to vertices) of their adjacent vertices. That said this “grouping” can vary in size according to your desire.
1 Like

thank you for help !!
i have tried something similar but did not have much luck , the points aren’t populated according to the color gradient and nor i can split the list of point into their respective colors.colored mesh.gh (299.0 KB)

You are using an add-on that I don’t have.

Save a colored mesh (any mesh) in a R5 (not R6) format and post it here (as R5 file, that is). Then we’ll see what we can do for this case (but using things that you’ll not like like C# code).

As a color is 3 values you must define a distance. For example brightness …

Here a simple way to populate depending on height

You could also use that

1 Like

i think i partially understood the formula part . but the main intention is to split a mesh color pattern into three (based on brightness) and i don’t know how to implement it in grasshopper?

If you want to split mesh search for mesh Iso splitting I put some script
https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.grasshopper3d.com/m/discussion%3Fid%3D2985220%253ATopic%253A1761230&ved=2ahUKEwjGuLGw97_hAhUl5uAKHa2hAUIQFjAAegQIBBAB&usg=AOvVaw2HKlj3CHGEy7g7wMDiXocl&cshid=1554707218082

1 Like

i have been trying the previous methods but still can’t manage to get point density based on colored mesh …the previous method are still very confusing and not giving desired results :frowning:

im trying achieve something similar to this Capture|333x386 can someone please give a similar solution same as the picture
form01.gh (179.5 KB)
help will be much appreaciated !!!

Here is a solution, as I have not searched for the equation on the gradient, here is a way that will work if you stay in Grasshopper Gradient.It uses the fact that Color is transformed to point in Grasshopper, points that are in a cube from {-1,-1,-1} to {1,1,1}
I put a Graph Mapper in order for you to tune the density of points.



I
from_gradient_to_populate_points.gh (190.0 KB)

3 Likes

I am so sory but this script is not working. It does not populate the points, just does the grayscale thing…

I am also sorry. You 'll have to give more informations if you want your problem to be solved.

2 Likes