I have a problem in coloring a radial grid. I have a series of number which indicates how many times a person has looked in a direction. Now I want to make a visualization of this.

I have tried to make a radial grid on each point the person is sitting, so technical I can have 10 – 100 radial grid for each person in a room and a series of number for each time an person have looked in certain direction.

The problem is to color the radial grid after how many times he have looked one way. As you seen in my script so far is: I have put in the radial grid, and inputting the sitting point for each person, this make the number grid with the curves for each grid. Now I want to use my series of number to choose the curves in the direction he has looked. In a previous step have I make sure the script always will count in the right order. GrasForum_Gazetool.gh (32.7 KB)

Hope you have some ideas to match my view numbers with the grid coloring.

I’ve looked at your code including cluster(s) and Python, and believe that flattening your data trees in several places has lost important data structure connecting the geometry (color-coded pie-shaped panels) with each point. Better to fix that first (remove flatten, keep branches) before pushing onward.

P.S. That means I also expect the data to be branched, the ‘Number of view directions’ to have eight values per branch (one per view), one branch per point in the grid (four in your model).

I reverted to code I contributed to a related thread because it was organized by branches. The same could be done from splitting a surface, as you are doing.

I modified (simplified) the GazeGraf cluster extensively and partitioned your list of 32 values into four branches of eight values each, corresponding to the number of bars in the graph…

These are similar to pilot charts, familiar to me from ocean navigation:

It was first compiled, manually, in an organized system by Lieut. Matthew F. Maury, U.S. Navy, who studied thousands of ships’ logs and charts in the mid 1800s to make the information available to ships at sea. He is considered the father of modern oceanography and naval meteorology and one of the main results of his work are the Pilot Charts.

This skips the handy ColorJ component to create an explicit gradient where missing values will have missing colors. Unfortunately this isn’t done yet since the data is “bad” and/or not handled well at all. It is assumed to be the number of times to shift the list of six panels per view to make some (or none or all) of them disappear. Hasty and misguided.

Ideally these graph scales would adapt to the count values…?

P.S. The difference in this one (below) is mostly internal to the GazeGraf cluster, except for the random number generator (white group). The partitioned data shows arbitrary count values that are used to get global domain bounds, then all are scaled the same, adapting to the total number of counts (all views) for each point.

The code I used from the other thread was confusing and irrelevant in this context so I ditched it. At first I replaced it with your code to create a rectangular surface but replaced that with a simpler Plane Surface component.

Then I noticed that the radial grid was creating polygons such that four sides created a diamond instead of a square so added some rotation inside the GazeGraf cluster to compensate for that.

However, I still have some problems implementing all the great stuff you have created so I will send you the whole script for view calculation. In short, it’s a new method to calculate glare problems and finding the dominant view angle. Firstly what you need to know (if you have time to look at it of course ) you need to make sure you evalglare.exe installed. If you have this program you can calculate the pictures, I have sent you though mine glare calculator and get the number of times a person looks in certain angle. Furthermore, have I sent you a rhino script with a predefined surface. Last there are two nearly identically scripts in gh file. One with my old calculation and visualization and one with the new visualization you have send me. Gras_Forum.gh (577.2 KB) Rhino_Forum.3dm (69.3 KB) Gaze_Pics.zip (6.9 MB)
About the scales of the graph data; it would be nice however I would like to also be able to make it in full size with all the visualizations plotted, in a bigger graph (change the radial grid size)
Again, this is only if you have time, is grateful you want to help, I’m a bit lost in this part.

If what I’ve done so far is of no use to you, why continue? I don’t care how the data is collected, only how it is displayed, so have no intention of installing an app.

I found and fixed an error in the last code I posted.

If you have questions about this code, I’ll try to answer them. I can imagine that the polygon radial grid at each point could be different by adapting to the number of values in each branch (triangle, square, pentagon, etc.), if that would be useful?

I won’t be looking at your new files, sorry. Please don’t ask me to read more code until you understand what I’ve posted, which is 95% cool for pilot charts, I believe. One can always do more.

Like this, a second Random component in the white group generating integers in the domain 3 to 8 that determine the number of data values in each branch, which is then interpreted as the number of sections or view directions in each radial grid. Each one can be different.

I added a second white group to generate a “CALIBRATE” data set, to make sure I know the first value applies to straight ahead which will always appear as up and that sections of the graph (view directions) are clockwise from there. If your data doesn’t comply with that expectation, I suggest reformatting your data as needed.

There is a Value List / Stream Filter switch (blue group) to choose either data set or potentially a third set, your real data.

The ‘Tree/List Viewer’ is a general purpose tool for examining data trees of geometry.

In this case, you choose a path (data tree branch) using the ‘path idx’ slider and see the number of grid cells in that section (view direction) of a radial graph. Some sections have none. The ‘list idx’ slider lets you choose one of them.