Post by JM "Poole" Melanson on Oct 13, 2019 13:41:27 GMT 1
I am thinking of jumping into the OpenGL "pond" to simulate a robot playing pool (billiards) This is one of my longer term projects.
There are lots of books and YouTube videos ("The Cherno" seems promising) Nicola Rey seems to have had some success and wants to share his knowledge. Great! But before taking the dive, I wanted to try out a few simple demos. Dip my big toe, to test the waters.
I believe the best way for me to understand something is to try to build a simple version of it myself.
(If anything I will certainly get an appreciation of just how difficult or easy it is to do so.)
So, I thought:"Why not build a simple 3D wire frame editor?"
I have used 3D editors in the past like Sketchup, AutoCad, 3D Studio, Moray etc... I thought to myself:"This is grade 5 mathematics: addition, subtraction, multiplication and division. Simple!"
Well... Everything was going well until I went down a particular rabbit hole. I found myself wanting to implement a zoom feature that zooms in or out relative to the mouse position and uses the original data points every time (instead of letting rounding errors creep into the mix).
I have to admit it is a mind bender! I was on vacation so I thought:" What the heck. Keep plugging away until you find the solution! It's a good exercise!" All true. I started getting up earlier to put more time in. I found that some of my best concentration time is from 3AM to 6AM. Almost total concentration and 0 distractions! I drew diagrams and tried to find simpler and more direct solutions and finally implemented matrix algebra to try to deal with the 3 dimensions more efficiently. Just a few more tweaks and it will be perfect. Well it's been 6 weeks and I can taste victory, but, I am not there yet.
Post by JM "Poole" Melanson on Oct 15, 2019 10:37:39 GMT 1
I'm still not out of the woods yet, but, I have re-learned an important lesson: "Always check the basics!" I am trying to use matrices that I set up myself and I just realized they were not set up properly: row column indices were jumbled or reversed. I was getting encouraging results but I could tell something was off. It does make you think that most programs only work because they use tried-and-true methods.
RULE #1: Never make assumptions.
You only end up making an ass out of ump and tions.