Generating a cylindrical cluster
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have created a 3D cluster and assigned values to represent a sandstone as attaced (3dlattice). Now, I want to create a cylinder to resemble a core and randomly assign two particular values across the cylinder. I am working with the below code but couldn't achieve my goal. I would appreciate, if you could guide me on the correct path?
n=10000; % number of points that you want
center = [20 ,20]; % center coordinates of the circle [x0,y0]
radius = 12.5; % radius of the circle
angle = 2*pi*rand(n,1);
r = radius*sqrt(rand(n,1));
X = round(r.*cos(angle)+ center(1));
Y = round(r.*sin(angle)+ center(2));
Z=round(60*sqrt(rand(n,1)));
scatter3(X,Y,Z);
Thank you.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Clusters and Clouds dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!