- Apr 12, 2020
A reversible elementary reaction takes place inside a closed, highly thermally conductive container of constant volume, whose reactants are all gases. Given the reaction equations and the reaction rate constants, a natural question to ask is how the concentration of each gas changes w.r.t. time. In this article, I will answer this question by proposing a general approach to solve it.
- Mar 27, 2020
This article explores the concept which I call the frequency assignment, which is a mapping from N (the set of notes) to R+ (the set of frequencies). Concepts such as octaves, intervals, and equal temperaments are introduced.
- Feb 9, 2020
Monkey-patching is a powerful tool in programming. In this article, I used techniques of Ruby metaprogramming to define a series of methods def_after
, def_before
, etc. to help monkey-patching. They look graciously in that we can use it to shorten the codes for monkey-patching (avoiding aliasing and repeating codes).
- Jan 25, 2020
In this article, I introduce the barycentric coordinates: it is an elegant way to represent geometric shapes related to a simplex. By using it, given a simplex, we can construct a hyperellipsoid with the properties: its surface passes every vertex of the simplex, and its tangent hyperplane at each vertex is parallel to the hyperplane containing all other vertices.
- Jan 6, 2020
In this article, I try exploring an idea: using complex numbers to combine pairs of canonical variables into complex variables: c:=αq+iβp. It turns out that we can write canonical equations dtdc=−2iαβ∂c∗∂H, Poisson brackets
{f,g}=−2iαβ(∂c∂f⋅∂c∗∂g−∂c∗∂f⋅∂c∂g), and canonical transformations
∂c′∗∂c∗=∂c∂c′,∂c′∗∂c=−∂c∗∂c′ in these complex numbers. Finally, I show two examples of using them in real problems: a free particle, and a harmonic oscillator.