@@ -359,31 +359,32 @@ end
359359; Copyright 2023 Uri Wilensky.
360360; See Info tab for full copyright and license.]]> </code >
361361 <widgets >
362- <view x =" 215" wrappingAllowedX =" true" y =" 30" frameRate =" 30.0" minPycor =" 0" height =" 129" showTickCounter =" true" patchSize =" 25.0" fontSize =" 10" wrappingAllowedY =" true" width =" 404" tickCounterLabel =" ticks" maxPycor =" 4" updateMode =" 1" maxPxcor =" 15" minPxcor =" 0" ></view >
363- <button x =" 0" y =" 45" height =" 33" disableUntilTicks =" false" forever =" false" kind =" Observer" width =" 85" sizeVersion =" 0" >setup
364- </button >
365- <button x =" 90" y =" 45" height =" 33" disableUntilTicks =" true" forever =" true" kind =" Observer" width =" 85" sizeVersion =" 0" >go</button >
366- <slider x =" 0" step =" .1" y =" 10" max =" 1" display =" doping" height =" 33" min =" -1" direction =" Horizontal" default =" -0.4" variable =" doping" width =" 175" sizeVersion =" 0" ></slider >
367- <slider x =" 0" step =" .1" y =" 150" max =" 3" display =" temperature" height =" 33" min =" 0.1" direction =" Horizontal" default =" 2.0" variable =" temperature" width =" 175" sizeVersion =" 0" ></slider >
368- <slider x =" 0" step =" 1" y =" 80" max =" 10" display =" band-gap" height =" 33" min =" 1" direction =" Horizontal" default =" 5.0" variable =" band-gap" width =" 175" sizeVersion =" 0" ></slider >
369- <slider x =" 0" step =" .1" y =" 115" max =" 4" display =" voltage" height =" 33" min =" 0" direction =" Horizontal" default =" 2.0" variable =" voltage" width =" 175" sizeVersion =" 0" ></slider >
370- <button x =" 0" y =" 275" height =" 33" disableUntilTicks =" false" forever =" false" kind =" Observer" display =" watch hole" width =" 90" sizeVersion =" 0" >clear-drawing
371- if any? holes [
372- ask min-one-of holes [xcor] [pen-down watch-me]
373- ]</button >
374- <monitor x =" 215" precision =" 17" y =" 325" height =" 45" fontSize =" 11" display =" # free electrons" width =" 110" sizeVersion =" 0" >count electrons</monitor >
375- <monitor x =" 330" precision =" 17" y =" 325" height =" 45" fontSize =" 11" display =" # holes" width =" 85" sizeVersion =" 0" >count holes</monitor >
376- <monitor x =" 485" precision =" 2" y =" 325" height =" 45" fontSize =" 11" display =" current" width =" 88" sizeVersion =" 0" >current</monitor >
377- <monitor x =" 35" precision =" 2" y =" 185" height =" 45" fontSize =" 11" display =" scatter probability" width =" 112" sizeVersion =" 0" >scatter-prob</monitor >
378- <button x =" 95" y =" 275" height =" 33" disableUntilTicks =" false" forever =" false" kind =" Observer" display =" watch electron" width =" 90" sizeVersion =" 0" >clear-drawing
362+ <view x =" 270" wrappingAllowedX =" true" y =" 27" frameRate =" 30.0" minPycor =" 0" height =" 155" showTickCounter =" true" patchSize =" 30.2" fontSize =" 10" wrappingAllowedY =" true" width =" 487" tickCounterLabel =" ticks" maxPycor =" 4" updateMode =" 1" maxPxcor =" 15" minPxcor =" 0" ></view >
363+ <button x =" 860" y =" 72" height =" 35" disableUntilTicks =" false" forever =" false" kind =" Observer" width =" 95" display =" watch electron" >clear-drawing
379364if any? electrons [
380365ask max-one-of electrons [xcor] [pen-down watch-me]
381366]
382367</button >
383- <button x =" 35" y =" 310" height =" 33" disableUntilTicks =" false" forever =" false" kind =" Observer" display =" clear drawing" width =" 110" sizeVersion =" 0" >clear-drawing</button >
384- <note x =" 530" y =" 10" height =" 18" backgroundDark =" 0" fontSize =" 11" width =" 150" markdown =" false" textColorLight =" -16777216" backgroundLight =" 0" >Battery-negative</note >
385- <note x =" 215" y =" 10" height =" 18" backgroundDark =" 0" fontSize =" 11" width =" 150" markdown =" false" textColorLight =" -16777216" backgroundLight =" 0" >Battery-positive</note >
386- <plot x =" 420" autoPlotX =" false" yMax =" 3.0" autoPlotY =" false" yAxis =" current" y =" 170" xMin =" 0.0" height =" 150" legend =" false" xMax =" 10.0" yMin =" 0.0" xAxis =" ticks" display =" current vs time" width =" 205" sizeVersion =" 0" >
368+ <note x =" 485" y =" 362" backgroundDark =" 0" fontSize =" 20" width =" 25" markdown =" false" height =" 18" textColorDark =" -1" textColorLight =" -6995700" backgroundLight =" 0" >■</note >
369+ <note x =" 345" y =" 362" backgroundDark =" 0" fontSize =" 20" width =" 30" markdown =" false" height =" 18" textColorDark =" -1" textColorLight =" -16777216" backgroundLight =" 0" >■</note >
370+ <monitor x =" 270" precision =" 17" y =" 357" height =" 60" fontSize =" 11" width =" 110" display =" # holes" >count holes</monitor >
371+ <monitor x =" 600" precision =" 2" y =" 357" height =" 60" fontSize =" 11" width =" 100" display =" current" >current</monitor >
372+ <monitor x =" 389" precision =" 17" y =" 357" height =" 60" fontSize =" 11" width =" 125" display =" # free electrons" >count electrons</monitor >
373+ <plot x =" 270" autoPlotX =" true" yMax =" 90.0" autoPlotY =" true" yAxis =" #" y =" 187" xMin =" 0.0" height =" 165" legend =" false" xMax =" 10.0" yMin =" 0.0" width =" 245" xAxis =" ticks" display =" # holes and free electrons" >
374+ <setup ></setup >
375+ <update ><![CDATA[ if plot-x-max < ticks [
376+ set-plot-x-range 0 round (ticks * 1.25)
377+ ]]]> </update >
378+ <pen interval =" 1.0" mode =" 0" display =" holes" color =" -16777216" legend =" true" >
379+ <setup ></setup >
380+ <update >plot count holes</update >
381+ </pen >
382+ <pen interval =" 1.0" mode =" 0" display =" electrons" color =" -6995700" legend =" true" >
383+ <setup ></setup >
384+ <update >plot count electrons</update >
385+ </pen >
386+ </plot >
387+ <plot x =" 522" autoPlotX =" false" yMax =" 3.0" autoPlotY =" false" yAxis =" current" y =" 187" xMin =" 0.0" height =" 165" legend =" false" xMax =" 10.0" yMin =" 0.0" width =" 235" xAxis =" ticks" display =" current vs time" >
387388 <setup >set-plot-x-range 0 10</setup >
388389 <update ><![CDATA[ if plot-x-max < ticks [
389390set-plot-x-range 0 round (ticks * 1.25)
@@ -400,24 +401,23 @@ plotxy plot-x-max 0]]></update>
400401if flow-timer > 10 [plot current] ]]> </update >
401402 </pen >
402403 </plot >
403- <plot x =" 215" autoPlotX =" true" yMax =" 90.0" autoPlotY =" true" yAxis =" #" y =" 170" xMin =" 0.0" height =" 150" legend =" false" xMax =" 10.0" yMin =" 0.0" xAxis =" ticks" display =" # holes and free electrons" width =" 200" sizeVersion =" 0" >
404- <setup ></setup >
405- <update ><![CDATA[ if plot-x-max < ticks [
406- set-plot-x-range 0 round (ticks * 1.25)
407- ]]]> </update >
408- <pen interval =" 1.0" mode =" 0" display =" holes" color =" -16777216" legend =" true" >
409- <setup ></setup >
410- <update >plot count holes</update >
411- </pen >
412- <pen interval =" 1.0" mode =" 0" display =" electrons" color =" -6995700" legend =" true" >
413- <setup ></setup >
414- <update >plot count electrons</update >
415- </pen >
416- </plot >
417- <note x =" 310" y =" 320" height =" 21" backgroundDark =" 0" fontSize =" 20" width =" 25" markdown =" false" textColorLight =" -6995700" backgroundLight =" 0" >■</note >
418- <note x =" 400" y =" 320" height =" 21" backgroundDark =" 0" fontSize =" 20" width =" 30" markdown =" false" textColorLight =" -16777216" backgroundLight =" 0" >■</note >
419- <button x =" 10" y =" 345" height =" 33" disableUntilTicks =" false" forever =" false" kind =" Observer" display =" restore initial slider settings" width =" 175" sizeVersion =" 0" >restore-initial-settings</button >
420- <switch x =" 0" y =" 235" height =" 33" on =" false" variable =" visualize-pair-generation?" display =" visualize-pair-generation?" width =" 195" sizeVersion =" 0" ></switch >
404+ <switch x =" 765" y =" 27" height =" 37" on =" false" variable =" visualize-pair-generation?" width =" 195" display =" visualize-pair-generation?" ></switch >
405+ <button x =" 800" y =" 109" height =" 35" disableUntilTicks =" false" forever =" false" kind =" Observer" width =" 110" display =" clear drawing" >clear-drawing</button >
406+ <button x =" 765" y =" 69" height =" 35" disableUntilTicks =" false" forever =" false" kind =" Observer" width =" 90" display =" watch hole" >clear-drawing
407+ if any? holes [
408+ ask min-one-of holes [xcor] [pen-down watch-me]
409+ ]</button >
410+ <note x =" 290" y =" 7" backgroundDark =" 0" fontSize =" 11" width =" 150" markdown =" false" height =" 18" textColorDark =" -1" textColorLight =" -16777216" backgroundLight =" 0" >Battery-positive</note >
411+ <note x =" 605" y =" 7" backgroundDark =" 0" fontSize =" 11" width =" 150" markdown =" false" height =" 18" textColorDark =" -1" textColorLight =" -16777216" backgroundLight =" 0" >Battery-negative</note >
412+ <slider x =" 10" step =" .1" y =" 30" max =" 1" width =" 250" display =" doping" height =" 50" min =" -1" direction =" Horizontal" default =" -0.4" variable =" doping" ></slider >
413+ <button x =" 40" y =" 85" height =" 40" disableUntilTicks =" false" forever =" false" kind =" Observer" width =" 90" >setup
414+ </button >
415+ <button x =" 135" y =" 85" height =" 40" disableUntilTicks =" true" forever =" true" kind =" Observer" width =" 90" >go</button >
416+ <slider x =" 10" step =" 1" y =" 131" max =" 10" width =" 250" display =" band-gap" height =" 50" min =" 1" direction =" Horizontal" default =" 5.0" variable =" band-gap" ></slider >
417+ <monitor x =" 70" precision =" 2" y =" 287" height =" 60" fontSize =" 11" width =" 112" display =" scatter probability" >scatter-prob</monitor >
418+ <slider x =" 10" step =" .1" y =" 183" max =" 4" width =" 250" display =" voltage" height =" 50" min =" 0" direction =" Horizontal" default =" 2.0" variable =" voltage" ></slider >
419+ <slider x =" 10" step =" .1" y =" 235" max =" 3" width =" 250" display =" temperature" height =" 50" min =" 0.1" direction =" Horizontal" default =" 2.0" variable =" temperature" ></slider >
420+ <button x =" 35" y =" 355" height =" 45" disableUntilTicks =" false" forever =" false" kind =" Observer" width =" 175" display =" restore initial slider settings" >restore-initial-settings</button >
421421 </widgets >
422422 <info ><![CDATA[ ## WHAT IS IT?
423423
0 commit comments