biquadratic_filter_exposition
system:sage


{{{id=159|
%auto
reset()
forget()

#
# Copyright 2001, P. Lutus http://arachnoid.com
#
# Released under the GPL: http://www.gnu.org/licenses/gpl.html
#

# special equation rendering
def render(x,name = "temp.png",size = "large"):
    if(type(x) != type("")): x = latex(x)
    latex.eval("\\" + size + " $" + x + "$",{},"",name)
    
# NOTE: sample rate must be > 2x highest frequency of interest
# just as in reality (Nyquist-Shannon)

var('alpha beta cf g sr q df f ff dbGain a0 a1 a2 b0 b1 b2')

# default sample rate
def_sr = 40000

# default q required for some filters
def_q = 1/sqrt(2)

# constants that apply to all filters

A = 10 ^ (dbGain / 20)
beta = sqrt(A + A)
omega = 2 * pi * df / sr
sn = sin(omega)
cs = cos(omega)
alpha = sn / (2*q)
phi = (sin(2 * pi * f/(2.0 * sr)))^2

# value function

rf(sr,q,df,f,a1,a2,b0,b1,b2) = ((b0+b1+b2)^2 - 4*(b0*b1 + 4*b0*b2 + b1*b2)*phi + 16*b0*b2*phi*phi) / ((1+a1+a2)^2 - 4*(a1 + 4*a2 + a1*a2)*phi + 16*a2*phi*phi)

# value to db conversion function
db(x) = 10 * log(x) / log(10)

# from db to value
val(x) = 10 ^ (x/10)

# vertical line drawing function
def vl(x):
    return line(((x,-1),(x,1)))

# lowpass
a0 = 1+alpha
b0 = ((1-cs) / 2) / a0
b1 = (1-cs) / a0
b2 = b0
a1 = (-2 * cs) / a0 
a2 = (1-alpha) / a0

lpf(sr,q,df,f) = rf(sr,q,df,f,a1,a2,b0,b1,b2)

# highpass
a0 = 1 + alpha
b0 = ((1 + cs) /2) / a0
b1 = -(1 + cs) / a0
b2 = b0

a1 = (-2 * cs) / a0
a2 = (1 - alpha) / a0

hpf(sr,q,df,f) = rf(sr,q,df,f,a1,a2,b0,b1,b2)

# bandpass
a0 = 1+alpha
b0 = alpha / a0
b1 = 0
b2 = -b0
a1 = (-2 * cs) / a0
a2 = (1-alpha) / a0

bpf(sr,q,df,f) = rf(sr,q,df,f,a1,a2,b0,b1,b2)

# notch
a0 = 1 + alpha
b0 = 1 / a0
b1 = (-2 * cs) / a0
b2 = b0
a1 = (-2 * cs) / a0
a2 = (1 - alpha) / a0
nf(sr,q,df,f) = rf(sr,q,df,f,a1,a2,b0,b1,b2)

# peak
a0 = 1 + (alpha /A)
b0 = (1 + (alpha * A)) / a0
b1 = (-2 * cs) / a0
b2 = (1 - (alpha * A)) / a0
a1 = b1
a2 = (1 - (alpha /A)) / a0
pf(sr,q,df,f,dbGain) = rf(sr,q,df,f,a1,a2,b0,b1,b2)

# high shelf
a0 = (A + 1) - (A - 1) * cs + beta * sn
b0 = (A * ((A + 1) + (A - 1) * cs + beta * sn)) / a0
b1 = (-2 * A * ((A - 1) + (A + 1) * cs)) / a0
b2 = (A * ((A + 1) + (A - 1) * cs - beta * sn)) / a0
a1 = (2 * ((A - 1) - (A + 1) * cs)) / a0
a2 = ((A + 1) - (A - 1) * cs - beta * sn) / a0
hsf(sr,q,df,f,dbGain) = rf(sr,q,df,f,a1,a2,b0,b1,b2)

# low shelf
a0 = (A + 1) + (A - 1) * cs + beta * sn
b0 = (A * ((A + 1) - (A - 1) * cs + beta * sn)) / a0
b1 = (2 * A * ((A - 1) - (A + 1) * cs)) / a0
b2 = (A * ((A + 1) - (A - 1) * cs - beta * sn)) / a0
a1 = (-2 * ((A - 1) + (A + 1) * cs)) / a0
a2 = ((A + 1) + (A - 1) * cs - beta * sn) / a0
lsf(sr,q,df,f,dbGain) = rf(sr,q,df,f,a1,a2,b0,b1,b2)
///
}}}

{{{id=366|
# bandpass example
plot(bpf(def_sr,3,100,f),f,0,200, gridlines=True)
///
<html><font color='black'><img src='cell://sage0.png'></font></html>
}}}

{{{id=357|
# lowpass example
plot(lpf(def_sr,def_q,100,f),f,0,200, gridlines=True)
///
<html><font color='black'><img src='cell://sage0.png'></font></html>
}}}

{{{id=358|
# highpass example
plot(hpf(def_sr,def_q,100,f),f,0,200, gridlines=True)
///
<html><font color='black'><img src='cell://sage0.png'></font></html>
}}}

{{{id=359|
# notch example
plot(nf(def_sr,9,100,f),f,0,200, gridlines=True)
///
<html><font color='black'><img src='cell://sage0.png'></font></html>
}}}

{{{id=360|
# peak example
plot(pf(def_sr,9,100,f,9),f,0,200, gridlines=True)
///
<html><font color='black'><img src='cell://sage0.png'></font></html>
}}}

{{{id=361|
# highshelf example
plot(hsf(def_sr,def_q,100,f,1),f,0,200, gridlines=True)
///
<html><font color='black'><img src='cell://sage0.png'></font></html>
}}}

{{{id=362|
# lowshelf example
plot(lsf(def_sr,def_q,100,f,1),f,0,200, gridlines=True)
///
<html><font color='black'><img src='cell://sage0.png'></font></html>
}}}

{{{id=347|
# example of modeling multi-filter FM detector

cf = 1000
dev = 85
start = 500
end = 1500
@interact
def curve(
cf = slider([500..2000],default=1000),
gain = slider([10..1000],default=200),
bpq = slider([1..20],default=6),
msq = slider([1..20],default=12),
qdev = slider([50..300],default=90),
qff = slider([-100..100],default=40),
bw = slider([200..1200])):
    bpff = cf + (qff/10) * 1000 / cf
    bp(f) = bpf(def_sr,bpq,bpff,f)
    m(f) = bpf(def_sr,msq,bpff+qdev,f)
    s(f) = bpf(def_sr,msq,bpff-qdev,f)
    v(f) = (m(f) - s(f)) * bp(f) * gain * .01
    mp = v(cf+qdev).n()
    zp = v(cf).n()
    sp = v(cf-qdev).n()
    print sp,zp,mp
    p = plot(v(f) ,f,cf-bw,cf+bw)
    ml = vl(cf+dev)
    sl = vl(cf-dev)
    show(p+ml+sl)
///
<html><!--notruncate--><div padding=6 id="div-interact-347"> <table width=800px height=20px bgcolor="#c5c5c5"
                 cellpadding=15><tr><td bgcolor="#f9f9f9" valign=top align=left><table>
<tr><td colspan=3><table><tr><td align=right><font color="black">cf&nbsp;</font></td><td><table><tr><td>
        <div id="slider-cf-347" style="margin:0px; margin-left: 1.0em; margin-right: 1.0em; width: 15.0em;"></div>
        </td><td><font color="black" id="slider-cf-347-lbl"></font></td></tr></table><script>(function(){ var values = ["500","503","506","509","512","515","518","521","524","527","530","533","536","539","542","545","548","551","554","557","560","563","566","569","572","575","578","581","584","587","590","593","596","599","602","605","608","611","614","617","620","623","626","629","632","635","638","641","644","647","650","653","656","659","662","665","668","671","674","677","680","683","686","689","692","695","698","701","704","707","710","713","716","719","722","725","728","731","734","737","740","743","746","749","752","755","758","761","764","767","770","773","776","779","782","785","788","791","794","797","800","803","806","809","812","815","818","821","824","827","830","833","836","839","842","845","848","851","854","857","860","863","866","869","872","875","878","881","884","887","890","893","896","899","902","905","908","911","914","917","920","923","926","929","932","935","938","941","944","947","950","953","956","959","962","965","968","971","974","977","980","983","986","989","992","995","998","1002","1005","1008","1011","1014","1017","1020","1023","1026","1029","1032","1035","1038","1041","1044","1047","1050","1053","1056","1059","1062","1065","1068","1071","1074","1077","1080","1083","1086","1089","1092","1095","1098","1101","1104","1107","1110","1113","1116","1119","1122","1125","1128","1131","1134","1137","1140","1143","1146","1149","1152","1155","1158","1161","1164","1167","1170","1173","1176","1179","1182","1185","1188","1191","1194","1197","1200","1203","1206","1209","1212","1215","1218","1221","1224","1227","1230","1233","1236","1239","1242","1245","1248","1251","1254","1257","1260","1263","1266","1269","1272","1275","1278","1281","1284","1287","1290","1293","1296","1299","1302","1305","1308","1311","1314","1317","1320","1323","1326","1329","1332","1335","1338","1341","1344","1347","1350","1353","1356","1359","1362","1365","1368","1371","1374","1377","1380","1383","1386","1389","1392","1395","1398","1401","1404","1407","1410","1413","1416","1419","1422","1425","1428","1431","1434","1437","1440","1443","1446","1449","1452","1455","1458","1461","1464","1467","1470","1473","1476","1479","1482","1485","1488","1491","1494","1497","1501","1504","1507","1510","1513","1516","1519","1522","1525","1528","1531","1534","1537","1540","1543","1546","1549","1552","1555","1558","1561","1564","1567","1570","1573","1576","1579","1582","1585","1588","1591","1594","1597","1600","1603","1606","1609","1612","1615","1618","1621","1624","1627","1630","1633","1636","1639","1642","1645","1648","1651","1654","1657","1660","1663","1666","1669","1672","1675","1678","1681","1684","1687","1690","1693","1696","1699","1702","1705","1708","1711","1714","1717","1720","1723","1726","1729","1732","1735","1738","1741","1744","1747","1750","1753","1756","1759","1762","1765","1768","1771","1774","1777","1780","1783","1786","1789","1792","1795","1798","1801","1804","1807","1810","1813","1816","1819","1822","1825","1828","1831","1834","1837","1840","1843","1846","1849","1852","1855","1858","1861","1864","1867","1870","1873","1876","1879","1882","1885","1888","1891","1894","1897","1900","1903","1906","1909","1912","1915","1918","1921","1924","1927","1930","1933","1936","1939","1942","1945","1948","1951","1954","1957","1960","1963","1966","1969","1972","1975","1978","1981","1984","1987","1990","1993","1996","2000"]; setTimeout(function() {
    $('#slider-cf-347').slider({
        step: 1, min: 0, max: 499, value: 166,
        change: function (e,ui) { var position = ui.value; if(values!=null) $('#slider-cf-347-lbl').text(values[position]); interact(347, '_interact_.update(\'347\', \'cf\', 1, _interact_.standard_b64decode(\''+encode64(position)+'\'), globals()); _interact_.recompute(\'347\');'); },
        slide: function(e,ui) { if(values!=null) $('#slider-cf-347-lbl').text(values[ui.value]); }
    });
    if(values != null) $('#slider-cf-347-lbl').text(values[$('#slider-cf-347').slider('value')]);
    }, 1); })();</script></td>
</tr><tr><td align=right><font color="black">gain&nbsp;</font></td><td><table><tr><td>
        <div id="slider-gain-347" style="margin:0px; margin-left: 1.0em; margin-right: 1.0em; width: 15.0em;"></div>
        </td><td><font color="black" id="slider-gain-347-lbl"></font></td></tr></table><script>(function(){ var values = ["10","11","13","15","17","19","21","23","25","27","29","31","33","35","37","39","41","43","45","47","49","51","53","55","57","59","61","63","65","67","69","71","73","75","77","79","81","83","85","87","89","91","93","95","97","99","101","103","105","107","109","111","113","115","117","119","121","123","125","127","129","131","133","134","136","138","140","142","144","146","148","150","152","154","156","158","160","162","164","166","168","170","172","174","176","178","180","182","184","186","188","190","192","194","196","198","200","202","204","206","208","210","212","214","216","218","220","222","224","226","228","230","232","234","236","238","240","242","244","246","248","250","252","254","256","257","259","261","263","265","267","269","271","273","275","277","279","281","283","285","287","289","291","293","295","297","299","301","303","305","307","309","311","313","315","317","319","321","323","325","327","329","331","333","335","337","339","341","343","345","347","349","351","353","355","357","359","361","363","365","367","369","371","373","375","377","379","381","382","384","386","388","390","392","394","396","398","400","402","404","406","408","410","412","414","416","418","420","422","424","426","428","430","432","434","436","438","440","442","444","446","448","450","452","454","456","458","460","462","464","466","468","470","472","474","476","478","480","482","484","486","488","490","492","494","496","498","500","502","504","505","507","509","511","513","515","517","519","521","523","525","527","529","531","533","535","537","539","541","543","545","547","549","551","553","555","557","559","561","563","565","567","569","571","573","575","577","579","581","583","585","587","589","591","593","595","597","599","601","603","605","607","609","611","613","615","617","619","621","623","625","627","628","630","632","634","636","638","640","642","644","646","648","650","652","654","656","658","660","662","664","666","668","670","672","674","676","678","680","682","684","686","688","690","692","694","696","698","700","702","704","706","708","710","712","714","716","718","720","722","724","726","728","730","732","734","736","738","740","742","744","746","748","750","752","753","755","757","759","761","763","765","767","769","771","773","775","777","779","781","783","785","787","789","791","793","795","797","799","801","803","805","807","809","811","813","815","817","819","821","823","825","827","829","831","833","835","837","839","841","843","845","847","849","851","853","855","857","859","861","863","865","867","869","871","873","875","876","878","880","882","884","886","888","890","892","894","896","898","900","902","904","906","908","910","912","914","916","918","920","922","924","926","928","930","932","934","936","938","940","942","944","946","948","950","952","954","956","958","960","962","964","966","968","970","972","974","976","978","980","982","984","986","988","990","992","994","996","998","1000"]; setTimeout(function() {
    $('#slider-gain-347').slider({
        step: 1, min: 0, max: 499, value: 96,
        change: function (e,ui) { var position = ui.value; if(values!=null) $('#slider-gain-347-lbl').text(values[position]); interact(347, '_interact_.update(\'347\', \'gain\', 2, _interact_.standard_b64decode(\''+encode64(position)+'\'), globals()); _interact_.recompute(\'347\');'); },
        slide: function(e,ui) { if(values!=null) $('#slider-gain-347-lbl').text(values[ui.value]); }
    });
    if(values != null) $('#slider-gain-347-lbl').text(values[$('#slider-gain-347').slider('value')]);
    }, 1); })();</script></td>
</tr><tr><td align=right><font color="black">bpq&nbsp;</font></td><td><table><tr><td>
        <div id="slider-bpq-347" style="margin:0px; margin-left: 1.0em; margin-right: 1.0em; width: 15.0em;"></div>
        </td><td><font color="black" id="slider-bpq-347-lbl"></font></td></tr></table><script>(function(){ var values = ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"]; setTimeout(function() {
    $('#slider-bpq-347').slider({
        step: 1, min: 0, max: 19, value: 5,
        change: function (e,ui) { var position = ui.value; if(values!=null) $('#slider-bpq-347-lbl').text(values[position]); interact(347, '_interact_.update(\'347\', \'bpq\', 3, _interact_.standard_b64decode(\''+encode64(position)+'\'), globals()); _interact_.recompute(\'347\');'); },
        slide: function(e,ui) { if(values!=null) $('#slider-bpq-347-lbl').text(values[ui.value]); }
    });
    if(values != null) $('#slider-bpq-347-lbl').text(values[$('#slider-bpq-347').slider('value')]);
    }, 1); })();</script></td>
</tr><tr><td align=right><font color="black">msq&nbsp;</font></td><td><table><tr><td>
        <div id="slider-msq-347" style="margin:0px; margin-left: 1.0em; margin-right: 1.0em; width: 15.0em;"></div>
        </td><td><font color="black" id="slider-msq-347-lbl"></font></td></tr></table><script>(function(){ var values = ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"]; setTimeout(function() {
    $('#slider-msq-347').slider({
        step: 1, min: 0, max: 19, value: 11,
        change: function (e,ui) { var position = ui.value; if(values!=null) $('#slider-msq-347-lbl').text(values[position]); interact(347, '_interact_.update(\'347\', \'msq\', 4, _interact_.standard_b64decode(\''+encode64(position)+'\'), globals()); _interact_.recompute(\'347\');'); },
        slide: function(e,ui) { if(values!=null) $('#slider-msq-347-lbl').text(values[ui.value]); }
    });
    if(values != null) $('#slider-msq-347-lbl').text(values[$('#slider-msq-347').slider('value')]);
    }, 1); })();</script></td>
</tr><tr><td align=right><font color="black">qdev&nbsp;</font></td><td><table><tr><td>
        <div id="slider-qdev-347" style="margin:0px; margin-left: 1.0em; margin-right: 1.0em; width: 15.0em;"></div>
        </td><td><font color="black" id="slider-qdev-347-lbl"></font></td></tr></table><script>(function(){ var values = ["50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","221","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245","246","247","248","249","250","251","252","253","254","255","256","257","258","259","260","261","262","263","264","265","266","267","268","269","270","271","272","273","274","275","276","277","278","279","280","281","282","283","284","285","286","287","288","289","290","291","292","293","294","295","296","297","298","299","300"]; setTimeout(function() {
    $('#slider-qdev-347').slider({
        step: 1, min: 0, max: 250, value: 40,
        change: function (e,ui) { var position = ui.value; if(values!=null) $('#slider-qdev-347-lbl').text(values[position]); interact(347, '_interact_.update(\'347\', \'qdev\', 5, _interact_.standard_b64decode(\''+encode64(position)+'\'), globals()); _interact_.recompute(\'347\');'); },
        slide: function(e,ui) { if(values!=null) $('#slider-qdev-347-lbl').text(values[ui.value]); }
    });
    if(values != null) $('#slider-qdev-347-lbl').text(values[$('#slider-qdev-347').slider('value')]);
    }, 1); })();</script></td>
</tr><tr><td align=right><font color="black">qff&nbsp;</font></td><td><table><tr><td>
        <div id="slider-qff-347" style="margin:0px; margin-left: 1.0em; margin-right: 1.0em; width: 15.0em;"></div>
        </td><td><font color="black" id="slider-qff-347-lbl"></font></td></tr></table><script>(function(){ var values = ["-100","-99","-98","-97","-96","-95","-94","-93","-92","-91","-90","-89","-88","-87","-86","-85","-84","-83","-82","-81","-80","-79","-78","-77","-76","-75","-74","-73","-72","-71","-70","-69","-68","-67","-66","-65","-64","-63","-62","-61","-60","-59","-58","-57","-56","-55","-54","-53","-52","-51","-50","-49","-48","-47","-46","-45","-44","-43","-42","-41","-40","-39","-38","-37","-36","-35","-34","-33","-32","-31","-30","-29","-28","-27","-26","-25","-24","-23","-22","-21","-20","-19","-18","-17","-16","-15","-14","-13","-12","-11","-10","-9","-8","-7","-6","-5","-4","-3","-2","-1","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60","61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","91","92","93","94","95","96","97","98","99","100"]; setTimeout(function() {
    $('#slider-qff-347').slider({
        step: 1, min: 0, max: 200, value: 140,
        change: function (e,ui) { var position = ui.value; if(values!=null) $('#slider-qff-347-lbl').text(values[position]); interact(347, '_interact_.update(\'347\', \'qff\', 6, _interact_.standard_b64decode(\''+encode64(position)+'\'), globals()); _interact_.recompute(\'347\');'); },
        slide: function(e,ui) { if(values!=null) $('#slider-qff-347-lbl').text(values[ui.value]); }
    });
    if(values != null) $('#slider-qff-347-lbl').text(values[$('#slider-qff-347').slider('value')]);
    }, 1); })();</script></td>
</tr><tr><td align=right><font color="black">bw&nbsp;</font></td><td><table><tr><td>
        <div id="slider-bw-347" style="margin:0px; margin-left: 1.0em; margin-right: 1.0em; width: 15.0em;"></div>
        </td><td><font color="black" id="slider-bw-347-lbl"></font></td></tr></table><script>(function(){ var values = ["200","202","204","206","208","210","212","214","216","218","220","222","224","226","228","230","232","234","236","238","240","242","244","246","248","250","252","254","256","258","260","262","264","266","268","270","272","274","276","278","280","282","284","286","288","290","292","294","296","298","300","302","304","306","308","310","312","314","316","318","320","322","324","326","328","330","332","334","336","338","340","342","344","346","348","350","352","354","356","358","360","362","364","366","368","370","372","374","376","378","380","382","384","386","388","390","392","394","396","398","400","402","404","406","408","410","412","414","416","418","420","422","424","426","428","430","432","434","436","438","440","442","444","446","448","450","452","454","456","458","460","462","464","466","468","470","472","474","476","478","480","482","484","486","488","490","492","494","496","498","500","502","504","506","508","510","512","514","516","518","520","522","524","526","528","530","532","534","536","538","540","542","544","546","548","550","552","554","556","558","560","562","564","566","568","570","572","574","576","578","580","582","584","586","588","590","592","594","596","598","600","602","604","606","608","610","612","614","616","618","620","622","624","626","628","630","632","634","636","638","640","642","644","646","648","650","652","654","656","658","660","662","664","666","668","670","672","674","676","678","680","682","684","686","688","690","692","694","696","698","701","703","705","707","709","711","713","715","717","719","721","723","725","727","729","731","733","735","737","739","741","743","745","747","749","751","753","755","757","759","761","763","765","767","769","771","773","775","777","779","781","783","785","787","789","791","793","795","797","799","801","803","805","807","809","811","813","815","817","819","821","823","825","827","829","831","833","835","837","839","841","843","845","847","849","851","853","855","857","859","861","863","865","867","869","871","873","875","877","879","881","883","885","887","889","891","893","895","897","899","901","903","905","907","909","911","913","915","917","919","921","923","925","927","929","931","933","935","937","939","941","943","945","947","949","951","953","955","957","959","961","963","965","967","969","971","973","975","977","979","981","983","985","987","989","991","993","995","997","999","1001","1003","1005","1007","1009","1011","1013","1015","1017","1019","1021","1023","1025","1027","1029","1031","1033","1035","1037","1039","1041","1043","1045","1047","1049","1051","1053","1055","1057","1059","1061","1063","1065","1067","1069","1071","1073","1075","1077","1079","1081","1083","1085","1087","1089","1091","1093","1095","1097","1099","1101","1103","1105","1107","1109","1111","1113","1115","1117","1119","1121","1123","1125","1127","1129","1131","1133","1135","1137","1139","1141","1143","1145","1147","1149","1151","1153","1155","1157","1159","1161","1163","1165","1167","1169","1171","1173","1175","1177","1179","1181","1183","1185","1187","1189","1191","1193","1195","1197","1199"]; setTimeout(function() {
    $('#slider-bw-347').slider({
        step: 1, min: 0, max: 499, value: 0,
        change: function (e,ui) { var position = ui.value; if(values!=null) $('#slider-bw-347-lbl').text(values[position]); interact(347, '_interact_.update(\'347\', \'bw\', 7, _interact_.standard_b64decode(\''+encode64(position)+'\'), globals()); _interact_.recompute(\'347\');'); },
        slide: function(e,ui) { if(values!=null) $('#slider-bw-347-lbl').text(values[ui.value]); }
    });
    if(values != null) $('#slider-bw-347-lbl').text(values[$('#slider-bw-347').slider('value')]);
    }, 1); })();</script></td>
</tr></table></td></tr>
<tr><td></td><td style='width: 100%;'><div id="cell-interact-347"><?__SAGE__START>
        <table border=0 bgcolor="white" width=100%>
        <tr><td bgcolor="white" align=left valign=top><pre><?__SAGE__TEXT></pre></td></tr>
        <tr><td  align=left valign=top><?__SAGE__HTML></td></tr>
        </table><?__SAGE__END></div></td><td></td></tr>
<tr><td colspan=3></td></tr>
</table></td>
                 </tr></table></div>
                 </html>
}}}

{{{id=365|

///
}}}