I hope someone can assist here. Working on some plugin updates for the bed level visualizer and can't wrap my head around converting a list of 3D points to a 2D list needed for the rendering. It has to be able to work with different x/y values and an unknown length, but if given the following list of 3D points.
a = [[40,20,7.31],[80,20,7.38],[120,20,7.35],[120,70,7.37],[80,70,7.41],[40,70,7.35],[40,120,7.33],[80,120,7.36],[120,120,7.34]]
I need to convert it to a format that include a list of x values, a list of y values and a list of z values that match up with the order of x and y. So the above needs to end up as the following.
x = [40,80,120] y = [20,70,120] z = [[7.31,7.38,7.35],[7.35,7.41,7.37],[7.33,7.36,7.34]]
From everything I'm seeing doing searches for this type of operation, it seems numpy is the most commonly used library to convert lists, but can't seem to find this exact use case. Was hoping some of you more savvy python programmers could shed some light into a good way to do this.