I need help randomizing the points of the traingle
조회 수: 1 (최근 30일)
이전 댓글 표시
답변 (1개)
David Hill
2022년 11월 28일
figure;hold on;
for k=1:10
p=polyshape(rand(3,1),rand(3,1));
plot(p)
end
댓글 수: 2
Torsten
2022년 11월 28일
편집: Torsten
2022년 11월 28일
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 ?
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!