
Plotting a point cloud with jzy3d ( opengl / jogl )
5 次查看(过去 30 天)
显示 更早的评论
I have been using Malcolm Lidierth's excellent demo for plotting a surface with jzy3d; this works very well. Now I want to plot a point cloud with millions of points and I am struggling with how to adapt Malcolm's example code. I have tried looking at his Waterloo-jzy3d source code but this appears to be different to his binary jar file.
Please can anybody help me plot 3d points with jzy3d?
or
Has anybody got an alternative way of plotting 3d points in opengl/jogl from Matlab?
Jim
0 个评论
回答(1 个)
Abhipsa
2025-6-16
To plot millions of 3D points efficiently, MATLAB’s built-in graphics can work quite well.
The below code snippet generates 1 million random 3D points and uses "scatter" to plot them:
% Generate 1 million random 3D points
N = 1e6;
x = rand(1, N) * 100;
y = rand(1, N) * 100;
z = rand(1, N) * 100;
% Use scatter3 with performance optimizations
figure
scatter3(x, y, z, 1, '.', 'MarkerEdgeAlpha', 0.1);
xlabel('X');
ylabel('Y');
zlabel('Z');
title('Large 3D Point Cloud');
view(3);
axis equal;
The output of the code snippet:

I hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!