|
6 | 6 | <!--
|
7 | 7 | This HTML was auto-generated from MATLAB code.
|
8 | 8 | To make changes, update the MATLAB code and republish this document.
|
9 |
| - --><title>anim8</title><meta name="generator" content="MATLAB 9.6"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2019-05-20"><meta name="DC.source" content="HELP_anim8.m"><style type="text/css"> |
| 9 | + --><title>anim8</title><meta name="generator" content="MATLAB 9.6"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2019-05-30"><meta name="DC.source" content="HELP_anim8.m"><style type="text/css"> |
10 | 10 | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outine:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
|
11 | 11 |
|
12 | 12 | html { min-height:100%; margin-bottom:1px; }
|
|
66 | 66 |
|
67 | 67 |
|
68 | 68 |
|
69 |
| - </style></head><body><div class="content"><h1>anim8</h1><!--introduction--><p>Below is a demonstration of the features of the <tt>anim8</tt> function</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#2">Syntax</a></li><li><a href="#3">Description</a></li><li><a href="#4">Examples</a></li><li><a href="#5">Example 1a: Animating by adjusting a single graphics property, a surface rotation</a></li><li><a href="#11">Example 1b: Animating by adjusting a single graphics property, surface vectors</a></li><li><a href="#17">Example 2a: Animating multiple graphics features, points and curves</a></li><li><a href="#23">Example 2b: Animating multiple graphics features, color changing, bouncing, rotating surface</a></li></ul></div><pre class="codeinput">clear; close <span class="string">all</span>; clc; |
| 69 | + </style></head><body><div class="content"><h1>anim8</h1><!--introduction--><p>Below is a demonstration of the features of the <tt>anim8</tt> function</p><!--/introduction--><h2>Contents</h2><div><ul><li><a href="#2">Syntax</a></li><li><a href="#3">Description</a></li><li><a href="#4">Examples</a></li><li><a href="#5">Example 1a: Animating by adjusting a single graphics property, a surface rotation</a></li><li><a href="#11">Example 1b: Animating by adjusting a single graphics property, surface vectors</a></li><li><a href="#17">Example 2a: Animating multiple graphics features, points and curves</a></li><li><a href="#23">Example 2b: Animating multiple graphics features, color changing, bouncing, rotating surface</a></li><li><a href="#27">Loading a saved anim8 figure;</a></li></ul></div><pre class="codeinput">clear; close <span class="string">all</span>; clc; |
70 | 70 | </pre><h2 id="2">Syntax</h2><p><tt>hf=anim8(varargin);</tt></p><h2 id="3">Description</h2><p>The <tt>anim8</tt> function can be used to interactively animate graphics components. Anything about a figure and its content with a handle whose properties can be accessed/altered using MATLAB can be animated. This includes properties of graphics objects and view settings. To use <tt>anim8</tt> create a figure window with features to animate (e.g. plots, surfaces, views, etc.). Next create a structure containing the object handles, object properties to alter, and the property values. The anim8 function takes in 0, 1, or 2 inputs. No input: Anim8 will assume you want to browse to a previously saved anim8 figure and reload it. 1 input: Anim8 will assume the input is a path to a previously saved anim8 figure to be reloaded. 2 inputs: Anim8 will assume the first input is the figure handle, and the second input the anim8 structure.</p><h2 id="4">Examples</h2><h2 id="5">Example 1a: Animating by adjusting a single graphics property, a surface rotation</h2><p>Creating example data, in this case a surface which will be rotated in the animation by adjusting the angular value of a view property of the axis.</p><pre class="codeinput">[X,Y,Z]=peaks(25); <span class="comment">%Some graphics data</span>
|
71 | 71 | </pre><p>Initiate a visualization in a figure window while storing an object handle, in this case an axis handle to manipulate a view.</p><pre class="codeinput">hf=cFigure;
|
72 | 72 | surf(X,Y,Z);
|
|
210 | 210 | animStruct.Set{q}={cNow,Vp,alphaNow}; <span class="comment">%Property values for to set in order to animate</span>
|
211 | 211 | <span class="keyword">end</span>
|
212 | 212 | </pre><p>Start <tt>anim8</tt> gui</p><pre class="codeinput">anim8(hf,animStruct);
|
213 |
| -</pre><img vspace=" 5" hspace=" 5" src=" HELP_anim8_08.png" alt="" > <p><img vspace=" 5" hspace=" 5" src=" gibbVerySmall.gif" alt="" > </p><p><i><b>GIBBON </b></i> <a href=" www.gibboncode.org" >www.gibboncode.org </a></p><p><i>Kevin Mattheus Moerman </i>, <a href=" [email protected]" >[email protected]</a></p><p><i><b>GIBBON footer text </b></i></p><p>License: <a href=" https://github.com/gibbonCode/GIBBON/blob/master/LICENSE" >https://github.com/gibbonCode/GIBBON/blob/master/LICENSE </a></p><p>GIBBON: The Geometry and Image-based Bioengineering add-On. A toolbox for image segmentation, image-based modeling, meshing, and finite element analysis. </p><p>Copyright (C) 2019 Kevin Mattheus Moerman </p><p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. </p><p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. </p><p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href=" http://www.gnu.org/licenses/" >http://www.gnu.org/licenses/ </a>. </p><p class=" footer" ><br><a href=" https://www.mathworks.com/products/matlab/" >Published with MATLAB® R2019a </a><br></p></div><!-- |
| 213 | +</pre><img vspace="5" hspace="5" src="HELP_anim8_08.png" alt=""> <h2 id="27">Loading a saved anim8 figure;</h2><pre class="codeinput">loadPath=fullfile(fileparts(fileparts(mfilename(<span class="string">'fullpath'</span>))),<span class="string">'data'</span>,<span class="string">'fig'</span>); |
| 214 | +loadName=fullfile(loadPath,<span class="string">'exampleSavedAnim8Figure.fig'</span>); |
| 215 | +anim8(loadName); |
| 216 | +</pre><img vspace=" 5" hspace=" 5" src=" HELP_anim8_09.png" alt="" > <p><img vspace=" 5" hspace=" 5" src=" gibbVerySmall.gif" alt="" > </p><p><i><b>GIBBON </b></i> <a href=" www.gibboncode.org" >www.gibboncode.org </a></p><p><i>Kevin Mattheus Moerman </i>, <a href=" [email protected]" >[email protected]</a></p><p><i><b>GIBBON footer text </b></i></p><p>License: <a href=" https://github.com/gibbonCode/GIBBON/blob/master/LICENSE" >https://github.com/gibbonCode/GIBBON/blob/master/LICENSE </a></p><p>GIBBON: The Geometry and Image-based Bioengineering add-On. A toolbox for image segmentation, image-based modeling, meshing, and finite element analysis. </p><p>Copyright (C) 2019 Kevin Mattheus Moerman </p><p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. </p><p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. </p><p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href=" http://www.gnu.org/licenses/" >http://www.gnu.org/licenses/ </a>. </p><p class=" footer" ><br><a href=" https://www.mathworks.com/products/matlab/" >Published with MATLAB® R2019a </a><br></p></div><!-- |
214 | 217 | ##### SOURCE BEGIN #####
|
215 | 218 | %% anim8
|
216 | 219 | % Below is a demonstration of the features of the |anim8| function
|
|
472 | 475 | % Start |anim8| gui
|
473 | 476 | anim8(hf,animStruct);
|
474 | 477 |
|
| 478 | +%% Loading a saved anim8 figure; |
| 479 | +loadPath=fullfile(fileparts(fileparts(mfilename('fullpath'))),'data','fig'); |
| 480 | +loadName=fullfile(loadPath,'exampleSavedAnim8Figure.fig'); |
| 481 | +anim8(loadName); |
| 482 | +
|
475 | 483 | %%
|
476 | 484 | %
|
477 | 485 | % <<gibbVerySmall.gif>>
|
|
0 commit comments