Example a_backup/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 "/" lines subgroup heart material default;
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
gfx modify g_element heart lines coordinate coordinates select_on material default selected_material default_selected;
# 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_graphic_name iso;
gfx define scene heart_iso filter iso_only;

gfx export vrml file heart_iso_lambda.wrl scene heart_iso;

Files used by this example are:

Name              Modified     Size

heart_fibres.com 20-Apr-2012 3.0k COPYRIGHT 19-Apr-2012 504 heart.exelem 20-Apr-2012 376k heart.exnode 20-Apr-2012 47k

Download the entire example:

Name                                           Modified     Size

examples_a_backup_testing_heart_fibres.tar.gz 12-Aug-2014 2.8M

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmgui-wxSuccessSun Mar 6 00:06:47 20161
cmgui-wx-debugSuccessSun Mar 6 00:06:47 20161
cmgui-wx-debug-memorycheckSuccessSun Mar 6 00:10:11 20161
cmgui-wx-debug-valgrindSuccessSun Mar 6 00:41:05 201626
x86_64-linux
cmgui-wxSuccessThu Jan 7 00:01:31 20161
cmgui-wx-debugSuccessThu Jan 7 00:01:31 20161
cmgui-wx-debug-memorycheckSuccessThu Jan 7 00:01:31 20161
cmgui-wx-debug-valgrindFailureSun Mar 6 00:04:46 201623
last breakSun Mar 6 00:04:00 201623
last successWed Jun 3 00:19:00 201522
cmgui-wx-gcc-cad-debug-valgrindSuccessThu Jan 7 00:05:41 201622

Testing status by file:


Html last generated: Sun Mar 6 05:51:01 2016

Input last modified: Fri Apr 20 16:01:45 2012


CMISS Help / Examples / a_backup / testing / heart_fibres