Yea, I updated some minor things, nothing big
Yea, I updated some minor things, nothing big
https://cirqatha.github.io/AtomSim/
So for the V1, I made an Atom simulator out of pure curiosity from my 11th grade chemistry concept called VSEPR theory.
I was told that the website didnt have any controlls, or any interaction, which made it kinda plain. But I stll managed to get high ratings.
So I decided to improve it, but I wrote the previous simulation using VPython, which tbh is the grandfather level compared to three.js which is actively used in websites.
So I learnt three.js and wrote the code. And here is the working of the code if anybody’s interested in it.
PROBLEMS I FACED = yea I did not use AI to write code, but the problem is I was learning a new language and three.js. AND I RAW DOGGED DOCUMENTATIONS, i’ve never in my life coded in a more primitive way. I also had to understand the way three.js works, its actual way of doing things.
You can only imagine how legendary I felt when the project was over.
The “magic numbers” = I’ve recieved question from my previous ship about seemingly random values set for variables in the simulation. Remember, this is a very simplified simulation, a simulation with 99.99% accuracy requires a lot of factors, making this complex. The second reason is simply because that the numbers are set to make the motion of particles and visibility of particles visually pleasing while still keeping the structures mostly correct. Hence the “magic numbers”. Like I cannot set distance between atoms super low to simulate reality, thats why you would see the force constant super bumped up.
The UI = I’ve added a box to change the number of particles and simulate them, along with a “render End Frame” checkbox which as the name suggests, only calculates stuff till the end frame, without simultaneously updating positions, rather updating at last. There is also a guide for how many particles it can handle safely, I’ve also shown a orbit control guide there which tells you how to rotate and zoom into the simulation.
Updating objects = When you enter the number of particles, it first clears all the particles rom previous simulation, along with arrays and stuff.
Then it adds particles, initialises velocites, and positions.
Calculation Forces = In the beginning of each simulation, the arrays is first cleared to clear the forces from previous simulation. Now, For each particle, force from every other particle is calculated, then added together to give a final force vector for that particle.
Calculating Velocities = Same clearing up loop with this.Also, This one’s really simple, its just a simple v = u + at formula. Every calculation is followed by a 0.9 factor scaling which dampens the velocity every frame.
Calculating Positions = For this one we first store the previous position in a temp variable before clearing it. We then calculate the distance travelled using the formula s = ut + (1/2)at^2. This is followed by a little normalisation, which is basically like if you are spinning a ball with a string, normalisation factor decides how much stretchy the string is. 100% normalisation means the ball travells on the edge of a perfect sphere, a 10% normalisation means it can sometimes go away from that edge, but will not drift away because an additional force is attracting it to the edge.
That distance travelled is added to the previous position stored in temp and that gives the position for that frame.
Calculating Cylinders = For each particle, if it moves less than 0.1 distance between two frames, its considered stable then and it is connected to its nearest surrounding particles using cylinders.
Render End Frame = Theres a feature which lets you to only render final frame of a 20 second simulation, which probably saves your system some resource usage. Though all the major stuff like calculation has to happen to calculate it.
So I took the recommendations from people that rated my previous ship.
Now I’ve switched from VPython to Three.js, the code doesnt exactly translate directly, I’m working on structural changes as well.
The part that takes the longest is not using AI to code, I’m raw dogging this task through documentations.
So far I’ve learnt how to use Three.js, and set up some structural base for the code. I guess it’ll take around 3-5 hours more to complete the project.
Finished my Macropad
Wrote the code, did some changes in the pcb, and viola, after 3 hours more, my macropad is ready!!
My first project has been completed, tho it will be my second ship, I did a quick project in between
Added a smart cylinder calculation
This is a 10000 particle beast which took 20 minutes to compute one final frame after settling.
Added numpy because calculations are reduced from hours to minutes
*Built an Atom Simulator
I’m in 11th so I had the topic of VSEPR in my curriculum, So I built a program that simulates these structures by giving repulsion energies to these atoms. Then after using VPython, vectors, partial normalisation, 2D Lists and stuff I made it a bit not so boring.
The structure automatically takes place when they go into lowest energy state. The positions are all first calculated and then the animation begins where you can see them going into lowest energy states.
The maximum limit is said to be 12, but you could try with any number of particles you want, seeing how the structure would look like if it were real
Built a ML powered MFC Biosensor.
So in the past few days, I have successfully created the machine learning side for my biotech project.
Also, I have completed the data collection setups, which will continue to collect data in the future few months automatically.
This Ml powered biosensor is a bit different, it uses voltage AND temperature as variables to predict future voltages. Any anomaly is flagged.
I am using a nearest neighbour model to compare patterns and predicting.
Hence solving one of the biggest problems with biosensors, not knowing if a voltage drop is caused by time of day or actual toxic event.
I’ll son start working on the documentation, tho i already have a pretty detailed information document and 12-13 python files for prediction ready, I will -crate a structured git page soon.
You can see in the screenshot that its predicting, and its accuracy is a bit low because the biofilm hasnt yet been established, once it does, above 95% accuracy is predicted.
Finished Case and PCB for my macropad
Now I’ll start writing code for it and submit.
THIS IS MY FIRST PROJECT
Biosensor research round 2 prep.
I’m working on a biosensor, right now i’ll begin round 2. So i built it’s electronic logging system today. It logs temperature and voltage of three different setups. I’m trying to solve one of the biggest problems with MFC biosensing, the temperature problem. So I plan on building a machine learning algorithm after this research.
For research, i’ve collected pond dirt and water, three identical tubs and different electrode material to test. The electronic setup will log data in a google sheet. In my round 1 of research, I did the same but with industrial materials as well, to test charcoal’s viability, I logged voltages manually in round 1, but found many interesting findings that aren’t really on the net.
Devlog #3 - Rebuilt PCB because I added way more components and went over the board size limit that is mentioned in mission.
Now the PCB is finished.
Now building the case and writing the firmware is left.
My previous PCB was a hell to wire, especially with the 2 layer limit they have.
My 3 hour timelapse session just crashed because lapse couldnt load it i guess. Im kind of demotivated right now, but the next post will be on my comeback. AND MAN I REALLY WANT THAT 3D PRINTER. I WILL GET THAT.
I finally learned how to build a PCB and the case for my macropad from hackclub tutorials, gotta learn firmware now.