Coder Social home page Coder Social logo

ipapasa / femgl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikolalysenko/femgl

0.0 1.0 0.0 4.12 MB

WebGL finite element viewer

Home Page: https://mikolalysenko.github.io/femgl/index.html

License: MIT License

Python 16.92% JavaScript 83.08%

femgl's Introduction

femgl

A WebGL accelerated finite element mesh viewer.

Usage

To launch the application, go to the following URL:

https://mikolalysenko.github.io/femgl/index.html

Custom meshes may be inspected by dragging a file onto the page.

Preparing data

To translate existing data into the web format a conversion script is provided which is written in python (see convert/convert.py). Some example data is contained in the data/ folder of this repository and a demonstration of how to convert this can be found in convert/example.py.

Mesh schema

Each mesh is a JSON object consisting of coordinate data, displacements, elements and palette information. The mesh JSON object must have the following properties:

coordinates

An array of length 3 arrays storing the coordinates of each node in the mesh.

displacements

An array of length 3 arrays giving the displacement of each node in the mesh.

elements

An array of groups of elements. Each element group is a JSON object with the following properties:

type

The type of the element. Currently only the following element types are supported:

  • P6 A parabolic triangular element
  • P8 A parabolic quadrilateral element
stresses

An array of per-element stress values

cells

An array of arrays giving the vertex indices for each cell in the mesh.

palette

An array of length 3 arrays giving the palette texture in RGB color space.

Building locally

First, you will need to clone this repo and then install all of its dependencies:

git clone [email protected]:mikolalysenko/femgl.git
cd femgl
npm install

After this is done you can then run the program locally using budo via the following command:

npm start

Or build a standalone page with the command:

npm run build-page

Credits

Development supported by

(c) 2017 BITS Cooperative, CADETECH S.A.

femgl's People

Contributors

mikolalysenko avatar

Watchers

James Cloos 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.