Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
physics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dfalzone2
physics
Commits
9cec4d47
Unverified
Commit
9cec4d47
authored
5 years ago
by
Dante Falzone
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update readme.md
parent
dc2be7c1
Branches
master
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
readme.md
+22
-1
22 additions, 1 deletion
readme.md
with
22 additions
and
1 deletion
readme.md
+
22
−
1
View file @
9cec4d47
# physics
Licensed under GNU GPL 3.0
This is a simple physics simulation. There is a red dot and a bunch of green dots.
The green dots accelerate towards the red dot as if by gravitational attraction.
They can collide with eachother, with the walls, and with the red dot.
You can move the red dot by dragging your cursor over the window.
A few months ago I wrote various SDL2-based programs, but they are very badly
written (look in my repository "djf-3d" to see what I mean). They are an embarassment.
I wrote this program to demonstrate that I know now how to do things the Right Way,
in pure C. C is what I am good at; whenever I write C++, I am really just writing C
with classes and iostreams. When I have attained true mastery of C, I will pick up C++
again, this time being sure to use the various features, data structures, and library
abstractions (vectors, smart pointers, RAII, etc.) that characterize modern C++. Since
I have not, in my own estimation, attained true mastery of C, I will not be writing C++
again for a good while.
You will need libsdl2-dev to make this program run. I have tested it on GNU/Linux and
MacOS X, and it seems to run fine on both platforms without the need to modify the source
code or the make script. However, my attempts to build and run it on Windows, with MinGW
or with Visual Studio, have failed. I therefore recommend that you run this on a Unix-like
operating system. Additionally, the make script is written in bash and relies on gcc.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment