The examples folder inside the CoreGX repository contains example programs, pipelines, and scripts demonstrating how to use CoreGX.
The coregx-program-examples folder contains CoreGX programs and their corresponding diagrams, output by CoreGX in SVG format.
The error-handling folder contains an example showing how CoreGX error output can be used to identify and repair problems in an input program.
The llm-integration folder contains examples of constrained prompts that can be used to generate CoreGX programs from natural-language input. It also includes the resulting diagrams in SVG format.
Examples include:
- Triangles.
- Four-bar linkages.
The math-feedback folder contains examples showing how CoreGX mathematical output can be used with SymPy to solve problems symbolically and numerically.
These examples demonstrate how CoreGX geometry and equations can be incorporated into further mathematical analysis and automated workflows.
The minimal folder contains basic examples of calling the CoreGX API with a CoreGX program in several programming languages:
- TypeScript.
- JavaScript.
- Python.
- Shell.
- PHP.
The folder also includes the resulting SVG diagram output.
The rich-output folder contains example scripts for extracting different output types from the CoreGX API, including:
- SVG images.
- Animated SVG images.
- XML.
- JSON.
- Equations.
- DXF.
These examples demonstrate how developers can select and process the output format that best suits their application.
The web-demo folder contains a demonstration webpage that calls the CoreGX API and displays diagrams generated from any input CoreGX program.
Together, these examples demonstrate how CoreGX can be used to create diagrams, integrate with language models, perform further mathematical analysis, and provide outputs that can be used in web applications and other automated workflows.