This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First time they open the main page (the petri dish one): | |
- [ ] we need to have customizable text snippets appearing in the right panel | |
- [ ] the only button that will be visible will be a "next" button (arrow same as in the previous flow) to go to the next tutorial message | |
- [ ] at the end of the flow simulation buttons will start appearing as they are introduced to the user | |
- [ ] once the user finishes the flow all the simulation buttons are visible and we need to persist that they have done so | |
Post Tutorial flow: | |
- [ ] simulation buttons always show | |
- [ ] after this flow is completed we can show random tips / facts as text (from a list) and the user can go to the next / prev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Objects in the file: | |
/ (Group) | |
/time (Dataset) | |
/wormsim (Group) | |
/wormsim/mechanical (Group) | |
/wormsim/mechanical/VISUALIZATION_TREE (Group) | |
/wormsim/mechanical/VISUALIZATION_TREE/transformation (Dataset) | |
/wormsim/muscle_0 (Group) | |
/wormsim/muscle_0/mechanical (Group) | |
/wormsim/muscle_0/mechanical/SIMULATION_TREE (Group) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scene = new THREE.Scene(); | |
// setup lighting etc. | |
load('/org.wormsim.frontend/resources/files/cuticleNotBent.dae'); | |
load("/org.wormsim.frontend/resources/files/muscles.dae"); | |
load("/org.wormsim.frontend/resources/files/neurons.dae"); | |
function load(daeLocation){ | |
var manager = new THREE.LoadingManager(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Ismael Celis 2010 | |
Simplified WebSocket events dispatcher (no channels, no users) | |
var socket = new FancyWebSocket(); | |
// bind to server events | |
socket.bind('some_event', function(data){ | |
alert(data.name + ' says: ' + data.message) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set activation signal buffer to test contraction | |
float[] signals = new float[_elasticBundlesCount]; | |
for(int i = 0; i < _elasticBundlesCount; i++) | |
{ | |
signals[i] = 0.9f; | |
} | |
this.setActivationSignal(signals); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SOFA Limitations: | |
1. not distributed | |
2. not web-based front-end | |
SOFA SPH Limitations: | |
1. SOFA does not support PCISPH | |
2. SOFA does not support contractile tissue | |
3. SOFA does not support impermeable membranes | |
Boyle Model Limitations: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Writer test_log = null; | |
// write txt files | |
test_log = new FileWriter("test_log.txt"); | |
for(int i=0; i<checkpoint_values.neighborMap.size(); i=i+2 ) | |
{ | |
test_log.write(checkpoint_values.neighborMap.get(i) + "\t" + | |
checkpoint_values.neighborMap.get(i + 1) + "\r\n"); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__kernel void clearBuffers( | |
__global float2 * neighborMap, | |
int PARTICLE_COUNT | |
) | |
{ | |
int id = get_global_id( 0 ); | |
if( id >= PARTICLE_COUNT )return; | |
float2 initVector = (float2)( -1, -1); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// read buffer functions inline declarations in owOpenCLSolver.h | |
void read_position_b( float * positionBuffer ) { copy_buffer_from_device( positionBuffer, position, PARTICLE_COUNT * sizeof( float ) * 4 ); }; | |
void read_sortedPosition_b( float * sortedPositionBuffer ) { copy_buffer_from_device( sortedPositionBuffer, sortedPosition, PARTICLE_COUNT * sizeof( float ) * 4 * 2 ); }; | |
void read_neighborMap_b( float * neighborMapBuffer ) { copy_buffer_from_device( neighborMapBuffer, neighborMap, PARTICLE_COUNT * sizeof( float ) * 2 ); }; | |
void read_velocity_b( float * velocityBuffer ) { copy_buffer_from_device( velocityBuffer, velocity, PARTICLE_COUNT * sizeof( float ) * 4 ); }; | |
void read_acceleration_b( float * accelerationBuffer ) { copy_buffer_from_device( accelerationBuffer, acceleration, PARTICLE_COUNT * sizeof( float ) * 4 * 2); }; | |
void read_sortedVelocity_b( float * sortedVelocityBuffer ) { copy_buffer_from_device( sortedVelocityBuffer, sortedVelocity, PARTICLE_COUNT * sizeof( float ) * 4 ); }; | |
void read_elastic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public synchronized float[] solveWithDeviceMemory() { | |
// Allocate native (device) memory for the input data | |
CLBuffer<Float> bufIn = _context.createFloatBuffer(CLMem.Usage.Input, _input.length); | |
// Allocate native (device) memory for the output data | |
CLBuffer<Float> bufOut = _context.createFloatBuffer(CLMem.Usage.Output, _input.length); | |
// Copy input data directly to device memory | |
Pointer<Float> ptrIn = bufIn.map(_queue, CLMem.MapFlags.Write); | |
ptrIn.setFloats(_input); | |
bufIn.unmap(_queue, ptrIn); |