I currently have a 3d scanner implemented within the software. However, when I use stroke() with colour mode HSB to set the colour of a single point, it changes all the colours of all of my points. How do I change the colour of each individual point if I wanted to?
As for my current apllication I want there to be a colour range so that far away points are in one colour and close points are in another colour etc. So how can I plot each point individually to have there own unique colour?
My Current Code
A = (((SensorDistance) - (0))/(400 - (0)))*(255 - 0) + (0);
stroke(A, 255, 255);
point(v.x * scale + xOffset, -v.z * scale + yOffset, -v.y * scale);
It does work, as longer distances do change colours in the correct range but it changes the colours for all the points together which isn’t what I want it to do, I hope this is an easy fix.
The sensor distance comes from a LIDAR sensor I am using as constanly has a different value.
I can plot the points in my 3D point cloud with no issues, but it’s just a different colour for each one of the newly plotted points is difficult, whenever the sensor distance value changes, all of the points change and are the same colour.
I’ve figured it out now, using the map feature you suggested made the performance better.
I believe the error was down to my SensorDistance not correctly updating.
I am now using the HSB to 300 for a greater range as 300 is around pink, so the range is fine and the project seems to work as desired.