This example demonstrates displaying a simple mesh of simplex elements.
#Example_ab: Simplex element mesh # # Reads in a very simple 2-D simplex mesh, sets an appropriate view of it and # turns on node numbers. # #---------- # # Create some materials for use in this example. gfx create material blue ambient 0.2 0.2 1 diffuse 0.2 0.2 1 gfx create material orange ambient 0.9 0.2 0 diffuse 0.9 0.2 0 # # Open and set up 3D viewing window gfx create window 1 gfx modify window 1 view parallel interest_point -0.2 0.15 0 eye_point -0.2 0.1 4 up_vector 0 1 0 view_angle 35 near_clipping 0.1 far_clipping 10 # # Draw axes with an appropriate colour and size. gfx modify g_element "/" point as 1 glyph axes_xyz general size "0.5*0.5*0.5" select_on material blue selected_material default; # # Read in nodes and elements defining the mesh created in example 1371. The # element and node groups have also been called 'example_1371'. gfx read nodes example example_1371.exnode gfx read elements example example_1371.exelem # # Create initial view with node numbers. # First ensure tessellation is good enough to see colours later gfx define tessellation default minimum_divisions "8" refinement_factors "1"; gfx modify g_element example_1371 general clear; gfx modify g_element example_1371 lines coordinate coordinates material default; gfx modify g_element example_1371 node_points coordinate coordinates material orange label cmiss_number; # #---------- # # Now we use a spectrum to display the xi coordinates. # Firstly, define the fields so that they are available in the scene editor. gfx define field xi1 component xi.1 gfx define field xi2 component xi.2 # Now compute the "fictional" xi3 coordinate. # In simplex coordinates, there are actually three basis coordinates, but # only two of them are needed. The third can be derived. # In this case, xi3 = 1 - xi1 - xi2. # gfx define field xi3_intermediate_a add fields xi1 xi2 gfx define field one constant 1 gfx define field xi3 add fields one xi3_intermediate_a scale_factors 1 -1 # The surfaces can now be added using the scene editor. # That is how this was originally done. # The "command line" to do this was then obtained by "reverse engineering", # i.e. getting cmgui to spit out the line that represents the current state # of an object, like this: gfx list g_element # The surfaces line was then copied and pasted into this script. gfx modify g_element example_1371 surfaces coordinate coordinates select_on material default data xi1 spectrum default selected_material default_selected render_shaded; # It is educational to change the spectrum data to xi2 and xi3 # to get an intuitive feeling for how these coordinates work. # If you do this via the scene editor, you can select the # "Data" drop-down, and then use the keyboard cursor keys to # alternate amongst xi1, xi2 and xi3. # For example, you will notice that in this mesh, # the red part of each triangle rotates from vertex to vertex # in the same rotational direction in all elements. # # Finally, surfaces and lines co-exist better with perturbation on. gfx modify window 1 set perturb_lines
Name Modified Size
example_ab.com 17-Mar-2014 3.0k COPYRIGHT 17-Mar-2014 504 example_1371.exelem 17-Mar-2014 9.4k example_1371.exnode 17-Mar-2014 2.2k
Name Modified Size
examples_a_ab.tar.gz 09-Mar-2016 340k
Status | Tested | Real time (s) | |
i686-linux | |||
cmgui-wx | Failure | Sun Mar 6 00:10:43 2016 | 2 |
last break | Tue Feb 24 03:13:00 2015 | 2 | |
cmgui-wx-debug | Failure | Sun Mar 6 00:10:45 2016 | 3 |
last break | Tue Feb 24 03:11:00 2015 | 2 | |
cmgui-wx-debug-memorycheck | Failure | Sun Mar 6 00:12:53 2016 | 1 |
last break | Tue Feb 24 03:10:00 2015 | 2 | |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 00:55:15 2016 | 37 |
last break | Sun Mar 6 00:54:00 2016 | 37 | |
x86_64-linux | |||
cmgui-wx | Failure | Sun Mar 6 00:01:27 2016 | 0 |
last break | Sun Mar 6 00:01:00 2016 | 0 | |
cmgui-wx-debug | Failure | Sun Mar 6 00:01:27 2016 | 0 |
last break | Sun Mar 6 00:01:00 2016 | 0 | |
cmgui-wx-debug-memorycheck | Failure | Sun Mar 6 00:01:27 2016 | 0 |
last break | Sun Mar 6 00:01:00 2016 | 0 | |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 00:02:46 2016 | 9 |
last break | Sun Mar 6 00:02:00 2016 | 9 | |
cmgui-wx-gcc-cad-debug-valgrind | Success | Thu Jan 7 00:02:22 2016 | 7 |
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 | |||
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. | |
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: Wed Mar 9 16:01:16 2016
Input last modified: Wed Mar 9 15:49:42 2016