simkid

command module
v0.0.0-...-803aa2f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

README

CodeFactor

SIMKID: Toy motion simulator of simple physical systems for teaching kids

Teach kids physics and programming in parallel. This is a home-based project for practice Go with my younger son.

Details

In simkid the simulation space is a 1920✕1080 pixel area which is updated in 60 fps rate. All coordinates are given in pixels. Velocity and acceleration should be in pixel per frame [p/f] and pixel per frame per frame [p/f²] accordingly.

The main component of simkid is sim.go - simulation logic: put here individual equations of motion for maximum 10 balls and possibly add interactions between them.

Use simkid-ffmpeg.sh to compile PNG-frames into final MP4-video.

Usage

Clone the repo and run:

go run .
./simkid-ffmpgeg.sh
mpv "./videoset/$(ls -Art ./videoset | tail -n 1)"

Or having simkid artefact built with

go build .

simply watch the resulting video invoking

./simkid.sh

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL