I need help randomizing the points of the traingle

조회 수: 1 (최근 30일)
Amanda
Amanda 2022년 11월 28일
편집: Voss 2022년 11월 28일
I need help radomizing the points of the triangle just like the color/markersize/edgecolor change.
  댓글 수: 3
Amanda
Amanda 2022년 11월 28일
there arent any constraints
Voss
Voss 2022년 11월 28일
편집: Voss 2022년 11월 28일

댓글을 달려면 로그인하십시오.

답변 (1개)

David Hill
David Hill 2022년 11월 28일
figure;hold on;
for k=1:10
p=polyshape(rand(3,1),rand(3,1));
plot(p)
end
  댓글 수: 2
Amanda
Amanda 2022년 11월 28일
I dont want mulitple triangle on the graph I want it to randomize one triangle
Torsten
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 CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by