Turning part circle into circle segment
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
i got a part of a circle like this
n = 60;
% the circle "Kreis" in the xy-plane:
v = linspace(pi/4,7*pi/4 , n);
r = 60;
Kreis = [r*cos(v)+60;
r*sin(v);
0*v] ;
How can I close the circle with a straight line without adding an extra "object", so that the whole circle segment is "Kreis" in the end?
greets
댓글 수: 0
답변 (1개)
pfb
2015년 4월 22일
편집: pfb
2015년 4월 22일
I'd add a final point coincident with the first one
Kreis=[Kreis Kreis(:,1)];
Then
plot3(Kreis(1,:),Kreis(2,:),Kreis(3,:))
or
fill3(Kreis(1,:),Kreis(2,:),Kreis(3,:),'b');
give the figure you're asking for.
You can do this also by redefining the grid as
v = [linspace(pi/4,7*pi/4 , n) pi/4];
(no need of adding the extra point, now)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!