Giter VIP home page Giter VIP logo

drawbeam's Introduction

Beam plotter functions

Author: David Ochoa

Some functions I use to plot beams, supports and loads for strenght of materials courses.

Example

I haven't write proper docs, but please see the examples in the notebook, I think that they are self explanatory.

Available functions are:

showsave(name)

Prints and saves images given a name.


rotate(vx, vy, angle)

Helper function to rotate arrays.


rep_vector(x1, y1, x2, y2, lineformat='-', label='', shw_label=True, shw_mag=False, shw_angle=False, shw_legend=True, aligned=False, arrow_scale = 0.02, offset = 1, fdict={})

Plot a vector (line with arrow). It can show a legend and magnitude and angle values.


rep_pinned(x, y, scale=1, label='', shw_label=False, rotation=0, lineformat='k-')

Plot a pinned support.


rep_roller(x, y, scale=1, label='', shw_label=False, rotation=0, lineformat='k-')

Plot a roller support.


rep_fix(x, y, scale=1, label='', shw_label=False, rotation=0, lineformat='k-')

Plot a fixed support.


rep_none(x, y, scale=1, label='', shw_label=False, rotation=0, lineformat='k-')

Plot a beam end without suppport, helper function to place labels.


rep_axis(x=0, y=0, scale=1, shw_label=True, lineformat='k-')

Plots x,y axis lines.


rep_element(x1, x2, y1, y2, lineformat='k-', fill=True)

Plots a beam or element (filled rectangle).


rep_leng(x1, x2, y1, y2, lineformat='k-', offset=-1, label='', shw_label=True, label_offset=0.5, arrow_scale=0.015)

Plots a aligned lenght measure.


rep_dist(x1, x2, y1, y2, lineformat='k-', arrows=3, function=(lambda x: 1), offset=-1, label='', shw_label=True, label_offset=0.5, arrow_scale=0.15)

Plots a distributed load.


rep_pair(x, y, diameter, start_angle, end_angle, lineformat='k-', label_angle=0, offset=-1, label='', shw_label=True, label_offset=0.5, arrow_scale=.6) '''Plots a couple force (moment).'''


drawbeam's People

Contributors

ochoadavid avatar

Watchers

 avatar

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.