Alright so devlog #5! I attached a video below of me testing out the new tools and add-ons of the geometry engine.
I’ve cleaned up a lot of the must-need fixes from before, such as building clear grid lines and especially the snap to grid tool for plotting points. This problem showed up when I was attempting to create the rectangles in the engine, as the points I selected were rejected by the validating system because they weren’t perfectly aligned. I would end up with points such as 3.99 or 2.09 and plotting whole integers was a challenge. But, I fixed it to where the snap to grid allows the user to easily select whole numbers while still having the leniency to plot decimal points at 0.25, 0.5, and 0.75. After adding that, I was able to complete my rendering and click handling for all my tool bar buttons including the polygon.
About 3 days ago I added a zoom feature (as seen in the video attached) that preserves your shapes / point coordinates and proportions even when altering the coordinate plane scale inside the window; which I really like how it turned out. As for what I’ve worked on yesterday and today, I decided to upgrade some existing features by implementing intersections points and angles. Currently, they only apply to line segments that have an intersection point, but I will soon be adding it to my other toolbar shapes. The coding for the arc angles was especially tricky, but I learned so much. First, before even creating the render for the arc angles, I learned that I can use the console tab to test my code’s calculations and verify the outputted angle is accurate before having it drawn in the coordinate plane.
I struggled most with establishing which equation would form these arc angles the simplest and also getting them to show up properly. At the same time, I actually learned a new equation I’ve not yet used before in math and in geometry; the dot product. I really do admire how mathematical equations that I’ve actually used and recognized, translate to code and seeing how they’re outputted.
Okay lastly, I added a toggle hide/show button on the top bar for intersections and angles. I felt that having all the labels and extra points on the shapes may crowd the visualization a little bit, and giving the user the option to see their creation without it would be good. Anyway, I’m excited to continue upgrading the abilities and tools of the engine as I go.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.