Coordinates of koch snowflake
Ältere Kommentare anzeigen
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 Kommentare
Mathieu NOE
am 7 Mai 2025
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.
Akzeptierte Antwort
Weitere Antworten (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
1 Kommentar
Arnold
am 9 Mai 2025
Kategorien
Mehr zu Christmas / Winter finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



