Giter Site home page Giter Site logo

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

femgl's Issues

delete codes about mouse events

Hi.where is your code is about mouse events.so I want to delete that so after release mouse events I could use that in other programs.
Thanks

License

Hello,
Could you clarify license of your software.

more than one mesh

Hello.if we want more than one mesh would your programme support that?.
Also if we want to draw a new 3D object matching your codes do you have any suggestion?
Regards

WebGL finite element viewer https://mikolalysenko.github.io/femgl show nothing on browser...

Hello,
WebGL finite element viewer https://mikolalysenko.github.io/femgl
**show nothing on browser...

at this address**
https://github.com/mikolalysenko/femgl

this is my installation

C:\femgl\femgl>npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

this is my package.json text file

{
"name": "femgl",
"version": "1.0.0",
"description": "Finite element mesh viewer",
"main": "index.js",
"scripts": {
"build": "python convert/example.py",
"build-page": "browserify index.js | indexhtmlify > index.html",
"start": "budo index.js --open --live"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mikolalysenko/femgl.git"
},
"keywords": [
"finite",
"element",
"mesh",
"viewer",
"webgl"
],
"author": "Mikola Lysenko",
"license": "MIT",
"bugs": {
"url": "https://github.com/mikolalysenko/femgl/issues"
},
"browserify": {
"transform": [
"es2020"
]
},
"homepage": "https://github.com/mikolalysenko/femgl#readme",
"dependencies": {
"browserify": "^13.3.0",
"budo": "^9.4.1",
"control-panel": "^1.2.0",
"drag-and-drop-files": "0.0.1",
"es2020": "^1.1.9",
"indexhtmlify": "^1.3.1",
"regl": "^1.3.0",
"regl-camera": "^1.1.0"
}
}

and when I start by npm start I see blank page in browser , with address of http://192.168.5.10:9966/ **and title of budo

this is my npm start**

C:\femgl\femgl>npm start

[email protected] start C:\femgl\femgl
budo index.js --open --live
[0003] info Server running at http://192.168.5.10:9966/ (connect)
[0003] info LiveReload running on 35729
[0006] 20ms 256B GET 200 / (generated)
[0015] 11.8s 4.2MB (browserify)
[0015] 8998ms 4.2MB GET 200 /index.js (generated)

and this is my page source code

<title>budo</title><script type="text/javascript" src="//192.168.5.10:35729/livereload.js?snipver=1" async="" defer=""></script><script src="index.js"></script> and this is the result.blank page

femgl01

what could I do?
Regards

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.