functionSiemens_star()% Matlab source code for creating your own star% Siemens Star% Hans Strasburger, June 2018number_of_spikes=128;% fill in as you wishradius=40;% Siemens star radiusaxisequal% 1:1 aspect ratioaxisoff% but no frameholdon% fill graph one by one% Define points along the circumferencetheta=-pi:2*pi/number_of_spikes:pi;% theta is a vector of anglesx=radius*cos(theta);% a vector of points along the outer circumferencey=radius*sin(theta);% "% Draw triangular spikes; leave every 2nd spike whitefork=1:(number_of_spikes/2)% k goes from 1 to the number of endpoints along the circle% A spike has 4 vertices, the first and last one in the center, so the vectors X, Y, have length 4X=[0x(2*k-1)x(2*k)0]Y=[0y(2*k-1)y(2*k)0]C='black'p=patch(X,Y,C,'EdgeColor','none')% draws the spike (with no edge), using the 'patch' functionend% end of for loop% Save the resulting Siemens star in vector graphics format to work properly (svg, eps, etc.)% To do so, export figure from the pop-up menu appropriately% End of script
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.