File talk:Complex numbers addition.png
File information
[edit]This file was marked as equivalent to w:Image:Complex_numbers_addition.png from en.wikipedia.org according to the NowCommons tag.
This is the edit history for that file's page:
- [2005-10-24T03:44:02Z] Oleg Alexandrov (Made by myself with matlab.)
- [2005-10-24T04:43:08Z] Oleg Alexandrov (source code)
- [2006-10-12T02:05:43Z] Cinxx
Original title:
- Complex_numbers_addition.png
Upload log:
- (del) (cur) 04:36, 24 October 2005 . . Oleg Alexandrov (Talk | contribs) . . 468×473 (16,254 bytes) (Made by myself with matlab. )
- (del) (rev) 04:34, 24 October 2005 . . Oleg Alexandrov (Talk | contribs) . . 234×237 (6,597 bytes) (Made by myself with matlab. )
- (del) (rev) 04:28, 24 October 2005 . . Oleg Alexandrov (Talk | contribs) . . 168×236 (6,146 bytes) (Made by myself with matlab. )
- (del) (rev) 04:26, 24 October 2005 . . Oleg Alexandrov (Talk | contribs) . . 130×236 (4,374 bytes) (Made by myself with matlab. )
- (del) (rev) 03:44, 24 October 2005 . . Oleg Alexandrov (Talk | contribs) . . 244×148 (4,471 bytes) (Made by myself with matlab. )
Text:
== Summary ==
Made by myself with matlab.
== Licensing ==
{{PD-self}}
==Source code==
<pre><nowiki> function main () % set up the plotting window thickness=2.5; fs=30; d=0.004; red=[1, 0, 0]; green=[0, 1, 0]; blue=[0, 0, 1]; figure(1); clf; hold on; axis equal; axis off; i=sqrt(-1); z1=0; z2=1+0.2*i; z3=0.4+1.2*i; plot_seg(z1, z2, red, thickness); plot_seg(z2, z3, green, thickness); plot_seg(z3, z1, blue, thickness); pt (z1, fs, 5, d, '0'); pt (z2, fs, 7, d, 'A'); pt (z3, fs, 3, d, 'B'); pt (z2+z3, fs, 1, d, 'X'); t=z2; z1=z2+z3; z2=z3; z3=t; plot_seg(z1, z2, red, thickness); plot_seg(z2, z3, green, thickness); plot_seg(z3, z1, blue, thickness); saveas(gcf, 'Complex_numbers_addition.eps', 'psc2') % convert from eps to png with shell command % convert -antialias -density 400 -scale 20% Complex_numbers_addition.eps Complex_numbers_addition.png function plot_seg(z1, z2, color, thickness); plot( [real(z1), real(z2)], [imag(z1), imag(z2)], 'color', color, 'linewidth', thickness ); function pt (z, fs, pos, d, tx) p=cos(pi/4)+sqrt(-1)*sin(pi/4); z = z + p^pos * d * fs; shiftx=0.0003; shifty=0.002; x = real (z); y=imag(z); H=text(x+shiftx*fs, y+shifty*fs, tx); set(H, 'fontsize', fs, 'HorizontalAlignment', 'c', 'VerticalAlignment', 'c') </nowiki>