11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

250 • Chapter 6: <strong>Programming</strong> with Maple GraphicsA Smith ChartThe commands in the plottools package create graphs such as a SmithChart, used in microwave circuit analysis.> smithChart := proc(r)> local i, a, b, c ;> a := PLOT( seq( plottools[arc]( [-i*r/4,0],> i*r/4, 0..Pi ),> i = 1..4 ),> plottools[arc]( [0,r/2], r/2,> Pi-arcsin(3/5)..3*Pi/2 ),> plottools[arc]( [0,r], r, Pi..Pi+arcsin(15/17) ),> plottools[arc]( [0,2*r], 2*r,> Pi+arcsin(3/5)..Pi+arcsin(63/65) ),> plottools[arc]( [0,4*r], 4*r,> Pi+arcsin(15/17)..Pi+arcsin(63/65) )> );> b := plottools[transform]( (x, y) -> [x,-y] )(a);> c := plottools[line]( [ 0, 0], [ -2*r, 0] ):> plots[display]( a, b, c, axes = none,> scaling = constrained,> args[2..nargs] );> end proc:Here is a Smith Chart of radius 1.> smithChart( 1 );

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!