June 17, 2025
Added buttons to clear the text in entry, another one to reset counter of key presses and last one that toggles the heatmap of all key presses.
Now when buttons are pressed you can see how the gradient slowly changes from green to orange and then back to normal.
Added text field for typing, and added letters onto keys.
Created keyboard layout, on which will be colored with their respective color.
This app shows which keys you pressed the most while typing. The lack of CSS is intentional, because simplicity is something to admire.
I am trying to encode message now, I was successful in that, however I noticed that I am most probably writing into MSB of pixel channel instead of LSB, which creates this kinda cool pattern on resulting image. I always write into red channel when working with RGB and RGBA images, that's why you can see red, cyan and green. They are created when you take out the red from original color under them.
Finally the program is able to successfully open, store and save data from one image into new copy. The issue with filtering was that when you reconstruct data from filtered into raw (decode) you also use raw bytes of data for predictors, same as when filtering from raw (encoding). So when you encode you always read the input stream for raw bytes, but when you decode you have to read from decoded stream to get the raw data for predictors. I was very confused from the png documentation and spent much time on this simple thing. As seen from devlog image the original and copy of image are the same.
I have been able to open the png file, save all data from, decompress and compress it again and write back to the new file. Except the filtering of data. It has to be fixed, because there is some error, which causes image corruption. If I comment out the filtering out and filtering in, in the file, it saves as normal. On the devlog image there is original image (left) and saved image using corrupt filtering function (right).
Now program is also able to filter the decompressed data back into the original data. Also it is bale to compress the data back.
Now I can decompress the data from IDAT chunks. I used zlib library and inflate algorithm. I had to install it and link it, this is where I spent much time, because I did not know that.
Now I am able to display all the contents of all IDAT chunks, I had problem where I was pushing pointer that was changing, into vector, because of that it was not displaying correct data. I created Image class, which takes char pointer and size of it, copies it and only after that pushes it into vector. It solved the issue.
Refined the code even more.
Added executable file, that does not open terminal, only GUI. Also added docstring to the functions in code for better understanding.
Now I am able to display all names and lengths of chunks in png.
This is console program, in which you can encode and decode messages from png images.
Cleaned up the code and added few comments on key places
Finally sides along all 3 axis can be rotated. And also I implemented new system of knowing which direction to rotate each side. Now only the only thing is left to do, is to optimize it and remove commented code.
Now the rotation of side of cube around y-axis is finished in any orientation of the cube without breaking the whole thing.
Now I can rotate the side around x-axis in any rotation of the whole cube without it breaking.
I have made the big cube out of 27 smaller ones. Now only the rotation around x-axis works, but only if whole cube has been rotated only around x-axis. If I rotate whole cube around not x-axis, it becomes messed up, as shown in the end of video. Also in video the movement of rotation of whole cube is uneven, but it is quite smooth on screen.
After watching few 3b1b videos about linear algebra and vectors, I learned what dot and cross products in vectors are. Thanks to this I added rendering only the faces that face towards me.
As next I decided to add faces to the cube, I have read that it is done through triangles, so I added 12 triangles in total. However I had not included the functionality of drawing only the faces I see, instead drawing all of them, so some faces were drawn on the top of others, and some were drawn below all the other. At right angle this created a funny illusion of it spinning right and left, even tough it was only spinning right.
In this project I wanted to learn how to render 3D objects without using any special libraries. Only tkinter and it's canvas with 2D drawing, first I had to learn about projection of points onto the screen. Together with that I decided to add rotation to the cube, so I can see if it is projecting correctly. In the end I got this result.
GUI Rubik's cube made in python with tkinter. Main goal of this project was to learn more about 3D rendering, especially I wanted to understand all of math behind it, and also I like Rubik's cubes. First 4 devlogs were not made in the same time as the features added, I simply forgot to do them but still decided to add them, to track progress of my learning in this field.
This was widely regarded as a great move by everyone.