File:Amoeba2.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 623 × 599 pixels. Other resolutions: 250 × 240 pixels | 499 × 480 pixels | 799 × 768 pixels | 1,065 × 1,024 pixels | 2,130 × 2,048 pixels | 940 × 904 pixels.
Original file (SVG file, nominally 940 × 904 pixels, file size: 1 KB)
File information
Structured data
Captions
Contents
Summary[edit]
DescriptionAmoeba2.svg | The amoeba of P(z, w)=3z2+5zw+w3+1 |
Date | (UTC) |
Source | File:Amoeba2.png |
Author | Vectorised by Zerodamage, from the original work by Oleg Alexandrov |
This is a retouched picture, which means that it has been digitally altered from its original version. Modifications: Vectorization. The original can be viewed here: Amoeba2.png: . Modifications made by Zerodamage.
|
Licensing[edit]
This file is licensed under the Creative Commons Attribution 3.0 Unported 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.
C++ code[edit]
#include <iostream>
#include <fstream>
#include <cmath>
#include <complex>
using namespace std;
double small = 1e-14;
double mylog (double);
int main(){
double A=-5, B=5;
int N=1000;
double h= (B-A)/(N-1);
double theta0 = 2*M_PI/(N-1.0);
ofstream mfile ("data.txt");
for (int i=0 ; i < N ; i++){
double r = exp(A+i*h);
for (int j=0 ; j < N ; j++){
double theta = j*theta0;
complex<double> z2 = polar(r, theta);
complex<double> root = sqrt(25.0*z2*z2-12.0*(z2*z2*z2+1.0));
complex<double> z11 = (-5.0*z2+root)/6.0;
complex<double> z12 = (-5.0*z2-root)/6.0;
double a1 = mylog(abs(z11));
double a2 = mylog(abs(z12));
double b = mylog(abs(z2));
mfile << a1 << ' ' << b << endl;
mfile << a2 << ' ' << b << endl;
}
}
mfile.close();
return 0;
}
double mylog (double x){
if (x< 0){
cerr << "Error in log, negative x!" << endl;
exit(0);
}
if (x < small){
return log (small);
}
return log (x);
}
Matlab code which reads the data output by the C++ code and graphs it[edit]
A=load('data.txt'); plot(A(:, 1), A(:, 2), '.'); axis equal; axis off; axis([-4 6 -5 5]) saveas(gcf, 'amoeba2.eps', 'psc2');
Original upload log[edit]
This image is a derivative work of the following images:
- File:Amoeba2.png licensed with PD-self
- 2007-03-09T04:22:13Z Oleg Alexandrov 1504x1446 (13103 Bytes)
- 2007-02-28T04:42:54Z Oleg Alexandrov 1078x1092 (28225 Bytes)
- 2007-02-28T04:17:26Z Oleg Alexandrov 1078x1081 (40520 Bytes) Made by myself with matlab.
Uploaded with derivativeFX
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 14:49, 8 August 2012 | 940 × 904 (1 KB) | Zerodamage (talk | contribs) | == {{int:filedesc}} == {{Information |Description=== |Source={{Derived from|Amoeba2.png|display=50}} |Date=2012-08-08 14:47 (UTC) |Author=*File:Amoeba2.png: Oleg Alexandrov *derivative work: [[User:{{subst:REVISIONUSER}}|... |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
File usage on other wikis
The following other wikis use this file:
- Usage on el.wikipedia.org
- Usage on en.wikipedia.org
- Usage on fr.wikipedia.org
- Usage on ja.wikipedia.org
- Usage on pl.wikipedia.org