Jump to content

File:Siemens star (128 spokes) & Matlab code.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (SVG file, nominally 272 × 272 pixels, file size: 9 KB)

Summary

Description
English: A Siemens star with 128 spokes, together with its Matlab code. Create your own star with that code.
Deutsch: Ein Siemensstern mit 128 Speichen, mit generierendem Matlab-Code
Français : Une Mire de Siemens avec Matlab logiciel
Date
Source Own work
Author Hans Strasburger
SVG development
InfoField
 
The SVG code is valid.
 
This icon was created with MATLAB by Strasburger.
Source code
InfoField

MATLAB code

function Siemens_star()
% Matlab source code for creating your own star
% Siemens Star
% Hans Strasburger, June 2018

number_of_spikes = 128;					% fill in as you wish
radius = 40;							% Siemens star radius

axis equal								% 1:1 aspect ratio
axis off								% but no frame
hold on                     			% fill graph one by one

% Define points along the circumference

theta=-pi:2*pi/number_of_spikes:pi;		% theta is a vector of angles
x = radius * cos(theta);				% a vector of points along the outer circumference
y = radius * sin(theta);				%       "

% Draw triangular spikes; leave every 2nd spike white
for k = 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 4

X = [0 x(2*k-1) x(2*k) 0]
Y = [0 y(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' function

end                                 	% 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:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • 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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

19 April 2018

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current09:49, 25 June 2018Thumbnail for version as of 09:49, 25 June 2018272 × 272 (9 KB)StrasburgerUser created page with UploadWizard

The following page uses this file:

Global file usage

The following other wikis use this file:

Metadata