Image:Ampersandcurve.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.
Commons is a freely licensed media file repository. You can help.
Description

The Ampersand Curve

en:Category:Images of curves

Source

Originally from en.wikipedia; description page is/was here.

Date

2006-03-09 (original upload date)

Author

Original uploader was Mets501 at en.wikipedia

Permission
(Reusing this image)

Released under the GNU Free Documentation License.


[edit] License information

GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation license, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation license".

Aragonés | العربية | Asturianu | Български | বাংলা | ইমার ঠার/বিষ্ণুপ্রিয়া মণিপুরী | Brezhoneg | Bosanski | Català | Cebuano | Česky | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | فارسی | Suomi | Français | Gaeilge | Galego | עברית | Hrvatski | Magyar | Bahasa Indonesia | Ido | Íslenska | Italiano | 日本語 | ქართული | ភាសាខ្មែរ | 한국어 | Kurdî / كوردی | Latina | Lëtzebuergesch | Lietuvių | Bahasa Melayu | Nnapulitano | Nederlands | ‪Norsk (nynorsk)‬ | ‪Norsk (bokmål)‬ | Occitan | Polski | Português | Română | Русский | Slovenčina | Slovenščina | Shqip | Српски / Srpski | Svenska | తెలుగు | ไทย | Türkçe | Українська | اردو | Tiếng Việt | Volapük | Yorùbá | ‪中文(中国大陆)‬ | ‪中文(台灣)‬ | +/-

I, the copyright holder of this work, has published or hereby publishes it under the following license:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

Subject to disclaimers.


Asturianu | Български | Català | Deutsch | English | Español | Français | Gaeilge | Italiano | 한국어 | 日本語 | Polski | Português | Română | Türkçe | +/-

This graph image should be recreated using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is already available, please upload it. After uploading an SVG, replace this template with template {{Vector version available|new image name.svg}} in this image.

العربية | Български | Català | Česky | Dansk | Deutsch | English | Esperanto | Español | Français | 한국어 | Italiano | Magyar | Lietuvių | Nederlands | 日本語 | Polski | Português | Română | Русский | Suomi | Svenska | Türkçe | Українська | Tiếng Việt | मराठी | ‪中文(繁體)‬ | ‪中文(简体)‬ | +/-

[edit] Source code


% Ampersand curve

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];

   % Set up the plotting window
   figure(1); clf; set(gca, 'fontsize', fs, 'linewidth', lw/4);
   hold on; axis equal; grid on;

   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;
   
   [X, Y]=meshgrid(linspace(Lx1, Lx2, N), linspace(Ly1, Ly2, N));   % X and Y coordinates

   Ncurves = 10;
   A = linspace(0, 1, Ncurves);

   figure(2); clf; hold on; axis equal; axis off;

   x = X; y = Y;
   Z = (y.^2-x.^2).*(x-1).*(2*x-3)-4*(x.^2+y.^2-2*x).^2;
          
%  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);
                 
   end
   
   figure(1); axis equal; axis ([Lx1, Lx2, Ly1, Ly2]);

   saveas(gcf, 'Ampersandcurve.eps', 'psc2')
%   plot2svg(sprintf('Devils_curve_a=0.0-1.0_b=%0.2g.svg', b));
%   saveas(gcf, sprintf('Devils_curve_a=%0.2g_b=%0.2g.eps', a, b), 'psc2');


[edit] Original upload log

(All user names refer to en.wikipedia)

  • 2006-03-09 22:31 Mets501 226×226×8 (2956 bytes) The Ampersand Curve

File history

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

Date/TimeDimensionsUserComment
current04:39, 14 July 2007844×1,061 (43 KB)Oleg Alexandrov (Tweak)
04:34, 14 July 2007226×226 (3 KB)Oleg Alexandrov ({{Information |Description=The Ampersand Curve en:Category:Images of curves |Source=Originally from [http://en.wikipedia.org en.wikipedia]; description page is/was [http://en.wikipedia.org/w/index.php?title=Image%3AAmpersandcurve.PNG here]. |Date=20)
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):