Skip to content

halirutan/CollatzVisualization

Repository files navigation

Collatz Sequence Visualization with Kotlin and Compose Desktop

This repository contains a dynamic visualization of the Collatz graph using Kotlin and Compose Multiplatform. The intention is to provide a small but not dead simple example of a complete Compose application.

Image

If you don't know what Collatz sequences are or what is meant by the Collatz graph, just stare at this xkcd for a moment:

Collatz Conjecture

Building such a graph for many numbers, displaying them using an angle path, and colorizing all lines with a scientific color gradient, you will get a visualization as shown in the first image.

Running the app

Clone the repository and run

./gradlew run

from a command line (on Windows it's gradlew.bat).

You can also open the the project in IntelliJ IDEA and it will import everything automatically. Afterwards, you can press the "play" button that should appear next to

fun main() = application

in Main.kt.

About

Collatz Sequence Visualization with Kotlin and Desktop Compose

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages