How to generate a point cloud in 3D?

Technical Source
2 min readFeb 19, 2022

--

Hello dear community,

I would like to know if there is a fast way to create a cloud in 3D which consists of points. I would like to get something like this:

The points should be written into a simple matrix. Each row should represent one point.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

This might be a good starting point:

[x,y,z] = ndgrid(1:5:100,1:5:100,1:5:100);
scatter3(x(:),y(:),z(:),'.')

The ndgrid function will return multiple arrays of the same shape with one of its inputs replicated along one dimension of each of its outputs.

The syntax x(:) says to convert that 3D array into a vector.

The scatter3 function takes 3 vectors and plots a marker at the location defined by each row of the three.

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.