File:Circuit equivalence.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(1,748 × 2,225 pixels, file size: 18 KB, MIME type: image/png)

Captions

Captions

Add a one-line explanation of what this file represents

Circuit diagram used by w:Analysis of resistive circuits.

David Benbennick made it with the following crappy Metapost program:

verbatimtex
%&latex
\documentclass{article}
\begin{document}
etex

scale=0.8in;
linethickness=1pt;

def docircuit =
  path pp;
  pp = unitsquare scaled scale shifted (-scale/2,-scale/2);
  draw pp;
  fill pp withcolor thecolor;

  linecap:=butt; draw (-7/6scale, 1/3scale) -- (-1/2scale, 1/3scale);
  linecap:=butt; draw (-7/6scale, -1/3scale) -- (-1/2scale, -1/3scale);

  draw thelabel(btex $+$ etex, (-7/6scale, 1.2/6scale));
  draw thelabel(btex $-$ etex, (-7/6scale, -1.2/6scale));

  linecap:=rounded;
  drawarrow (-7/6scale + 1/8scale, 0.8*1/3scale) --
    (-1/2scale - 1/8scale, 0.8*1/3scale)
    withcolor blue;

  if num = 1 :
    draw thelabel(btex \sf Circuit 1 etex, (0,0));
    dotlabel.lft(btex a etex, (-7/6scale, 1/3scale));
    dotlabel.lft(btex b etex, (-7/6scale, -1/3scale));
    draw thelabel(btex \sf V$_1$ etex, (-0.97*7/6scale, -0.02*scale));
    draw thelabel(btex \sf I$_1$ etex, (-5/6scale, 0.4*1/3scale));
  else :
    draw thelabel(btex \sf Circuit 2 etex, (0,0));
    dotlabel.lft(btex x etex, (-7/6scale, 1/3scale));
    dotlabel.lft(btex y etex, (-7/6scale, -1/3scale));
    draw thelabel(btex \sf V$_2$ etex, (-0.97*7/6scale, -0.02*scale));
    draw thelabel(btex \sf I$_2$ etex, (-5/6scale, 0.4*1/3scale));
  fi;
enddef;

beginfig(1);
  pickup pencircle scaled linethickness;

  color thecolor;

  thecolor = (0.8,1,1);
  num := 1;
  docircuit;

  currentpicture := currentpicture shifted (0, 1.3*scale);

  thecolor := (1,1,0.8);
  num := 2;
  docircuit;

  currentpicture := currentpicture shifted (10cm,5cm);
endfig;
end;

I saved the above as Circuit_equivalence.mp, and the TeX program below as Circuit_equivalence.tex:

&latex
\documentclass[10pt]{article}
 \usepackage{graphicx}
\pagestyle{empty}
\begin{document}
 \includegraphics{Circuit_equivalence.1}
\end{document}

Then I ran

mpost Circuit_equivalence
tex Circuit_equivalence
dvips -mode ljfzzz -D 1200 Circuit_equivalence -o
convert -density 1200 Circuit_equivalence.ps Circuit_equivalence.pnm
pnmcrop Circuit_equivalence.pnm | pnmtopng > a.png
pngrewrite a.png Circuit_equivalence.png
optipng Circuit_equivalence.png
I, the copyright holder of this work, hereby publish it under the following licenses:
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.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 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.
  • 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.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 2.5 Generic 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.
  • 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.
You may select the license of your choice.

File history

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

Date/TimeThumbnailDimensionsUserComment
current06:44, 17 July 2005Thumbnail for version as of 06:44, 17 July 20051,748 × 2,225 (18 KB)Dbenbenn (talk | contribs)1748x2225 version
01:20, 30 December 2004Thumbnail for version as of 01:20, 30 December 2004643 × 802 (8 KB)Dbenbenn (talk | contribs)third version?
04:07, 26 December 2004Thumbnail for version as of 04:07, 26 December 2004645 × 804 (8 KB)Dbenbenn (talk | contribs)third try?
03:49, 25 December 2004Thumbnail for version as of 03:49, 25 December 20041,429 × 402 (7 KB)Dbenbenn (talk | contribs)second version
03:19, 25 December 2004Thumbnail for version as of 03:19, 25 December 20041,428 × 414 (7 KB)Dbenbenn (talk | contribs)Circuit diagram used by en:Analysis of resistive circuits

The following page uses this file:

File usage on other wikis

The following other wikis use this file: