Demonstrates the structure of the heart model, including fibre architecture. A possible outcome of this example is shown below with gold cylinders aligned in the fibre direction and blue "sheets" indicating the sheet orientation.
If you are using the firefox web browser and have installed the Zinc extension you can view this example online by using one of the links below:
#Example_a3: Prolate spheroidal coordinates, fibres: viewing the heart # # The heart model uses prolate spheroidal coordinates to describe its complex, # rounded shape with minimal degrees of freedom. The mesh still requires many # elements, and the heart wall is two elements thick in places. In addition, # fibre fields describe the orientation of muscle fibres and sheets over the # heart. This example creates graphics to help visualise the structure of the # heart, demonstrates prolate spheroidal coordinates, and shows how to view # a fibre field. # # Be sure to run the commands in this example in the order they are presented, # and not all at once. Comments and instructions for things you can do are given # between these commands. # # The exnode and exelem files used in this example were generated from # example 141 # #---------- # # Set the default tessellation to use 4 segments in each element direction. # This command does not exist on older versions of cmgui. It is safe to ignore errors. gfx define tessellation default minimum_divisions "4" refinement_factors "1"; # Create a few materials in addition to the default for use later. gfx create material heart ambient 0.3 0 0.3 diffuse 1 0 0 specular 0.5 0.5 0.5 shininess 0.5; gfx cre mat trans_purple ambient 0.4 0 0.9 diffuse 0.4 0 0.9 alpha 0.3 gfx cre mat bluey ambient 0 0.2 0.4 diffuse 0 0.5 1 specular 0.5 0.5 0.5 shininess 0.8 gfx cre mat gold ambient 1 0.7 0 diffuse 1 0.7 0 specular 1 1 0.8 shininess 0.8 gfx cre mat axes ambient 0.5 0.5 0.5 diffuse 0.5 0.5 0.5 # # Read in the heart and draw axes. gfx read nodes example heart.exnode gfx read elements example heart.exelem gfx modify g_element "/" point glyph axes_xyz general size "1.5*1.5*1.5" select_on material axes selected_material default # # Establish an initial view with white lines and red endocardial surfaces. # (Latter are just exterior surfaces where xi.3 = 0.0). gfx modify g_element heart general clear; gfx modify g_element heart lines coordinate coordinates select_on material default selected_material default_selected; gfx modify g_element heart surfaces exterior face xi3_0 material heart; # # Open the graphics window and reorient the heart up the right way (since -x is # "up" in the heart model). Also turn on perspective. gfx create window 1 gfx modify window 1 image rotate 0 1 0 -90 gfx modify window 1 view perspective # # Now we'll spend some time looking at iso-surfaces of the prolate spheroidal # coordinates. Firstly, define a field for each of the components of the coordinates: lambda, mu, theta gfx define field coordinates.lambda component coordinates.lambda gfx define field coordinates.mu component coordinates.mu gfx define field coordinates.theta component coordinates.theta # # Next open the scene editor. gfx edit scene # # Set 'Auto' to off, so that 'Apply' will be needed to see the iso-surfaces. # The group 'heart' on scene default should be selected, and it will have the # default lines and the endo-cardial surfaces added earlier. Select # 'iso_surfaces', 'Add' and make sure the iso-scalar 'coordinates.lambda' is to # equal to 0.5 before clicking 'Apply'. Coordinate lambda increases in curves # away from the central axis of the heart, (-)x. Change the iso value to 0.75 # and apply the changes. Next change the iso-component to mu, which increase up # the heart. Set mu to 1.5708 (=PI/2) to see a nice slice through the heart. # Finally, try the theta component which varies from 0 to 2*PI around the axis # of the heart. # # Try having several different iso-surfaces visible simultaneously, and with # different materials. Change the element discretization (in the general # settings [or future cmgui version: tessellation 'default') to 8*8*4 and apply # this. It will take a few seconds to compute the graphics at this higher # quality rendition, but the surfaces and iso-surfaces should look somewhat # nicer. Note that due to the shape of the mesh and the elements used, it is # fine to use less detail to draw graphics in the xi3 (radial/lambda) direction. # # Now add semi-transparent purple surfaces to the exterior of the heart to see # its outer shape and interior simultaneously. gfx modify g_element heart surfaces exterior face xi3_1 material trans_purple; # (If you haven't enabled the "Auto Apply/Revert" feature of the scene editor, # you'll have to click on "Revert" to reload the rendition from the scene into # the editor.) # # For the next part of this example. select all the iso-surfaces one-by-one and # click on the 'Del' key to delete them. Also make the outside surfaces # invisible, then click 'Apply'. # # Add element_points to the rendition with the discretization set at 4*4*1 and # the material gold. Choose the 'cylinder' glyph, make the base glyph size # 2*0.5 (becomes 2*0.5*0.5 when you press enter), choose field 'fibres' as the # orientation/scale field and set the scale_factors (multiplying the magnitude # of the orientation/scale field vectors) to 0, since the fibre axes are unit # vectors specifying direction only. The heart is now covered in small cylinders # indicating the direction of the fibres. Following the discretization values, # there are 4*4*1 cylinders across each element in its xi1*xi2*xi3 # directions, respectively. Note that the 'Glyph_size' paramaters display the # size as length*width*height - the width is in the direction of the fibre # sheet. # # Cylinders are just one way of viewing the fibres; they don't show the plane of # the sheet, nor do they indicate which direction they are pointing in along # their axis - which may be useful for checking your fibre field. You can choose # several other "Glyphs" besides cylinders to display over the fibre field. # Apply the 'arrow_solid' glyph and take a close look at it. (The centre of the # cylinder is half-way along its length, whereas the arrow is centred at its # tail. The 'Centre' can be changed on the editor. All glyphs are designed to be # of unit dimension - 1 unit long, 1 unit diameter at the widest point etc. - # so sensible centre values should be of a similar magnitude.) # # Go back to using cylinders, add another set of fibres using 'sheets' and # material 'bluey'. Enter '1.5' in the 'Glyph size' field. You can now see both # the the fibre direction and sheet plane. Experiment with different glyphs, # sizes, discretizations and materials to see how you can interpret the fibre # field. In general, keep the discretization the same for all fibre graphics. # #---------- #
Name Modified Size
example_a3.com 20-Apr-2012 6.4k COPYRIGHT 19-Apr-2012 504 heart.exelem 20-Apr-2012 376k heart.exnode 20-Apr-2012 47k
Name Modified Size
examples_a_backup_a3.tar.gz 12-Aug-2014 721k
Status | Tested | Real time (s) | |
i686-linux | |||
cmgui-wx | Success | Sun Mar 6 00:11:18 2016 | 2 |
cmgui-wx-debug | Success | Sun Mar 6 00:14:16 2016 | 2 |
cmgui-wx-debug-memorycheck | Success | Sun Mar 6 00:14:18 2016 | 2 |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 01:06:17 2016 | 47 |
last break | Sun Mar 6 01:05:00 2016 | 47 | |
last success | Tue Feb 10 01:00:00 2015 | 50 | |
x86_64-linux | |||
cmgui-wx | Failure | Sun Mar 6 00:01:35 2016 | 0 |
last break | Sun Mar 6 00:01:00 2016 | 0 | |
last success | Wed Jun 3 00:04:00 2015 | 0 | |
cmgui-wx-debug | Failure | Sun Mar 6 00:01:35 2016 | 0 |
last break | Sun Mar 6 00:01:00 2016 | 0 | |
last success | Wed Jun 3 00:04:00 2015 | 1 | |
cmgui-wx-debug-memorycheck | Failure | Sun Mar 6 00:01:35 2016 | 0 |
last break | Sun Mar 6 00:01:00 2016 | 0 | |
last success | Wed Jun 3 00:05:00 2015 | 1 | |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 00:03:00 2016 | 9 |
last break | Sun Mar 6 00:02:00 2016 | 9 | |
last success | Wed Jun 3 00:33:00 2015 | 36 | |
cmgui-wx-gcc-cad-debug-valgrind | Success | Thu Jan 7 00:02:11 2016 | 6 |
x86_64-linux | |||
139 | cmgui-wx: | error exit status 139. | |
139 | cmgui-wx-debug: | error exit status 139. | |
139 | cmgui-wx-debug-memorycheck: | error exit status 139. | |
139 | cmgui-wx-debug-valgrind: | error exit status 139. |
i686-linux | |||
Success | cmgui-wx: | diff test: no differences with generic answer. | |
Success | cmgui-wx-debug: | diff test: no differences with generic answer. | |
Success | cmgui-wx-debug-memorycheck: | diff test: no differences with generic answer. | |
Failure | cmgui-wx-debug-valgrind: | diff test: differences with generic answer; Test output. | |
x86_64-linux | |||
Failure | cmgui-wx: | diff test: differences with generic answer; Test output. | |
Failure | cmgui-wx-debug: | diff test: differences with generic answer; Test output. | |
Failure | cmgui-wx-debug-memorycheck: | diff test: differences with generic answer; Test output. | |
Failure | cmgui-wx-debug-valgrind: | diff test: differences with generic answer; Test output. |
Html last generated: Sun Mar 6 05:50:50 2016
Input last modified: Wed May 23 10:57:12 2012