File:Ampersandcurve.png

Summary

Description The Ampersand Curve, en:Category:Images of curves
Date 9 March 2006 (original upload date)
Source Transferred from en.wikipedia to Commons.
Author Mets501 at English Wikipedia
PNG development
InfoField
Source code
InfoField

MATLAB 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');
File:Ampersandcurve.svg is a vector version of this file. It should be used in place of this PNG file when not inferior.Category:Vector version available

File:Ampersandcurve.png → File:Ampersandcurve.svg

For more information, see Help:SVG.

In other languages
Alemannisch  العربية  беларуская (тарашкевіца)  български  বাংলা  català  нохчийн  čeština  dansk  Deutsch  Ελληνικά  English  British English  Esperanto  español  eesti  euskara  فارسی  suomi  français  Frysk  galego  Alemannisch  עברית  हिन्दी  hrvatski  magyar  հայերեն  Bahasa Indonesia  Ido  italiano  日本語  ქართული  한국어  lietuvių  македонски  മലയാളം  Bahasa Melayu  မြန်မာဘာသာ  norsk bokmål  Plattdüütsch  Nederlands  norsk nynorsk  norsk  occitan  polski  prūsiskan  português  português do Brasil  română  русский  sicilianu  Scots  slovenčina  slovenščina  српски / srpski  svenska  தமிழ்  ไทย  Türkçe  татарча / tatarça  українська  vèneto  Tiếng Việt  中文  中文(中国大陆)  中文(简体)  中文(繁體)  中文(马来西亚)  中文(新加坡)  中文(臺灣)  +/−
New SVG image

Licensing

Mets501 at the English-language Wikipedia, the copyright holder of this work, hereby publishes it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. Subject to disclaimers.
Attribution: Mets501 at the English-language Wikipedia
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.
This licensing tag was added to this file as part of the GFDL licensing update.
Category:CC-BY-SA-3.0-migrated-with-disclaimers#Ampersandcurve.pngCategory:License migration completed#Ampersandcurve.png
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. Subject to disclaimers.
Category:GFDL-en
Category:Self-published work

Original upload log

The original description page was here. All following user names refer to en.wikipedia.
  • 2006-03-09 22:31 Mets501 226×226×8 (2956 bytes) The Ampersand Curve
Category:Quartic curves Category:Images with Matlab source code
Category:CC-BY-SA-3.0-migrated-with-disclaimers Category:GFDL-en Category:Images with Matlab source code Category:License migration completed Category:PNG created with MATLAB code Category:Quartic curves Category:Self-published work Category:Vector version available