Coordinates of koch snowflake
조회 수: 2 (최근 30일)
이전 댓글 표시
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 ?
Walter Roberson
2025년 5월 7일
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.
채택된 답변
Charu
2025년 5월 9일
Hi Arnold,
As I understand, you want to know the coordinates of the antenna of the Koch snowflake fractal antenna. You can use the “mesh” function to obtain the coordinates.
Kindly refer to the steps mentioned below to do so:
1.Extract the mesh data of the antenna using the “mesh” function.
meshData = mesh(antenna);
2.Get the vertices (coordinates) from the mesh data
vertices = meshData.Points;
3.Export the vertices to a CSV file for fabrication or further modification
csvwrite('antenna_vertices.csv', vertices);
4.Display the coordinates of the vertices and visualize the extracted vertices.
disp('Coordinates of the antenna vertices:');
disp(vertices);
figure;
scatter3(vertices(:,1), vertices(:,2), vertices(:,3), 'filled');
xlabel('X-axis');
ylabel('Y-axis');
zlabel('Z-axis');
title('Vertices of Koch Snowflake Fractal Antenna');
axis equal;
I tried to extract the coordinates of antenna using the code mentioned above and got the attached figure.

You may refer to the following documentation for more information on “mesh” function:
Hope this helps!
추가 답변 (1개)
Divyajyoti Nayak
2025년 5월 9일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!