Graphite is simple 2D/3D math visual app like geogebra, desoms, amtplotlib in python. It works on c++ scripting language. It is based how scripts works via using interfaces and dll loading. Allows how swap dll on runtime for easy and nice experience. It uses my own rendering library CWindow
Why it exists:
- I hate python
- Geogebra is slow
- I love my own software
- Learning
For whom:
- For people that want faster graphical math app
- People who hate python <3
![]() |
![]() |
- About
- Screenshots
- TOC
- Installation
- Usage
- Important Note
- Prerequisites
- Versions and features
- Other Docs
- Cat
git clone --recursive https://github.com/daynlight/Graphite.git
cd Graphite
mkdir -p build
cd build
cmake ..
cmake --build . --config Release
cd ..
sudo cmake --install build/ --config Release
cd ..- Run it
Graphite <flags> <path>- Edit
Graphite.cpp
// Graphite
// Copyright 2025 Daynlight
// Licensed under the Apache License, Version 2.0.
// See LICENSE file for details.
#define BUILDING_SCRIPT_DLL
#include <Graphite/ScriptInterface.h>
#include <Graphite/Math.h>
#include <math.h>
#define SAMPLES 1000
class Script : ScriptInterface{
Graphite::Math::Point points[SAMPLES];
float f(float x) { return (1/2.0f) * sin(x * M_PI * 2); };
void Init(){
for(int i = 0; i < SAMPLES; i++){
float x = (i/(SAMPLES - 1.0f) * 2) - 1;
float y = f(x);
points[i].setPos({x, y});
};
};
void Update(){
};
void Draw(){
for(int i = 0; i < SAMPLES; i++)
points[i].drawPoint();
};
void Destroy(){
};
};
extern "C" ScriptInterface* SCRIPT_API GetScript() {
Script* script = new Script();
return (ScriptInterface*)script;
};
extern "C" void SCRIPT_API DeleteScript(ScriptInterface* script) {
Script* temp_script = (Script*)script;
delete temp_script;
};-h/--help: show program help command.-i/--init: initialize default files.-s/--sandbox: turn on sandbox mode.-v/-d/--verbose/--debug: turn on verbose mode.
- For edition use sandbox mode it prevents segment fault and program crashes at runtime edition.
- Sandbox mode runs the
Graphite -v <path>on fork. If program breaks it doesn't stop whole program just check if script is changed. - Always end all threads in script in
Destroy()function. - When script is stable use normal mode for performance.
CMake- for building.C++17- for compilation.Git- cloning repo and submodules
v1.0.0
- Sandbox mode.
- Script sandbox last write.
- Separate
CWindowrenderer viaAppRenderer. - Safer script destroy.
- ScriptController edge-cases and error handling.
Prototype
- hot script loading
- help flag
- init flag
- verbose flag
- points
- print multiple points
- installation
- interfaces installing
- simple example
- installation guide
- docs
- single flags
- path specify
- Auto Create


