[Engineering] Squircle

This article is aimed to help you implement the Figma’s corner smoothing effect step by step.


In design, rounded rectangle are a very common geometry used to enhance visual effects. Since iOS7, Apple proposed a new type of rounded icon that provide “pop” visual effect with something subtle around the corner. Initial reversing work comes from Marc Edwards, which reveals that this kind of contour might be governed by Superellipse $(\frac{x}{a})^n + (\frac{y}{b})^n = 1 $ with $n>2$

Read more →

[Principia] Hamillton’s Principle

最近学习分析力学,朗道那本《力学》开篇就是最小作用量原理,把人搞得非常晕。只看那本书是不行的,完全是毫无感情的客观描述, 对于理解这种抽象的定律毫无帮助。去年年初就打算学习理论力学,当时找了哈工大任延宇老师的理论力学公开课看,当时感觉讲得非常好,

Read more →

[Principia] The Laws of Conservation

We re-examine the conservation of energy and momentum we learned in middle school from a purely mathematical perspective, and then we derive the conservation of angular momentum from the same perspective.


我们从纯数学的角度来重新审视中学学过的能量守恒和动量守恒,然后我们再通过同样的角度得出角动量守恒。

Read more →

[Programming Language] Rust vs C++

这篇文章通过一些C++和Rust代码片段做对比,对Rust核心特点进行快速介绍。适合熟悉C/C++并且不熟悉Rust的读者,并且帮助他们快速熟悉Rust的特点。注意,这篇文章不能让你学会写Rust,只是帮助你快速理解Rust的一些特性。

Read more →