I need help randomizing the points of the traingle
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Antworten (1)
David Hill
am 28 Nov. 2022
figure;hold on;
for k=1:10
p=polyshape(rand(3,1),rand(3,1));
plot(p)
end
2 Kommentare
Torsten
am 28 Nov. 2022
Bearbeitet: Torsten
am 28 Nov. 2022
And what does it mean: "randomize one triangle" ?
According to how a normal person would interprete it, you already did this in your code: You randomly chose 3 points in 2d space (most probably meant as the corner points of a triangle).
Or do you need random points inside a fixed triangle ?
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!