Coordinates of koch snowflake
4 次查看(过去 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!