Cbirds是一款开源终端应用,利用Craig Reynolds在1987年SIGGRAPH会议发表的《Flocks, Herds, and Schools》论文中的boids算法,在终端窗口中动态模拟鸟群的飞行行为1。该程序采用C99编写,不依赖任何外部库,支持macOS和Linux平台(amd64或arm64架构),可通过Homebrew(brew install clainstone/tap/cbirds)或apt包管理器安装1。
程序提供多种渲染模式供用户选择,包括braille文字、sextants、blocks以及Kitty图形协议1。默认设置下运行800只鸟,精灵尺寸为30像素,帧率为60fps,用户可通过--unlock-fps参数解除帧率限制1。性能方面,800只鸟的运算耗时约为每帧0.5毫秒,4000只鸟约为每帧4毫秒1。该项目采用MIT许可证发布1。
Cbirds is an open-source terminal application that simulates flocking behavior using Craig Reynolds' boids algorithm, a foundational model from his 1987 SIGGRAPH paper "Flocks, Herds, and Schools."1 Written as a single C99 program with no external dependencies, the tool runs on macOS and Linux systems supporting either amd64 or arm64 architectures.1 Installation is straightforward through package managers: users can install via Homebrew with brew install clainstone/tap/cbirds or through apt with apt install cbirds.1
The application offers flexible configuration and rendering options to suit different terminal environments and preferences.1 By default, it simulates 800 birds with a sprite size of 30 pixels and operates at 60 frames per second, though users can unlock the frame rate cap with the --unlock-fps flag.1 The tool supports multiple rendering modes including braille characters, sextants, blocks, and the Kitty graphics protocol, allowing it to adapt to various terminal capabilities.1 Performance scales reasonably with flock size: 800 birds consume approximately 0.5 milliseconds of CPU per frame, while a larger flock of 4,000 birds requires about 4 milliseconds per frame.1 The project is distributed under the MIT license.1
评论
还没有评论,欢迎留下第一条。