Coordinates of koch snowflake
이전 댓글 표시
I am trying to the coordinates of a Koch snowflake fractal antenna designed using the Antenna Toolbox.
All I get is a picture, and the antenna performance. I would like to have the coordinates so i can modify the design and/or send to fabrication
댓글 수: 2
Mathieu NOE
2025년 5월 7일
maybe from the picture you can extract the coordinates (maybe not ideal but probably doable)
can you share that picture ?
ant = fractalSnowflake;
pattern(ant, 1e7);
The lower left corner shows the drawing of the snowflake.
I looked into this, but it looked to me as if the important portion of it was a .p file.
채택된 답변
추가 답변 (1개)
Like @Mathieu NOE suggested, the coordinates of the snowflake can be extracted from the figure. Here's some sample code using @Walter Roberson's example:
ant = fractalSnowflake;
pattern(ant, 1e7);
fig = gcf; %Get figure object
fig.Children
%The pattern is in the 'geometryInPattern' axes
Axes = fig.Children(6);
Axes.Children
%By looking into the children objects, I found that the pattern was in the second Patch
xData = Axes.Children(3).XData
%Similarly
yData = Axes.Children(3).YData;
%Both rows of the data contain the coordinates
plot(xData(1,:),yData(1,:),'k');
%The second row in the data is just an offset of the first row so that the whole snowflake can be plotted
hold on;
plot(xData(2,:),yData(2,:),'k');
hold off
카테고리
도움말 센터 및 File Exchange에서 Christmas / Winter에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



