Image:Red cylinder.png

From Wikipedia, the free encyclopedia

Wikimedia Commons logo This is a file from the Wikimedia Commons. The description on its description page there is shown below.

Right circular cylinder, created in Matlab by Jitse Niesen.

[edit] Licensing

Public domain I, the author of this work, hereby release it into the public domain. This applies worldwide.

In case this is not legally possible:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.


Afrikaans | Alemannisch | Aragonés | العربية | Български | Català | Česky | Cymraeg | Dansk | Deutsch | Ελληνικά | English | Español | Esperanto | فارسی | Français | Galego | 한국어 | हिन्दी | Hrvatski | Ido | Bahasa Indonesia | Íslenska | Italiano | עברית | Latina | Lietuvių | Magyar | Bahasa Melayu | Nederlands | Norsk (bokmål) | Norsk (nynorsk) | 日本語 | Polski | Português | Ripoarish | Română | Русский | Slovenčina | Slovenščina | Српски | Svenska | ไทย | Türkçe | Українська | Tiếng Việt | Walon | 简体中文 | 繁體中文 | 粵語 | +/-


[edit] Source

clf;
colormap([1 0 0]);
[cx,cy,cz] = cylinder([0.2 0.2], 100);
cc = ones(size(cx));

% rotate by 70 degrees around y axis
M = [ cos(7/18*pi)  sin(7/18*pi); -sin(7/18*pi)  cos(7/18*pi) ];
for k = 1:size(cx,1)
  for l = 1:size(cx,2)
    v = M * [cx(k,l); cz(k,l)];
    cx(k,l) = v(1);
    cz(k,l) = v(2);
  end
end;

surf(cx,cy,cz, cc, 'EdgeColor', 'none', 'FaceColor', 'flat', ...
     'FaceLighting', 'phong');

view(3);
camlight left;
axis equal;
axis off;
print -dpng cyl_tmp.png
system('convert -trim -border 20 -bordercolor white -transparent white cyl_tmp.png cyl.png');

The following pages on the English Wikipedia link to this file (pages on other projects are not listed):