Vector illustration of a hand holding a bonsai tree

Linux Candy: PyBonsai – generates procedural ASCII art trees

In Operation

Here’s example output from running the command $ pybonsai

PyBonsai in action

PyBonsai supports four different tree types: Classic, Fibonacci, Offset Fibonacci, and Random Fibonacci. By default the program uses a random tree type, but this can be overridden.

There are lots of other configuration options available. Here’s a short outline:

  • Choose a seed for the random number generator
  • Instant mode – the finished tree is displayed immediately.
  • Wait – time delay between drawing characters..
  • Branch characters – string of characters randomly chosen for the branches.
  • Leaf characters – string of characters randomly chosen for the leaves
  • Define the maximum width and height of the tree.
  • Define the length of the root branch,.
  • Define the length of each leaf.
  • Define the number of branch layers.
  • Set the mean angle of branches to their parent.
  • Fixed window option.

Summary

PyBonsai is a lovely addition to our Linux Candy series. PyBonsai trees look more like trees you find in a forest.

PyBonsai uses ANSI escape codes for colouring characters. Almost all modern terminals are supported.

Website: github.com/Ben-Edwards44/PyBonsai
Support:
Developer: Ben Edwards
License: MIT License

PyBonsai is written in Python. Learn Python with our recommended free books and free tutorials.

Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary


Complete list of articles in this series:

Linux Candy
ASCIIQuariumEmbrace marine life from the terminal with beautiful ASCII art
ASCII Art ConverterA small utility that converts images into ASCII art
BobRossQuotesCollection of quotes from Bob Ross
BoxesCommand line ASCII boxes
BuohOnline strips comics reader
cacafireColor ASCII fire
catclockxclock with an enhanced cat mode
cbonsaiGenerate bonsai trees in the terminal
christmasfetchFestive cheer on the desktop
chucknorrisChuck Norris jokes in your terminal
cornyjokesCorny jokes for the terminal
CMatrixncurses program that simulates the display from “The Matrix”
ctreeA Christmas tree right on your terminal
eDEX-UISci-fi computer terminal emulator and system monitor
emojSimple tool that to find suitable emojis for pasting to your clipboard
EmoteModern popup emoji picker
EvolvotronInteractive generative art
FantasceneDynamic wallpaper changer
FondoFind beautiful wallpapers from Unsplash
gtiTypo-based curio inspired by Steam Locomotive
HollywoodFill your console with Hollywood melodrama technobabble
linuxwaveGenerate music from the entropy of Linux
lolcatRainbows and unicorns
No More SecretsRecreates the data decryption effect from the Sneakers movie
nookPlays Animal Crossing hourly themes on the hour
nyancatTerminal-based Pop Tart Cat Animation
onekoAnimal chasing fun
pipes.shAnimated pipes terminal screensaver
ponysaycowsay reimplemention for ponies
projectMMusic visualizer originally based on Milkdrop
pscircleA different take on the venerable ps command
PyBonsaiGenerates procedural ASCII art trees
pyjokesOne line jokes for programmers
PywalGenerate color schemes on the fly
RelaxatorRelax to soothing sounds
Rusty AquariumMonitoring by visualization
Steam LocomotiveC program written in 295 lines. It's harmless fun
TernimalAnimated lifeform in the terminal
terminal-parrotParty parrot time
tetrisTile-matching puzzle video game in your terminal
VarietyWallpaper manager with many desktops and wallpaper sources
WallGenGenerate HQ poly wallpapers with a few arguments.
WallpaperDownloaderDownload, change, and manage wallpapers
xcowsayDisplays a cow on your desktop with message
XDecorationsAdd some festive cheer to your desktop
XScreenSaverFramework and collection of screensavers
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our FAQ before making a comment.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments