Work

Equation of Motion Solver

I developed a program to solve for the equation of motion of a system with a beautiful GUI that runs on any web browser.

A computer program that displays a graph of an equation of motion.

I needed to solve for the equation of motion of a system. So instead of doing it by hand, I decided to write a program to do it for me. I wrote a program that would solve for the equation of motion of a system and display the graph of the motion. I also added a beautiful GUI that runs on any web browser. This was a great learning experience for me as I was able to learn a lot about numerical methods and how to use them to solve for the equation of motion. I integrated 2 different numerical methods to solve for the equation of motion, the Euler method and the Runge-Kutta method. I

Prototyping the algorithm

Whenever I start with a project I sometimes like to make a simple proof of concept. I started by writing a simple GO program that would solve for the equation of motion of a simple system, using the Euler and Runge-Kutta methods.

Why GO?

I love GO, I think that it’s a super innovative language. It’s statically typed, but it’s also very easy to write almost like a easier to write C++. I chose it over Python because I wanted something that was way faster as I was slightly worried about the performance of the program. I also wanted to learn more about GO and I thought this would be a great project to do that. The best thing I found with GO was the compile times, I knew that the compile times in GO were good but I didn’t realize that it was almost instant which allowed for constant iteration without having to wait for recompilation. Unfortunately GO has some pitfalls, such as the lack of a good GUI library so for the final version I used my tried and tested method of using my NEXT Template to build a beautiful GUI that runs on any web browser.

The Final Product

The final project was built using TypeScript and NextJS. I prefer TypeScript over JavaScript as it provides the ability to catch errors before they occur. I also used NextJS as it’s a great framework for building web applications. I had already made a template for building web applications with NextJS and I used this to build the GUI for the program. This template is great as it provides a lot of the boilerplate code and also includes a lot of the technologies that I like to use such as TailwindCSS.

Learning to build snappy web applications

I actually learned a lot about how to build web applications from this project and the very website you’re reading actually has styling done in Tailwind for some of the components. However, I have now switched away from NextJS to Astro as I found that it’s much faster and using NextJS feels like I’m using a quantum computer when a basic calculator would get the job done.

Software Utilized

Next JS NodeJS TailwindCSS Yarn TypeScript GoLang