Example a/testing/heart_fibres: Show heart fibres with streamlines.


The comfile run by this example is as follows:

# 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";

#Tests reading in the heart, producing simple geometry from it and fibre
#oriented glyphs and streamlines. Also show iso-surfaces of lambda=0.75.
gfx read nodes example heart.exnode
gfx read elements example heart.exelem
gfx create material heart ambient 0.5 0 0.2 diffuse 1 0 0 specular 0.5 0.5 0.5 shininess 0.5
gfx create material green ambient 0 0.4 0 diffuse 0 1 0.2 specular 0.4 0.4 0.4 shininess 0.5
gfx create material blue ambient 0 0 0.5 diffuse 0 0.3 1.0 specular 0.4 0.4 0.4 shininess 0.4
gfx create material gold ambient 1 0.4 0 diffuse 1 0.7 0 specular 0.5 0.5 0.5 shininess 0.8
gfx create material silver ambient 0.4 0.4 0.4 diffuse 0.7 0.7 0.7 emission 0 0 0 specular 0.7 0.7 0.7 alpha 1 shininess 0.6
gfx modify g_element "/" 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
gfx define field fibre_axes fibre_axes coordinate coordinates fibre fibres
# rearrange the fibres_axes to be in order sheet,-fibre,normal so can track normal
# to fibres in plane of sheet:
gfx define field fibre composite fibre_axes.1 fibre_axes.2 fibre_axes.3
gfx define field sheet composite fibre_axes.4 fibre_axes.5 fibre_axes.6
gfx define field normal composite fibre_axes.7 fibre_axes.8 fibre_axes.9
gfx define field neg_fibre scale field fibre scale_factors -1 -1 -1
gfx define field fibre_sheet_axes composite sheet neg_fibre normal
# extract the components of the prolate coordinate field as scalar fields:
gfx define field lambda component coordinates.lambda
gfx define field mu component coordinates.mu
gfx define field theta component coordinates.theta
# The following show different versions of fibres on sides of xi1=0/1 surfaces.
gfx mod g_e heart element_points mat blue use_faces face xi1_0 glyph sheet size "2*1*0.4" orientation fibre_axes scale_factors 0 disc 2
gfx mod g_e heart element_points mat green use_faces face xi1_1 glyph sheet size "2*1*0.4" orientation fibre_axes scale_factors 0 disc 2
# Track gold streamlines along fibres, silver along fibre normal in the plane
# of the sheet. Draw as a ribbon, flat side showing the fibre sheet.
gfx modify g_element heart streamlines xi 0.5 0.5 0.5 ribbon vector fibre_axes length 20 width 1 no_data material gold
gfx modify g_element heart streamlines xi 0.5 0.5 0.5 ribbon vector fibre_sheet_axes length 20 width 1 no_data material silver
# Export the scene graph
gfx export vrml file heart.wrl
# Test iso-surfaces.
gfx modify g_element heart iso_surfaces iso_scalar lambda iso_value 0.65 material default as "iso";
gfx define graphics_filter iso_only match_graphics_name iso;
gfx export vrml file heart_iso_lambda.wrl filter iso_only;

Files used by this example are:

Name              Modified     Size

heart_fibres.com 17-Mar-2014 2.9k COPYRIGHT 17-Mar-2014 504 heart.exelem 17-Mar-2014 376k heart.exnode 17-Mar-2014 47k

Download the entire example:

Name                                    Modified     Size

examples_a_testing_heart_fibres.tar.gz 09-Mar-2016 1.2M

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmgui-wxFailureSun Mar 6 00:05:56 20161
last breakThu Sep 11 00:02:00 20141
cmgui-wx-debugFailureSun Mar 6 00:05:57 20161
last breakThu Sep 11 00:02:00 20140
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:09:41 20161
last breakThu Sep 11 00:02:00 20141
cmgui-wx-debug-valgrindFailureSun Mar 6 00:39:50 201627
last breakTue Feb 24 00:10:00 201530
x86_64-linux
cmgui-wxFailureSun Mar 6 00:01:34 20160
last breakThu Sep 11 00:03:00 20140
cmgui-wx-debugFailureSun Mar 6 00:01:34 20160
last breakThu Sep 11 00:03:00 20140
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:01:35 20161
last breakThu Sep 11 00:03:00 20141
cmgui-wx-debug-valgrindFailureSun Mar 6 00:04:24 201622
last breakSun Mar 6 00:04:00 201622
cmgui-wx-gcc-cad-debug-valgrindSuccessThu Jan 7 00:05:25 201621

Testing status by file:


Html last generated: Wed Mar 9 16:02:44 2016

Input last modified: Wed Mar 9 15:49:35 2016


CMISS Help / Examples / a / testing / heart_fibres