What I read in April 2025
cloth simulation
- HN link: Cloth | Hacker News
- article link: @cloudofoz - Verlet simulation test
- another good post: Pikuma: Verlet Integration and Cloth Physics Simulation
A cool website about cloth interaction, implemented based on Verlet Integration. Gonna make one myself.
Verlet Integration plays an important role in many game physics engines. It’s less expensive than, for example, Runge-Kutta methods (though also less accurate), but it’s also much more stable thanEuler method.
Have a feeling that I’ve heard these names in college.…
Why can’t HTML alone do includes?
- HN link: Why can’t HTML alone do includes? | Hacker News
- article link: Seeking an Answer: Why can’t HTML alone do includes? – Frontend Masters Blog
CSS can import CSS, JavaScript can import JavaScript, HTML cannot import HTML. There are many solutions, but none of the solutions is HTML.
Github issues page of HTML: Issues · whatwg/html
The Product-Minded Software Engineer
It’s recommended from a GeekTime course about learning English.
树状数组
唐巧的博客最近出了一系列OJ教学的文章,所谓CSPJ,根据这篇介绍,是辅导备战NOIP的小学/初中生的。之前都是二分、DFS之类基础内容,这次变成没见过的模板题了,很快能看完,了解一下也比较有意思。
树状数组或二元索引树(英语:Binary Indexed Tree,简称 BIT),又以其发明者命名为Fenwick树。这是个专门构造的数据结构,在一维数组里存储树形结构,可以降低区间求和的时间复杂度。
定义: 对于一个长度为 N 的序列,为了满足上面提到的更快的区间求和和更新的需求,我们可以构造一个树状数组。 通过构造另一个长度为 N 的数组,来做到:
- 区间求和,时间复杂度
O(log N)
- 更新某一个数,时间复杂度
O(log N)
因为树状数组需要另外创建一个长度为 N 的数组,所以它的空间复杂度为O(N)
。
tbh, recently I always feel that learning all those things is of little use. For example, I got something about cloth simulation, learned a little about BIT, read some articles on HN. But what’s the point of doing these?
Perhaps because I have to go to work tomorrow that makes me think this way… But on second thought, actually none of those things are fully accomplished, I haven’t accomplished a cloth simulation myself, and didn’t solve programming problem about BIT. Many articles and books are read half or even less, and for those I’ve finished, I can’t really remember many thing about it, which makes me think it’s a waste of time. I’m not satisfied at this situation, so I plan to focus on several articles and complete all related tasks, This will make me feel much better.