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
Llicència
Jo, el titular dels drets d'autor d'aquest treball, el public sota la següent llicència:
compartir – copiar, distribuir i comunicar públicament l'obra
adaptar – fer-ne obres derivades
Amb les condicions següents:
reconeixement – Heu de donar la informació adequada sobre l'autor, proporcionar un enllaç a la llicència i indicar si s'han realitzat canvis. Podeu fer-ho amb qualsevol mitjà raonable, però de cap manera no suggereixi que l'autor us dóna suport o aprova l'ús que en feu.
compartir igual – Si modifiqueu, transformeu, o generareu amb el material, haureu de distribuir les vostres contribucions sota una llicència similar o una de compatible com l'original
Aquest fitxer conté informació addicional, probablement afegida per la càmera digital o l'escàner utilitzat per a crear-lo o digitalitzar-lo. Si s'ha modificat posteriorment, alguns detalls poden no reflectir les dades reals del fitxer modificat.