You are browsing as a guest. Sign up (or log in) to start making projects!

Geozi

  • 12 Devlogs
  • 62 Total hours

a geogebra-like in Rust without dependencies

Open comments for this post

9h 3m 19s logged

Devlog 12 - Geozi

Gonna be one of the last devlogs probably. Here’s what I added/modified :

  • Move tool: 4th option in the Point submenu, you click an existing point, drag it around, and release to drop it .
  • Pen smoothing: the pen strokes looked jagged because the whole renderer is raw Bresenham lines, no antialiasing anywhere. Didn’t want to build real antialiasing, so instead added a draw_thick_line that redraws the same line with small ±1px offsets, makes the stroke ~3px wide instead of hairline, which hides the pixel-steps a lot without touching the core renderer.
  • Submenu name renaming and UI redrawing: it wasn’t very clear what each submenu was for, so I gave them longer and more descriptive names. I also added borders and separators to the submenus
0
0
22
Open comments for this post

9h 51m 58s logged

Devlog 11 - Geozi

These two last days were pretty important because I added a lot of stuff, mostly around file handling and one last creative tool:

  • File system: new icon in the toolbar, in first position, with a Save/Load submenu. Saving/loading uses the real Windows file picker (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.
  • Pen tool: last icon in the toolbar, you can draw anywhere on the canvas with a small palette of 8 preset colors (skipped a full RGB slider picker to keep it simple, maybe I can implement it later). Each stroke is just like a polyline of world space points tagged with its color.
  • I also moved the hint text (“click the second point” per exemple) from the top-left to the top-right - it was overlapping with the submenus which are all on the left side under their buttons.

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

0
0
26
Open comments for this post

5h 12m 51s logged

Devlog 10 - Geozi

Added a bunch of stuff today, mostly around construction tools and cleaning up some UI edges :

  • Regular polygon: new option in the Polygon submenu, you place 2 points, type a number of sides in a popup (same dialog box as the “Radius” one), and it builds the whole regular polygon by rotating the edge vector by the exterior angle (2π/n) at each step
  • Angle tool: new toolbar option with two modes, angle between 3 points, or angle between 2 existing lines (at their intersection).I just need to change the angle’s color to make it stand out from the other components.
  • Themed dialogs: the Radius and Sides popups now match the app’s theme and open centered on the main window instaed of a fixed corner (before it opened outside the app)

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

0
0
47
Open comments for this post

8h 29m 21s logged

Devlog 9 - Geozi

I’m a bit tired of debugging and coding for this long so here’s a quick devlog about what I added and changed :

  • Added two new tools to the toolbar : Line (parallel/perpendicular) you have to click an existing line or segment to use it as reference then move the mouse - a semi-transparent preview line (it was a bit annoying cuz it’s a fake transparent line, no real alpha channel here, I just blend the line color with the background color channel by channel) follows the cursor, click to place it for real ; Helpers: Distance (select 2 points, shown bottom-left) and Area (click inside a closed polygon, and the area is calculated with the shoelace theorem)
  • All the layout math had to shift over and I fixed some bugs that happened when the app launched
0
0
5
Open comments for this post

6h 14m 29s logged

Devlog 8 - Geozi

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 :

  • I added some keyboard shortcuts : CTRL+A to select all the points and CTRL-Z to undo the last action done, it works with a snapshot stack : each action saves the state before it happens and undoing just pops the last one back.
  • I also added point naming and the display of the coordinates of selected points in the top-right corner of the grid
  • I fixed the “Radius” submenu. The bug was caused by the fact that I hadn’t registered the window class (with RegisterClassExW as shown in the screenshot) before creating the window with CreateWindowExW
0
0
29
Open comments for this post

5h 42m 21s logged

Devlog 7 - Geozi

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 :

  • Implementing the polygon system : the filling part was a bit difficult but the rendering looks nice
  • I created a submenu for the circle tool with two options : either you place a circle by placing two points, or you place the center point first, then enter the radius in a modal dialog box (but for some reason the dialog box doesn’t appear and the app freezes - seems like a win32 issue that I need to fix)
  • The 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 colors

I also removed the distance display because I’ll add it to a submenu for helpers.

0
0
34
Open comments for this post

4h 52m 18s logged

Devlog 6 - Geozi

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 :)

0
0
7
Open comments for this post

4h 38m 12s logged

Devlog 5 — Geozi

Today I locked in and added some cool things to Geozi. Here is what I did today:

  • Added a toolbar where you can choose to either navigate while dragging the mouse, place/select a point or place a circle
  • You can now select and delete points
  • Added a cartesian coordinate system (only axes) that we can enabled or disabled with a checkbox
  • Worked on the circle mechanic : for the moment you have to place a point, then another one which will be the radius of the circle

Next I’ll polish the UI, probably work on submenus and adding polygons, and maybe some stuff with angles

0
0
49
Open comments for this post

1h 25m 59s logged

Devlog 4 — Geozi

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.

0
0
10
Open comments for this post

3h 3m 10s logged

Devlog 3 — Geozi

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:

  • Clicking creates points
  • Clicking on existing points selects them
  • Selecting 2 points draws a line between them
  • The distance between the 2 points is displayed
  • The window can be resized
  • Mouse wheel zoom

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.

0
0
31
Open comments for this post

53m 32s logged

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 :)

0
0
9
Open comments for this post

2h 16m 16s logged

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…

0
0
2

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…