Giter Site home page Giter Site logo

l1mey112 / yr11-physics-applied Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 0.0 1.08 MB

Year 11 Physics, Applied. A collection of interactive demonstrations and physics simulations.

Home Page: https://l-m.dev/physics-applied

License: MIT License

Makefile 2.09% C 87.22% HTML 8.20% CSS 2.49%
c-programming emscripten imgui interactive physics physics-simulation sokol wasm website

yr11-physics-applied's Introduction

Welcome! This repository is a collection of interactive demonstrations and physics simulations designed to visualise and reinforce the physics concepts I have learned in my Year 11 physics class.

Each demo will be interactive and will cover a certain noteworthy topic. They will be created as I learn the content and will be provided free of charge for everyone.

The demos included in this repository are written purely in the C programming language and use Emscripten to compile them to WebAssembly.

Visit the page at l-m.dev/physics-applied

Supporting libraries sokol and Dear ImGui are used as an abstraction layer over the specifics of the web/browser and allow me to focus on writing the demos, not hassle with the looks.

All of the code in this repository is licensed under the MIT open source license. See the LICENSE file for more details.

Compilation

I don't like cmake, too complicated and not enough control. I took the existing compilation for libsokol.a and libcimgui.a, then blindly seralised it into a single Makefile.

Install Emscripten, this will provide emcc, em++, and wasm-opt.

Oh yeah, don't try this on Windows, just don't.

Call make to create HTML files in public/.

$ make
$ ls public
...
...

You can also create production/optimised builds, which will insert certain CFLAGS and run more code. Call with -j<cores> to run builds concurrently.

$ make PROD=1 -j$(nproc)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.