I am currently working on:
- Developing a
THREE.PointCloud
object with around 150k points that are generated by a web application. - Adjusting the size of the points in the
THREE.PointCloud
object to achieve a desired outcome similar to what is seen here (created usingMayaVi
):
The issue I'm facing is:
- The data being passed to the
THREE.PointCloud
object appears to be inaccurate. - When viewed in
three.js
, the points seem to be arranged into eight cubes without any clear reason (I haven't applied any scaling or transformations to the points).
Here is an example of the server response received (a snippet of sample data is provided at the end of this post):
{'geometry': [[-156, 65, 89],
[268, 84, 337],
[-205, 68, 170],
[-87, 69, 52],
...
[289, 81, 143],
[141, 78, 280],
[403, 75, 351]],
'metadata': {'max': {'x': 421, 'y': 105, 'z': 458},
'min': {'x': -335, 'y': 63, 'z': 39}}}
The code in three.js
used for creating the point cloud is as follows:
// Code snippet removed for clarity and brevity.
The resulting scene looks like this:
Any recommendations? I have referenced the example code provided, but struggle with implementing proper scaling for the data points in my dataset. You can view the code examples and sample dataset through the links below:
Example Code Reference
Sample Dataset (2MB)