https://wiki.dynamo.biozentrum.unibas.ch/w/index.php?title=Filament_types_code_example&feed=atom&action=history
Filament types code example - Revision history
2024-03-29T05:13:40Z
Revision history for this page on the wiki
MediaWiki 1.34.0
https://wiki.dynamo.biozentrum.unibas.ch/w/index.php?title=Filament_types_code_example&diff=949&oldid=prev
Daniel Castaño at 14:29, 15 August 2016
2016-08-15T14:29:02Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 14:29, 15 August 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>This code exemplifies the geometry and syntax of different [[Filament model| filament types]]. </div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>This code exemplifies the geometry and syntax of different [[Filament model<ins class="diffchange diffchange-inline">#Types_of_filaments</ins>| filament types]]. </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[File:filamentTypes.png|thumb|center|upright|800px|Expected onscreen result of running this code on Matlab.]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[File:filamentTypes.png|thumb|center|upright|800px|Expected onscreen result of running this code on Matlab.]]</div></td></tr>
</table>
Daniel Castaño
https://wiki.dynamo.biozentrum.unibas.ch/w/index.php?title=Filament_types_code_example&diff=948&oldid=prev
Daniel Castaño at 14:28, 15 August 2016
2016-08-15T14:28:14Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 14:28, 15 August 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">This code exemplifies the geometry and syntax of different [[Filament model| filament types]]. </ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[File:filamentTypes.png|thumb|center|upright|800px|Expected onscreen result of running this code on Matlab.]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>% We construct a set of fake points:</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>% We construct a set of fake points:</div></td></tr>
</table>
Daniel Castaño
https://wiki.dynamo.biozentrum.unibas.ch/w/index.php?title=Filament_types_code_example&diff=947&oldid=prev
Daniel Castaño: Created page with "<pre> % We construct a set of fake points: points = [1:10:100;1:10:100;1:10:100]'; %% % we create four filaments of different types pathFilament = dmodels.filamentWithTors..."
2016-08-15T14:25:13Z
<p>Created page with "<pre> % We construct a set of fake points: points = [1:10:100;1:10:100;1:10:100]'; %% % we create four filaments of different types pathFilament = dmodels.filamentWithTors..."</p>
<p><b>New page</b></p><div><pre><br />
% We construct a set of fake points:<br />
points = [1:10:100;1:10:100;1:10:100]';<br />
<br />
%%<br />
% we create four filaments of different types<br />
<br />
pathFilament = dmodels.filamentWithTorsion();<br />
helixFilament = dmodels.filamentSubunitsInHelix();<br />
ringFilament = dmodels.filamentRings();<br />
randomFilament = dmodels.filament();<br />
<br />
% the names on the left are arbitrarily chosen variable names.<br />
% the names on the right are the functions (actually class constructors)<br />
% that we are invoking<br />
<br />
%% <br />
<br />
% we provide parameters for the individual geometries:<br />
<br />
% filament with subunits on path. Radius is not required.<br />
pathFilament.subunits_dphi = 60; % changes the x axis of successive subunits<br />
pathFilament.subunits_dz = 10;<br />
<br />
% helical path of filament<br />
helixFilament.radius = 20;<br />
helixFilament.subunits_dphi = 5; <br />
helixFilament.subunits_dz = 1;<br />
<br />
% rings<br />
ringFilament.radius = 20; % distance of subunits to center<br />
ringFilament.ringSeparation = 30; % distance between rings<br />
ringFilament.subunitsPerRing = 16; % subunits on each ring<br />
<br />
% filament: points randomly organized on the filament walls<br />
randomFilament.radius = 20;<br />
randomFilament.mesh_parameter = 15;<br />
randomFilament.crop_mesh_parameter = 30; % a mean distance between particles of 30 pixels<br />
<br />
<br />
<br />
%%<br />
% we create a figure to depict <br />
figure(1);clf; <br />
<br />
% loops on each model<br />
<br />
% we create a cell array variable containing all models so that we can loop on it <br />
f = {pathFilament,helixFilament,ringFilament,randomFilament};<br />
<br />
for i=1:length(f);<br />
<br />
% provides the same points to each filament type<br />
f{i}.points = points;<br />
<br />
% creates a backbone<br />
f{i}.backboneUpdate();<br />
<br />
<br />
% creates the crop points<br />
f{i}.updateCrop();<br />
<br />
% creates a subplot for each model<br />
h = subplot(1,4,i); % array of 1 row and 4 columns<br />
<br />
<br />
f{i}.plotPoints(h,'refresh',false,'hold_limits',false); % plots points delivered by the user<br />
%f{i}.plotTablePoints(h,'refresh',false,'hold_limits',false); % plots computed table Points<br />
f{i}.plotTableSketch(h,'refresh',false,'hold_limits',true); % plots computed table directions<br />
<br />
% sets as title of each plot the class of the filament <br />
title(class(f{i}));<br />
axis(h,'equal');<br />
axis(h,[-20,120,-20,120,-20,120]); % visualization limits<br />
<br />
<br />
drawnow; % updates the plot<br />
end<br />
<br />
set(gcf,'Name','Filament types in Dynamo');<br />
</pre></div>
Daniel Castaño