- Desktop-App zum Simulieren der Generierung mehrerer mathematischer Spiraldiagramme. (Desktop app for simulating generation of several mathematical spirals.)
- Die App besteht aus einer grafischen Benutzeroberfläche und ist vollständig in der C-Programmiersprache geschrieben. (This app has graphical user interface and is written fully in C-language.)
- I wrote this desktop application completely in C-language using the GTK4 library for the user interface and Cairo for 2D graphics rendering.
- The app allows users to select and visualize various mathematical spirals, simulating their construction point-by-point.
spiral_generator.h: Header file defining constants, enums, structs, and function prototypes.- Constants:
WINDOW_WIDTH(800),WINDOW_HEIGHT(600),ANIMATION_STEPS(1000),ANIMATION_INTERVAL(20 ms). - Enum
SpiralTypelists all supported spiral types. - Struct
SpiralDatastores x and y coordinates,max_points, andcurrent_pointfor simulation. - Struct
AppDatacombines SpiralType,drawing_area, two SpiralData instances (primary and secondary), andanimation_id.
- Constants:
main.c: Entry point, initializes the GTK application, and sets the default spiral.gui.c: Handles GUI setup, spiral selection, and simulation logic.- Spiral-specific files (e.g.,
theodorus.c,archimedean.c, etc.): Each implements drawing logic for a specific spiral. - I have used GTK4’s
GtkApplication,GtkWindow,GtkBox,GtkDrawingArea, andGtkListBoxfor interface components. - Cairo draws spirals on the
GtkDrawingAreausingcairo_tcontexts.































