https://github.com/thearnavrustagi/trussanalyser
Truss analysis
https://github.com/thearnavrustagi/trussanalyser
graphics interpreter physics pygame python python3 sprites structures truss
Last synced: about 1 month ago
JSON representation
Truss analysis
- Host: GitHub
- URL: https://github.com/thearnavrustagi/trussanalyser
- Owner: thearnavrustagi
- Created: 2023-02-08T08:33:57.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-18T04:01:28.000Z (over 3 years ago)
- Last Synced: 2025-08-15T17:46:00.007Z (10 months ago)
- Topics: graphics, interpreter, physics, pygame, python, python3, sprites, structures, truss
- Language: Python
- Homepage:
- Size: 2.99 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TrussAnalyser
## A program which helps you analyse the distribution of forces given a Truss
### Step 1: Programming the truss
You can use a simple language to write the truss and put it in a `*.truss` file, the truss is defined by the points and the beams connecting it, the languages goes as follows
```
# defining the points for the given truss
A (7,8)
B (9,6)
C (5,4)
# joining the points with beams
A-B
B-C
C-A
# Now we put the reactions in at the pin and roller joints
RY1 A (0,1)
RX1 A (1,0)
RY2 B (0,1)
# Now for an external force which represents all the forces which behave as loads
~ F1 A (0,1)
~ F2 B (1/sqrt(2),1/sqrt(2))
```
You can see if your truss is rendered right by the following command
```bash
$ python3 main.py -p name.truss
```
### Step 2: Analysing the truss
You can use the following command to see the forces in every beam of the truss
```bash
$ python3 main.py -v main.truss
```
executing without the `-v` will show you the truss, and rods which are compressed and tense, usually, `green` is tense and `red` is compressed
