Skip to content

rvcristiand/mas.js

Repository files navigation

mas.js

Model Civil Engineering Structures with mas.js.

Getting Started

You can use mas.js online! Just click here.

Alternatively, you can run it from a local machine. The following instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need a Web Browser and run a local server. Git is optional.

Get a copy of mas.js

Fork, clone or download this repository.

Web Browser

Use the browser you want. We recommend Firefox or Google Chrome.

Local server

You can run a local server with using python. If you have python 2, you can run the command

python -m SimpleHTTPServer

in the folder root.

If you have python 3, run the command

python3 -m http.server

Installing

If you have already a local host running on your machine, you can open the index.html file to test the program.

API

Details about the functions provides by mas.js.

Functions

  • Load a model.

    open("filename.json")

    • filename.json: input file.
  • Add a joint to the model at position (x, y, z).

    addJoint(x, y, z)

    • x: coordinate x.
    • y: coordinate y.
    • z: coordinate z.
  • Add a frame to the model with j as the near joint and k as the far joint.

    addFrame(name, j, k)

    • name: name of the frame.
    • j: near joint.
    • k: far joint.
  • Add many joints to the model at random positions inside a sphere.

    manyJoints(radius, number)

    • radius: sphere's radius.
    • number: number of joints.
  • Add many frames to the model at random positions inside a sphere.

    manyFrames(radius, number)

    • radius: sphere's radius.
    • number: number frames.

Built with

Authors

About

Model civil engineering structures with mas.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages