Geozi
- 12 Devlogs
- 62 Total hours
a geogebra-like in Rust without dependencies
a geogebra-like in Rust without dependencies
Gonna be one of the last devlogs probably. Here’s what I added/modified :
These two last days were pretty important because I added a lot of stuff, mostly around file handling and one last creative tool:
GetSaveFileNameW/GetOpenFileNameW) instead of a custom UI, I had to declare OPENFILENAMEW by hand, a pretty big struct (23 fields) where the field odrer has to match Windows’ ABI exactly or it just breaks silently. Files save as .gsp, a plain text format I made up with one section per object type (POINTS n, CIRCLES n, etc), parsed line by line with no external lib. Split all that into its own storage.rs file.The difficult part was making Save/Load play nice with the rest of the app bcz clicking “Save” can’t just fire off the Windows dialog immediately, since I’m still holding a mutable borrow on the app state at that point and the dialog runs its own internal message loop. Same trick I used for the Radius/Sides popups, I set a flag, let the borrow end naturally, then open the dialog after. Also had to bump the toolbar from 7 to 9 buttons so every submenu’s x-position needed shifting
Added a bunch of stuff today, mostly around construction tools and cleaning up some UI edges :
The math side was the fun part, rotating vectors for the regular polygon, solving a 2x2 linear system for line intersections and normaliznig the arc angle so it always draw the short way around. Next I’ll add a Save/Load system (I completely forgot this lol) and a cool functionnality you’ll see in the next devlog. It’s almost the end of the project so if you have any suggestions just tell me
I’m a bit tired of debugging and coding for this long so here’s a quick devlog about what I added and changed :
It’s almost the end of the project. I still have a few features to implement as helpers, things related to angles or ways to add perpendicular and parallel lines (quite a lot finally lol). Here is what I did today :
RegisterClassExW as shown in the screenshot) before creating the window with CreateWindowExW
Another day of grinding on the project ! I am a bit disappointed because I didn’t make as much as progress as I wanted to but nvm. Here is what I did today :
app.rs file was getting too long so I added two new files, ui.rs which manages all the UI including all the constants and drawing stuff, and theme.rs which handles the palette and colorsI also removed the distance display because I’ll add it to a submenu for helpers.
Instead of having only axes, I added a grid to make it look more like an actual geometry engine. I also added the option to show tick marks, that we can enabled with a button in the bottom-right corner. I also created a submenu under the point icon where you can either place/select point, draw a segment or a line. Finally I added themes : a dark theme and a bright theme. It took quite a while today because I reorganized both the code and the UI. If you (who read this) have any ideas that can improve my app, let me now :)
Today I locked in and added some cool things to Geozi. Here is what I did today:
Next I’ll polish the UI, probably work on submenus and adding polygons, and maybe some stuff with angles
Fixing some bugs but now the core of the app is functionnal ! I tested it on my windows machine and as you can see in the video demo, it’s still pretty basic but I’m gonna improve it a lot over the next few days. I also created a logo with a nice background and maths symbols I found on pinterest and Photopea for the text.
Today I made a big step on Geozi.The base is almost finished now. I connected the Win32 window with the app and added the main interactions:
I also connected the rendering, geometry and Win32 parts together. I’ll share a screenshot of the app later in the evening.Next step is to improve the UI, adding circles and adjusting the camera.
Devlog #2 - Geometry & rendering Today I worked on the basic geometry and rendering of my Geogebra like project.I added points, distance calculations, pixel drawing and line rendering. I also implemented world-to-screen and screen-to-world coordinate conversion with scaling and offsets.This gives me the foundation for the zoom, movement and geometric tools I’ll add next.Still pretty basic, but it’s starting to look like an actual geometry engine :)
Devlog #1 I started working on the windowing part of my Geogebra-like app in Rust, using Win32 FFI directly without any crates, so today was mostly about copying things over: manually redeclaring the Windows structs (WNDCLASSEXW, MSG, BITMAPINFOHEADER…) and the user32/gdi32 functions I need for the project. Honestly, it was a bit boring to copy each field in the right order from the Microsoft documentation (with no room for error, because a misaligned #[repr(C)] crashes silently instead of giving a clear compile error lol) BUT it was instructive because I now understand much better why Windows expects strings in UTF-16, and why biHeight must be negative if I want my image right side up rather than inverted, for example…