Skip to content

Nganga02/truss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the documentation for the implementation of the truss project

Scope of the project

  1. Implement the equations of truss
  2. Implement the animation for the behavior of the truss

The document captures the flow of how I implemented the project from start to finish

Equations of study:

  1. The stress function

    $F(\lambda ) = A\sigma(\lambda)$

  2. The stored energy function

    $W(\lambda) = \int_{1}^{\lambda} \sigma(\xi), d\xi$

  3. Linear stress strain relationship

    $\sigma = E\epsilon$

Libraries

If you are using ubuntu for development of this project you'll require to install one library for rendering purposes that is the simple directmedia layer.

Installation

When you want to run the project

sudo apt install libsdl2-2.0-0

When developing/compiling programs with SDL

sudo apt install libsdl2-dev

When you want to upload images into the program

sudo apt install libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev

Pre-requisite header and source files

The following are the header files required to accomplish the truss project

1. nelder-mead.[ch]
2. linked-list.[ch]
3. fetch_line.[ch]
4. xmalloc.[ch]

Files maneuvering

The files truss-io.[ch] handle the reading and writing of truss description files which has the extension .tdf

The files truss.[ch] contain the implementation of the equations and the solver utility needed to solve trusses

I used the file render-beta.c to solve and render the truss function.

Using the following file you can follow to get the steps I followed to render the truss filerender.

The following came up while doing the project

  1. I had to come up with a projection matrix to scale and translate the truss to fit the animation window.
  2. I realised I dragged on a bug that was allocating pointer size memory instead of data type's memory.

About

This is a truss solver utility implemented in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors