No BSD License  

Highlights from
SpringLab

5.0

5.0 | 2 ratings Rate this file 13 Downloads (last 30 days) File Size: 135 KB File ID: #11305
image thumbnail

SpringLab

by Ofek Shilon

 

05 Jun 2006 (Updated 24 Aug 2006)

Interactive RT simulation of elastic bodies

Editor's Notes:

This file was a File Exchange Pick of the Week

| Watch this File

File Information
Description

This program is a prototype of an interactive elastic model. It makes use of both spring and FEM forces, and several of the elasticity parameters can be modified in run-time (key bindings are displayed in the figure).
To use, left click and drag any point on any face of the model. When the mouse is released, new constraints can be added in the same way. To release such a constraint, right click on its face.

Play around with the parameters - the simulation (although using implicit time integration) can become unstable at certain parameters setup.

The model input format is a VOL file, the (ascii) simple output format of the freeware NetGen. Few sample models are included.

Usage:

SpringLab('sphere')
SpringLab('tissue_cut2')
SpringLab('stomach')
SpringLab('y')

REQUIRES ADDITIONAL FILES:
select3d by Joe Conti, and cameratoolbarnokeys by me.

MATLAB release MATLAB 7.2 (R2006a)
Other requirements cameratoolbarnokeys , select3d, preferrably some graphic hardware (would run very slow with software rendering).
Tags for This File  
Everyone's Tags
elastic bodies, gallery, physical interactive simulation, rt simulation
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
17 Jul 2012 Anton Semechko

Incredible! Many thanks for posting this!

26 Sep 2006 Tim Davis

Very nice simulation, but I have a suggestion for improvment. There are some suspicious numerical techniques used here. See line 417 of Springlab.m, for example. You should never multiply by the inverse of a matrix. Using inv that way is inaccurate and very slow (althought it appears you're doing it only for matrices of modest size, so speed is not an issue). Anyway, "multiplying by the inverse" is what slash and backslash are for (they do not explicitly compute the inverse). This might be the source of instability that you've observed.

ForceCoeffMat=1/(dt*dt) *inv((U*W)*(Minv*U'));

30 Jun 2006 Jesse Parker

Wow, this is really cool! Way more advanced than what I'm trying to do, but fun to play with.

Updates
20 Jun 2006

bug fixed, pre-requisites packaged inside.

10 Jul 2006

Changed cameratoolbar startup status to unpress all keys

18 Jul 2006

included the required cameratoolbarnokeys in the zip

19 Jul 2006

Repackaged - file missing in former packaging.

24 Aug 2006

cameratoolbar bug fixed, category changed.

Contact us