Shows the use of multicomponent spectrums and data on a cube.
#Example_ak: Multi component data and spectrums # #---------- # # gfx read nodes example cube.exnode gfx read elements example cube.exelem # gfx cre win gfx modify g_element cube general element_discretization "8*8*8" #As well as displaying scalar fields spectrums can be used to display #multicomponent fields. A simple example of this is choosing #coordinates as the data field. gfx mod g_e cube surfaces data coordinates spectrum default #This displays a rainbow spectrum (the default) representing the x coordinate. #but by creating a multicomponent spectrum we can view all three #components at once. gfx cre spectrum rgb clear gfx modify spectrum rgb linear range 0 1 extend_above extend_below red colour_range 0 1 ambient diffuse component 1 gfx modify spectrum rgb linear range 0 1 extend_above extend_below green colour_range 0 1 ambient diffuse component 2 gfx modify spectrum rgb linear range 0 1 extend_above extend_below blue colour_range 0 1 ambient diffuse component 3 #The component numbers specify which of the data components that settings acts #upon. Each settings can only act on one component. If data is not defined #for a particular component then that settings is ignored. Conversely if no #settings in a spectrum uses a component in the data field then that #component has been ignored, by using the default spectrum on coordinates we #are ignoring the y and z coordinates which are components 2 and 3. # #Change the lines and surfaces to use our new multicomponent spectrum #and the coordinates as data. gfx mod g_e cube surfaces data coordinates spectrum rgb gfx mod g_e cube lines data coordinates spectrum rgb #Now you see a colour cube. #Where x=y=z=0 the cube is black. #Where x=1 and y=z=0 then you see red as it is applied to component 1. #Where x=y=z=1 the cube is white, full saturation of red, green and blue. # #With the spectrum editor you can convieniently examine the different #components making up your multicomponent spectrum. gfx edit spectrum rgb #By toggling the "visiblity" check boxes to the left of each settings #item and applying these changes you can quickly turn off and on #the individual components. # #This cube example also defined three scalar fields, potential, #conductivity and temperature. To view these with a multicomponent #spectrum they must be combined into a single field. gfx define field combine_pct composite potential conductivity temperature #Rescale the spectrum gfx mod spectrum rgb clear gfx modify spectrum rgb linear range 0 50 extend_above extend_below red colour_range 0 1 ambient diffuse component 1 gfx modify spectrum rgb linear range 0.12654 0.29643 extend_above extend_below green colour_range 0 1 ambient diffuse component 2 gfx modify spectrum rgb linear range 20.0 20.3 extend_above extend_below blue colour_range 0 1 ambient diffuse component 3 gfx edit spectrum rgb gfx mod g_e cube surfaces data combine_pct spectrum rgb gfx mod g_e cube lines data combine_pct spectrum rgb # #Have a look at Example aj which uses multicomponent spectrums to show #the texture coordinates defined over the surface of the heart. # gfx # #---------------- # #Displaying scalars: To show a scalar such as coordinates.x by choosing #the coordinate field as data and then using a spectrum that only #operates on the first component is wasteful of memory if that is all #you want to display because choosing the coordinate field as your data #means that all three components of the data field are stored at every #vertex. If you only wanted to show the x component it is better to #define a single component field containing that value only and use that #for your data. i.e. #gfx define field coordinates.x component coordinates.x #gfx mod g_e cube surfaces data coordinates.x spectrum default
Name Modified Size
example_ak.com 20-Apr-2012 3.7k COPYRIGHT 19-Apr-2012 504 cube.exelem 20-Apr-2012 5.8k cube.exnode 20-Apr-2012 861
Name Modified Size
examples_a_backup_ak.tar.gz 12-Aug-2014 127k
Status | Tested | Real time (s) | |
i686-linux | |||
cmgui-wx | Success | Sun Mar 6 00:10:03 2016 | 2 |
cmgui-wx-debug | Success | Sun Mar 6 00:14:20 2016 | 2 |
cmgui-wx-debug-memorycheck | Success | Sun Mar 6 00:10:04 2016 | 2 |
cmgui-wx-debug-valgrind | Failure | Sun Mar 6 00:46:23 2016 | 35 |
last break | Sun Mar 6 00:45:00 2016 | 35 | |
last success | Tue Feb 10 00:49:00 2015 | 33 | |
x86_64-linux | |||
cmgui-wx | Failure | Sun Mar 6 00:01:36 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:36 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-memorycheck | Failure | Sun Mar 6 00:01:36 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-valgrind | Failure | Sun Mar 6 00:03:04 2016 | 10 |
last break | Sun Mar 6 00:02:00 2016 | 10 | |
last success | Wed Jun 3 00:24:00 2015 | 27 | |
cmgui-wx-gcc-cad-debug-valgrind | Success | Thu Jan 7 00:02:14 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 | |||
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:52 2016
Input last modified: Fri Apr 20 15:56:16 2012