diff options
-rw-r--r-- | 2020/04/hyperphysics/light_and_vision/index_of_refaction.md | 15 | ||||
-rw-r--r-- | 2020/04/hyperphysics/light_and_vision/inverse_square_law.md | 6 | ||||
-rw-r--r-- | 2020/04/hyperphysics/light_and_vision/power_solid_angle.md | 24 | ||||
-rw-r--r-- | 2020/04/hyperphysics/light_and_vision/raman_scattering.md | 7 | ||||
-rw-r--r-- | 2020/04/hyperphysics/light_and_vision/rayleigh_scattering.md | 17 | ||||
-rw-r--r-- | 2020/04/hyperphysics/light_and_vision/snells_law.md | 15 | ||||
-rw-r--r-- | 2020/04/hyperphysics/values.md | 4 | ||||
-rw-r--r-- | 2020/04/latex.md | 2 | ||||
-rw-r--r-- | 2020/04/mathml.md | 21 | ||||
-rw-r--r-- | 2020/2020-04-27.md | 51 | ||||
-rw-r--r-- | 2020/projects.md | 22 |
11 files changed, 184 insertions, 0 deletions
diff --git a/2020/04/hyperphysics/light_and_vision/index_of_refaction.md b/2020/04/hyperphysics/light_and_vision/index_of_refaction.md new file mode 100644 index 0000000..3773c0e --- /dev/null +++ b/2020/04/hyperphysics/light_and_vision/index_of_refaction.md @@ -0,0 +1,15 @@ + +; http://hyperphysics.phy-astr.gsu.edu/hbase/geoopt/refr.html + +(eq nu (/ c v)) + +(var nu "index of refraction") +(var c "velocity of light in vacuum") +(var v "velocity of light in the medium") + +; Material examples for nu: +; Vacuum 1.000 +; Air 1.000277 +; Water 4/3 +; Ice 1.31 +; Crown glass 1.50 to 1.62 diff --git a/2020/04/hyperphysics/light_and_vision/inverse_square_law.md b/2020/04/hyperphysics/light_and_vision/inverse_square_law.md new file mode 100644 index 0000000..f571c0f --- /dev/null +++ b/2020/04/hyperphysics/light_and_vision/inverse_square_law.md @@ -0,0 +1,6 @@ + +; see power_solid_angle + +(eq E + (/ I (exp r 2))) + diff --git a/2020/04/hyperphysics/light_and_vision/power_solid_angle.md b/2020/04/hyperphysics/light_and_vision/power_solid_angle.md new file mode 100644 index 0000000..e1788b4 --- /dev/null +++ b/2020/04/hyperphysics/light_and_vision/power_solid_angle.md @@ -0,0 +1,24 @@ + +; "lux" is lumens / m^2 + +; (var 'symbol 'name 'units) + +(var E "illuminance" 'lux) +(var Theta "luminous power" 'lumens) +(var I "pointance" 'candela) +(var Omega "solid angle" 'sterradians) + +(eq Theta + (* 4 pi I)) + +(eq E + (/ Theta A) + (/ (* I Omega) A) + (/ (* I A) (* A (exp r 2))) + (/ I (exp r 2))) + +(eq Omega + (/ A (exp r 2))) + +(eq I + (partial-derivative Theta omega)) diff --git a/2020/04/hyperphysics/light_and_vision/raman_scattering.md b/2020/04/hyperphysics/light_and_vision/raman_scattering.md new file mode 100644 index 0000000..763e1e5 --- /dev/null +++ b/2020/04/hyperphysics/light_and_vision/raman_scattering.md @@ -0,0 +1,7 @@ + +(var DeltaE "change in energy") + +(eq DeltaE + (* (/ hbar (* 2 pi I)) + (+ (* 2 J) + 3))) diff --git a/2020/04/hyperphysics/light_and_vision/rayleigh_scattering.md b/2020/04/hyperphysics/light_and_vision/rayleigh_scattering.md new file mode 100644 index 0000000..d7df4ba --- /dev/null +++ b/2020/04/hyperphysics/light_and_vision/rayleigh_scattering.md @@ -0,0 +1,17 @@ + +; http://hyperphysics.phy-astr.gsu.edu/hbase/atmos/blusky.html#c1 + +(var N "number of scatterers") +(var alpha "polarizability") +(var R "distance from scatterer") +(var I_0 "original intensity") +(var I "scattered intensity") +(var lambda "wavelength of light") +(var Theta "angle of scattering") + +(eq I + (* I_0 + (/ (* 8 (exp pi 4) N (exp alpha 2)) + (* (exp lambda 4) (exp R 2))) + (+ 1 ((exp cos 2) Theta)))) + diff --git a/2020/04/hyperphysics/light_and_vision/snells_law.md b/2020/04/hyperphysics/light_and_vision/snells_law.md new file mode 100644 index 0000000..56add0d --- /dev/null +++ b/2020/04/hyperphysics/light_and_vision/snells_law.md @@ -0,0 +1,15 @@ + +Snell's Law + +(eq (/ n_1 n_2) + (/ (sin Omega_2) + (sin Omega_1))) + +(Omega_1 "angle from boundry for first medium") +(Omega_2 "angle from boundry for second medium") +(n_1 "index of refaction of first medium") +(n_2 "index of refaction of second medium") + + +good example is the 22 degree halo: Ice (n=1.31), two refractions from 60 +degree prism (hexagonal ice crystal) diff --git a/2020/04/hyperphysics/values.md b/2020/04/hyperphysics/values.md new file mode 100644 index 0000000..ec69b7c --- /dev/null +++ b/2020/04/hyperphysics/values.md @@ -0,0 +1,4 @@ + +; (contant 'symbol 'name 'units 'value) + +(constant c "velocity of light in vacuum" (/ 'meters 'second) 2.99792458e10) diff --git a/2020/04/latex.md b/2020/04/latex.md new file mode 100644 index 0000000..abd0aea --- /dev/null +++ b/2020/04/latex.md @@ -0,0 +1,2 @@ + +KaTeX table of supported/not-supported characters: <https://katex.org/docs/support_table.html> diff --git a/2020/04/mathml.md b/2020/04/mathml.md new file mode 100644 index 0000000..6957680 --- /dev/null +++ b/2020/04/mathml.md @@ -0,0 +1,21 @@ + +<https://www.w3.org/TR/MathML3/> + +<https://en.wikipedia.org/wiki/MathML> + +"Strict Content MathML" is a subset, compatible with Open Math (which is itself an XML encoding). + +Systems Biology Markup Language (SBML) is another XML schema for representing +models of biological systems and chemical reactions. +=> <http://sbml.org/More_Detailed_Summary_of_SBML> + +There are a bunch of non-printing "entities" (characters) with Unicode mappings: + +U+2061 FUNCTION APPLICATION; +U+2062 INVISIBLE TIMES; +U+2063 INVISIBLE SEPARATOR; +U+2064 INVISIBLE PLUS; + + +Presumably, we'll want to support reading *content* MathML, and output eithr +content or presentation. diff --git a/2020/2020-04-27.md b/2020/2020-04-27.md new file mode 100644 index 0000000..c1481a5 --- /dev/null +++ b/2020/2020-04-27.md @@ -0,0 +1,51 @@ + +## MathML + +Seems like MathML and the ecosystem are actually pretty interesting. "Open +Math" is similar to content MathML (eg, also XML), but designed for +interchange. SBML has a relatively large academic community (looks like many +student projects building simulators or old-style IDEs). + +A version 4 is being standardized: <https://mathml-refresh.github.io/> + +## Wikidata + +What equations/models/formulae are there already in wikidata? + +There is ["defining formula"](https://www.wikidata.org/wiki/Property:P2534), +which is an instance of a "mathematical expression", which enforces +LaTeX-ish parse-ability and rendering with MathML. Currently about 4,500 +instances in wikidata (!). + +Alternatively there is [TeX string](https://www.wikidata.org/wiki/Property:P1993). + +Eg, quadratic equation has LaTeX-y output: <https://www.wikidata.org/wiki/Q15909572> + +Wowa! SPARQL query to describe the components of ideal gas law: +<https://query.wikidata.org/#%23Explain%20identifiers%20in%20ideal%20gas%20law%20%28wd%3AQ11432%29%0ASELECT%20%3Fidentifier%20%3FdescriptionLabel%20WHERE%20%7B%0Awd%3AQ11432%20p%3AP527%20%3Fstatement2.%0A%3Fstatement2%20ps%3AP527%20%3Fdescription.%0A%3Fstatement2%20pq%3AP2534%20%3Fidentifier.%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%0A%7D> + +## Short Links + +Rust `latex2mathml` crate, for presentation MathML. Has no depdendencies! Good +to read. +<https://github.com/osanshouo/latex2mathml/blob/master/src/lib.rs> + +Rust sbml and mathml parser crates. +<https://crates.io/crates/sbml> + +libroadrunner is a C library for simulating SBML models. It wraps SUNDIALS and +libSBML. There is a python wrapper. +<http://libroadrunner.org/> + +LibSBMLSim seems like a simple SBML model simulator. +<http://fun.bio.keio.ac.jp/software/libsbmlsim/> + +POPCORN is an alternative syntax for Open Math +<http://web.archive.org/web/20150822191347/http://java.symcomp.org/FormalPopcorn.html> + +Biomodels is a database of SBML models. Here is one of influenza epidemic modeling: +<http://www.ebi.ac.uk/biomodels/content/model-of-the-month?year=2020&month=03> + +AsciiMath is a simple infix/C style notation. It can be transformed to MathML by MathJax. +<https://en.wikipedia.org/wiki/AsciiMath> + diff --git a/2020/projects.md b/2020/projects.md new file mode 100644 index 0000000..6b59447 --- /dev/null +++ b/2020/projects.md @@ -0,0 +1,22 @@ + +Have some specific projects and ideas to get started on: + +- encode the equations in hyperphysics +- parse (input) latex math and mathml using rust +- runtime to evolve/integrate systems, then visualize output + +Open questions: + +- encoding of functions, operators +- atomic unit of symbols/variables. eg `R_0`, `R_t=0`, `R` confusion +- "gradual typing" of units + +Other half-baked thoughts: + +- observable HQ demos +- add equations/models to wikidata + => raw equation as mathml/latex? + => also +- scrape out latex/equations from wikipedia dumps +- probably going to be dual rust/racket. I think that is ok? +- those epidemic model interactive tools were really nice |