Gears banner

Gears

9 devlogs
32h 51m 57s

to be an authentication system, however currently constructing euclidean propositions

Repository

Loading README...

sbalaji07

Hello friends, I will admit I slightly lost the plot trying to pursue the excessively complex constructions. They don’t even fit into what I wanted this to be because they’re far too lengthy to reasonably fit cleanly into a short animation period.

I decided to pivot and start working on the actual gear mechanism, and then figure things out from there. I’ve now been on the figure things out stage for quite some time and I think I’m starting to lose the will.

For now, we’re sticking simple with a test of the gear system by just drawing a circle. I spent an hour searching for why it wouldn’t work before spotting I forgot to type the word ‘break’, and so I made up for it by breaking my keyboard into small pieces, all the easier to type with, as grandma says.

I’m pretty sure the answers will come to me naturally as long as I search within myself, or maybe that wasn’t the moral of the third and final kung fu panda movie, I really don’t know anymore just watch the circle get drawn okay?

Attachment
0
sbalaji07

huge updates my avid viewers (there was one comment on the last post so this is a milestone). to begin with i remade the colour system to be able to change the colours for all constructions since inputting values for each construction became a headache very quickly. that isn’t to say that the headache is gone however, because it remains.

i have made a serious and continuous lapse in my judgement and I don’t expect it to ever be resolved, because my modular design to input only points into each of these constructions has made it an absolute pain to accurately tell which point is what, because each point becomes renamed relative to the construction it is immediately a part of. it also means that tracking which lines to draw, which lines to fade, which lines shouldn’t even exist, all becomes like a twenty mile hike without boots up a mountain of legos.

anyway i’ve gotten equal angle constructions working, so that’s neat. and as i spoiled earlier i’ve added a fade function, which may be even worse since its basically a guessing game what is and isn’t going to disappear, however it has resulted in Massive improvements to the visuals of the equal angle construction (it was so much worse before)

Attachment
0
sbalaji07

added angle bisection. i’ve been quite carelessly balling with the trigonometry and somehow it continues to work, in truth there is a fair chance that the moment i try some of these constructions on different points the entire thing combusts, but that is a risk i am willing to take.

i edited the equilateral construction to include a parameter that configures the direction of the triangle (given a point it should be facing away from). this is because as can be seen, there are always two potential triangles that can be formed, and aesthetically, in cases such as in this angle bisection, it is far cleaner if the triangle is facing away from the point we are bisecting. its a bit of a pain to include a random vector if a particular direction is unnecessary, however for now this solution seems to work, and the design of the bisection is worth the extra input.

Attachment
3

Comments

hack.clubber
hack.clubber about 1 month ago

Nice project, really unique as well BUT when I tried compiling it started downloading a large file from raylib. I don’t if you know but to use raylib you only need to download 12mb or something like that.
Would be better if you Updated your CMakeLists to only download what’s needed.

sbalaji07
sbalaji07 about 1 month ago

oh right, thanks, i’ll check out if i can make it simpler.

sbalaji07
sbalaji07 about 1 month ago

okay so i took a look at where i got the cmake file template from, and it seems it’s downloading the master branch from source since its ‘easier than including prebuilt binaries for every platform and configuration’.

i think its more important for anyone to be able to run the program without hassle than for a smaller download, but if there’s some obviously easier way to compile then i’ll certainly change it

sbalaji07

added equal line construction. this required rethinking the phase system since I needed constructions to begin one after the other. the best way seemed to be to move the update function for each subsidiary construction into its own phase within the update loop and simply check for completion there.

i also standardised the progress to be from 0 to 1, meaning all construction meaning all phases of each construction will take the same amount of time, it may be worthwhile looking to configure custom speeds for each since the vectorLerp i’m using seems sedated.

i then had the problem of hiding certain lines that were being drawn within my constituent constructions. i was thinking about ways of controlling the hidden and shown segments, but wanted it controlled via a single parameter, so i opted for a bitmask which i can configure within my update function.

Attachment
0
sbalaji07

cleaned up the perpendicular bisector a little more by using a separate function to draw the final line itself. also, added equilateral triangle construction, the repertoire grows

Attachment
0
sbalaji07

cleaned up the heretical bisector construction code. turns out I was actually right the first time and my ultimate solution was just to employ the use of switch cases but cycling through phases of construction with an enum.

it also turns out that raylib has a function to draw arcs in particular, so my incredible method for manually drawing them with hundreds of lines was unnecessary (i’m so glad that function was in a separate section of the docs, and i’m also so glad that it takes degrees rather than radians like everything else for some reason)

Attachment
0
sbalaji07

fully animated the perpendicular bisector construction, just please don’t ask how. though, the basic idea was just to split up the total construction progress into each half arc and cycle through the necessary drawings, allowing me to configure each stretch individually. that being said, this may just be the worst possible implementation possible, and I will have to return and fix the yandere sim excerpts (please don’t look at the code)

Attachment
0
sbalaji07

employed the previously created circle construction method to draw bisectors. the arcs are purely for visual purposes however, the coordinates bisector itself is drawn through some amount of trigonometric shenanigans.

Attachment
Attachment
0
sbalaji07

Created a system to construct basic circles using raylib

Attachment
0