Color 3D point cloud in Rhino with attribute value

How can I read a 3D-point set from a csv-file with X,Y,Z coordinate (column 1-3) and the fourth column has a stress-value and then color points according to the stress?

Hi Benedikte,

Can you post a small example of your data? Thanks

The content of the csv-file is like this (first rows), with X-coordinate, Y-coordinate, Z-coordinate and dCSC is a change in stress. I would like the colour of the points to represent the magnitude of the stress:

X,Y,Z,dCSC
9448.088445,2666.454043,-755.3542628,11270.58379
9424.110962,2654.566815,-816.0541226,-105930.3971
9416.460679,2717.892744,-755.624828,93936.80991
9400.91553,2710.714078,-794.3208741,1261.70321
9397.61374,2641.430512,-883.1926423,24325.80712
9386.733457,2766.408366,-755.6160292,-43777.05177
9370.121692,2627.800971,-952.8100534,89485.15389
9356.681375,2768.995099,-810.732142,8707.120761
9356.680435,2815.437106,-755.5844911,4548.897887
9344.49168,2615.094719,-1017.64851,16736.43212
9334.800704,2750.464144,-875.095021,5804.24198
9327.919772,2861.722847,-756.0647915,15532.63231
9327.294434,2680.15069,-973.2958859,1208.967662
9321.306641,2603.600098,-1076.272583,35626.88565
9320.167927,2799.040654,-845.59602,10361.11852
9306.29812,2596.15953,-1114.408059,-30172.46814
9298.157533,2905.283064,-761.5558106,26565.45986
9297.606459,2870.251435,-804.3911542,14875.83829

Hey Benedikte -
You can read the CSV file with a simple Grasshopper script and create the points from the XYZ coordinates.


Read XYZ and dCSC.gh (8.7 KB)

How do you translate, e.g., -43777.05177 to a color?
-wim

1 Like

I would like to do that e.g. with a colorbar - gradually changing from one color to the other, depending on the magnitude. Is that possible in Rhino?

You can remap to a domain or use the gradient with the limits set to your bounds.


Read XYZ and dCSC-colored.gh (14.5 KB)

Thank you very much, that seems to work!

Just one additional question - is it possible to also show the legend / colorbar for the stresses?

You can add a legend