File:Bifolium.png
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this preview: 800 × 387 pixels. Other resolutions: 320 × 155 pixels | 640 × 309 pixels | 1,367 × 661 pixels.
Original file (1,367 × 661 pixels, file size: 45 KB, MIME type: image/png)
File information
Structured data
Captions
DescriptionBifolium.png |
English: Illustration of en:Bifolium |
Date | (UTC) |
Source | self-made with en:Matlab |
Author | Oleg Alexandrov |
PNG development InfoField | This diagram was created with MATLAB. |
Source code InfoField | MATLAB code% Bifolium
function main()
% linewidth and font size
lw= 6;
fs = 20;
% colors
red=[0.867 0.06 0.14];
blue = [0, 129, 205]/256;
green = [0, 200, 70]/256;
black = [0, 0, 0];
white = 0.99*[1, 1, 1];
N=500; % number of points (don't make it big, code will be slow)
Lx1 = -0.3; Lx2 = 1.6; Ly1 = -1.3; Ly2 = -Ly1;
bd = 0.05;
for i = 1:10
% Set up the plotting window
figure(1); clf; set(gca, 'fontsize', fs, 'linewidth', lw/4);
hold on; axis equal; grid on;
figure(2); clf; hold on; axis equal; axis off;
[X, Y]=meshgrid(linspace(Lx1, Lx2, N), linspace(Ly1, Ly2, N));
x = X; y = Y;
a = 1;
Z = (x.^2 + y.^2).^2 - a.*x.^2.*y;
% graph the curves using 'contour' in figure (2)
figure(2); [c, stuff] = contour(X, Y, Z, [0, 0]);
% extract the curves from c and graph them in figure(1) using 'plot'
% need to do this kind of convoluted work since plot2svg can't save
% the result of 'contour' but can save the result of 'plot'
[m, n] = size(c);
while n > 0
l=c(2, 1);
x=c(1,2:(l+1)); y=c(2,2:(l+1)); % get x and y of contours
figure(1); plot(x, y, 'color', red, 'linewidth', lw/2);
c = c(:, (l+2):n);
[m, n] = size(c);
Lx1 = min(x) - bd; Lx2 = max(x) + bd;
Ly1 = min(y) - bd; Ly2 = max(y) + bd;
end
figure(1); axis equal; axis ([Lx1, Lx2, Ly1, Ly2]);
end
saveas(gcf, 'Bifolium.eps', 'psc2')
|
File:Bifolium.svg is a vector version of this file. It should be used in place of this PNG file when not inferior.
File:Bifolium.png → File:Bifolium.svg
For more information, see Help:SVG.
|
Public domainPublic domainfalsefalse |
I, the copyright holder of this work, release this work into the public domain. This applies worldwide. In some countries this may not be legally possible; if so: I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law. |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 05:08, 14 July 2007 | 1,367 × 661 (45 KB) | Oleg Alexandrov (talk | contribs) | {{Information |Description=Illustration of en:Bifolum |Source=self-made with en:Matlab |Date= ~~~~~ |Author= Oleg Alexandrov }} ==Source code== <pre> <nowiki> % Ampersand curve function main() % linewidth and font |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on de.wikiversity.org
- Usage on ms.wikipedia.org
- Usage on nl.wikipedia.org