This program visualizes a donut in a 3D space and animates it in a console application. It uses the Data.Vector, System.Console.Terminal.Size, Data.Bifunctor, Data.Ix, and Data.List.Split libraries.
- Creation of Circle Points: Defines a function
createCirclePointsthat creates a list of points on a circle in 3D space. - Creation of Torus Points: Provides a function
createTorusPointsthat takes two angles and returns a list of points on a torus. - Calculate Brightness: Contains a function
calculateBrightnessthat calculates the brightness of a point on a shape. - Convert Brightness to Character: Includes a function
convertBrightnessToCharacterthat converts a brightness value to a character. - Sort By Depth: Offers a function
sortByDepththat sorts points by depth. - Transform 3D to 2D: Contains a function
transform3Dto2Dthat transforms a 3D vector to a 2D position. - Arrange Points in Grid: Provides a function
arrangePointsInGridthat arranges points in a grid. - Display Torus: Includes a function
displayTorusthat displays a torus given two angles. - Animate Torus: Offers a function
animateTorusthat animates a torus given two angles. - Main Function: Contains the main function
mainthat gets the terminal size and starts the animation of the torus.
This module on the following libraries:
Data.VectorSystem.Console.Terminal.SizeData.BifunctorData.IxData.List.Split
Make sure these libraries are installed in your Haskell environment before using this.
This module is open source and licensed under the GPL License. See the LICENSE file for details.