Skip to content

Instantly share code, notes, and snippets.

View fsau's full-sized avatar

Franco Sauvisky fsau

View GitHub Profile

Interfacewidth

Uso

Execute no terminal escalas [arquivos] para calcular a lei de escalas. O arquivo necessita ser salvo em ASCII (.txt) no formato de MATRIZ, e não XYZ, caso contrário o programa não funcionará.

O script escalas confere automaticamente por atualizações e avisa se estiverem disponíveis. Caso positivo, apenas execute escalas -u para atualizar. Pode ser necessário executar a atualização duas vezes caso a atualização modifique o script.

Os executáveis escalas512.exe e escalas1024.exe são disponibilizados como legado, contudo seu uso não é aconselhável.

Arbitrary Particle Simulator

What is this?

A small pair of programs to simulate physical point-like particles and plot them. The number of dimensions, forces and particles is arbitrary, limited only by memory and processing requirements. The sim.c is responsible for generating the data from the initial conditions and the myplot.m is responsible for normalizing the data in time (using splines) and plotting it in real-time.

How to use?

The C code in this project comes with a 4-particle system. Taking that as example, it shouldn't be hard to adapt it to a different system. New forces can be easily created and added to a system. Note that you can add internal and external forces (every force is calculated with every pair, including itself, that it can be used as an external force).