[Wien] Using OpenDx for Plotting Fermi Surface

Gavin Abo gsabo at crimson.ua.edu
Wed May 1 22:39:36 CEST 2013


You can try the attached files. fort2dx converts the 2D fermi surface 
fort files, like fort.11, to dx files.  The wien2dfsdx.net and 
wien2dfsdx.cfg  are the OpenDX files, which read and plot the data in 
the dx file. I have a manual that describes the files in a little more 
detail, but it's too big for the list.  If you want it, send a request 
to my email address.

On 4/25/2013 9:14 AM, Alex Animalu wrote:
> Dear All,
> Please, help guide me on how to use Opendx to plot Fermi surface in 
> Wien2k. I realized it is a powerful tool for this but have many 
> difficulties in using it. First, how do I convert the Wien2k Fermi 
> surface output to the form readable by Opendx?
>
> If anyone already have a script and is willing to share it with me, it 
> will be highly appreciated.
>
> Thank you very much in anticipation for your help.
>
> Alex.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20130501/21463b47/attachment.htm>
-------------- next part --------------
#!/usr/bin/perl
#
# Used to convert Wien2k fort.* files to Opendx *.dx files (multigrid data format)
#
# usage example: fort2dx fort.14
# fort.14 can be replace any other fort.* file such as fort.11, fort.12, ...
#
# output to stdout
#
# To redirect stdout to a file:
# fort2dx fort.14 > fermisurf.dx
#
# Requires fort.* files such as fort.14.
# fort.14 is created by the spagh2rho < case.spaghetti_ene (see Wien2k section on FSGEN)
#

#Opens and reads fort.* (fort.14)
open FILE1, $ARGV[0];
@line1 = split(' ',<FILE1>);
@linestofileend = <FILE1>;
close FILE1;

# nx, ny, and nz are the number of grid points in the x, y, and z directions

$nx = $line1[0];
$ny = $line1[1];
#$nz = 1.0; #For 3D

# xmin, ymin, and zmin are the coordinates of the grid lower corner
$xmin = 0.0;
$ymin = 0.0;
#$zmin = 0.0; #For 3D

# hx, hy, and hz are the grid spacings in the x, y, and z directions

$hx = $line1[2]/$ny; #Might to work for all cases and may have to be adjusted.
$hy = $line1[3]/$ny;
#$hz = 0.0; #For 3D

# n is the total  number of grid points
#$n = $nx*$ny*$nz; #For 3D
$n = $nx*$ny;

#Prints the *.dx file (fermisurf.dx)
print "# Created by fort2dx v1.0\n";
print "object 1 class array type double rank 0 items $n data follows\n";
print @linestofileend; # Prints the energy values E(x,y,z)
print "attribute \"dep\" string \"positions\"\n";
#print "object 2 class gridpositions counts $nx $ny $nz\n"; #For 3D
print "object 2 class gridpositions counts $nx $ny\n";
#print "origin $xmin $ymin $zmin\n"; #For 3D
print "origin $xmin $ymin\n";
#print "delta $hx 0.0 0.0\n"; #For 3D
#print "delta 0.0 $hy 0.0\n"; #For 3D
#print "delta 0.0 0.0 $hz\n"; #For 3D
print "delta $hx 0.0\n";
print "delta 0.0 $hy\n";
#print "object 3 class gridconnections counts $nx $ny $nz\n"; #For 3D
print "object 3 class gridconnections counts $nx $ny\n";
print "object \"regular positions regular connections\" class field\n";
print "component \"data\" value 1\n";
print "component \"positions\" value 2\n";
print "component \"connections\" value 3";
-------------- next part --------------
//
// time: Wed May  1 11:48:07 2013
//
// version: 3.2.0 (format), 4.4.4 (DX)
//
//
// panel[1]: position = (0.3250,0.3154), size = 0.3359x0.3086, startup = 1, devstyle = 1, screen = 0
// title: value = Image Control
//
// workspace: width = 500, height = 500
// layout: snap = 0, width = 50, height = 50, align = NN
//
// interactor FileSelector[1]: num_components = 1, value = "/home/gavin/wien2dfsdx/example/TiC/fermisurf.dx"
// instance: panel = 1, x = 22, y = 11, style = FileSelector, vertical = 1, size = 182x57
// label: value = *.dx file
//
// interactor ScalarList[1]: num_components = 1, value = { -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 }
// component[0]: minimum = -1e+06, maximum = 1e+06, global increment = 0.1, decimal = 5, global continuous = 0
// instance: panel = 1, x = 22, y = 87, style = List Editor, vertical = 1, size = 168x178
// label: value = Energy Levels List
// local continuous: value = 0, mode = global
// local increment[0]: value = 1, mode = global
//
// interactor Integer[1]: num_components = 1, value = 5 
// component[0]: minimum = -1e+06, maximum = 1e+06, global increment = 1, decimal = 0, global continuous = 0
// instance: panel = 1, x = 209, y = 91, style = Stepper, vertical = 1, size = 159x56
// label: value = Energy Label Density
// local continuous: value = 0, mode = global
// local increment[0]: value = 1, mode = global
//
// interactor Toggle[1]: num_components = 1, value = 1
// toggle : 1, set = 1, reset = 0
// instance: panel = 1, x = 217, y = 23, style = Toggle, vertical = 0, size = 140x36
// label: value = Box on/off
//
// node Image[1]:
// depth: value = 24
// input[1]: defaulting = 0, value = "Image_1"
// input[4]: defaulting = 0, value = 1
// input[5]: defaulting = 0, value = [0.720203 0.360102 0]
// input[6]: defaulting = 0, value = [0.720203 0.360102 4.12383]
// input[7]: defaulting = 1, value = 1.52709
// input[8]: defaulting = 0, value = 945
// input[9]: defaulting = 0, value = 0.736
// input[10]: defaulting = 0, value = [0 1 0]
// input[11]: defaulting = 0, value = 20.9795
// input[12]: defaulting = 0, value = 1
// input[14]: defaulting = 0, value = 1
// input[15]: defaulting = 1, value = "none"
// input[16]: defaulting = 1, value = "none"
// input[17]: defaulting = 1, value = 1
// input[18]: defaulting = 1, value = 1
// input[19]: defaulting = 0, value = 0
// input[22]: defaulting = 0, value = "black"
// input[29]: defaulting = 0, value = 0
// input[41]: defaulting = 0, value = "zoom"
// internal caching: 1
-------------- next part --------------
//
// time: Wed May  1 11:48:07 2013
//
// version: 3.2.0 (format), 4.4.4 (DX)
//
//
// MODULE main
// workspace: width = 388, height = 543
// layout: snap = 0, width = 50, height = 50, align = UL
//
macro main(
) -> (
) {
    // 
    // node FileSelector[1]: x = 190, y = 17, inputs = 0, label = FileSelector
    // output[1]: visible = 1, type = 32, value = "/home/gavin/wien2dfsdx/example/TiC/fermisurf.dx"
    // output[2]: visible = 1, type = 32, value = "fermisurf.dx"
    //
    // 
    // node Import[1]: x = 200, y = 98, inputs = 6, label = Import
    // input[1]: defaulting = 1, visible = 1, type = 32, value = "fermisurf.dx"
    // input[2]: defaulting = 1, visible = 1, type = 32, value = "temperature"
    // input[3]: defaulting = 1, visible = 1, type = 32, value = "general"
    //
main_Import_1_out_1 = 
    Import(
    main_FileSelector_1_out_1,
    main_Import_1_in_2,
    main_Import_1_in_3,
    main_Import_1_in_4,
    main_Import_1_in_5,
    main_Import_1_in_6
    ) [instance: 1, cache: 1];
    // 
    // node ScalarList[1]: x = 222, y = 176, inputs = 11, label = ScalarList
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "ScalarList_1"
    // input[3]: defaulting = 0, visible = 0, type = 16777221, value = { -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 }
    // input[5]: defaulting = 1, visible = 0, type = 5, value = -1000000.0
    // input[6]: defaulting = 1, visible = 0, type = 5, value = 1000000.0
    // input[7]: defaulting = 1, visible = 0, type = 5, value = 1.0
    // input[9]: defaulting = 1, visible = 0, type = 1, value = 5
    // output[1]: visible = 1, type = 16777221, value = { -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 }
    //
    // 
    // node Isosurface[1]: x = 195, y = 270, inputs = 6, label = Isosurface
    // input[2]: defaulting = 1, visible = 1, type = 16777221, value = { -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 }
    // input[3]: defaulting = 1, visible = 1, type = 1, value = 15
    //
main_Isosurface_1_out_1 = 
    Isosurface(
    main_Import_1_out_1,
    main_ScalarList_1_out_1,
    main_Isosurface_1_in_3,
    main_Isosurface_1_in_4,
    main_Isosurface_1_in_5,
    main_Isosurface_1_in_6
    ) [instance: 1, cache: 1];
    // 
    // node Integer[1]: x = 27, y = 105, inputs = 11, label = Integer
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "Integer_1"
    // input[3]: defaulting = 0, visible = 0, type = 1, value = 5 
    // input[5]: defaulting = 1, visible = 0, type = 1, value = -1000000
    // input[6]: defaulting = 1, visible = 0, type = 1, value = 1000000
    // input[7]: defaulting = 1, visible = 0, type = 5, value = 1.0
    // input[9]: defaulting = 1, visible = 0, type = 1, value = 0
    // output[1]: visible = 1, type = 1, value = 5 
    //
    // 
    // node Sample[1]: x = 12, y = 192, inputs = 2, label = Sample
    //
main_Sample_1_out_1 = 
    Sample(
    main_Isosurface_1_out_1,
    main_Integer_1_out_1
    ) [instance: 1, cache: 1];
    // 
    // node AutoGlyph[1]: x = 28, y = 267, inputs = 7, label = AutoGlyph
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "text"
    // input[4]: defaulting = 0, visible = 1, type = 5, value = 0.5
    //
main_AutoGlyph_1_out_1 = 
    AutoGlyph(
    main_Sample_1_out_1,
    main_AutoGlyph_1_in_2,
    main_AutoGlyph_1_in_3,
    main_AutoGlyph_1_in_4,
    main_AutoGlyph_1_in_5,
    main_AutoGlyph_1_in_6,
    main_AutoGlyph_1_in_7
    ) [instance: 1, cache: 1];
    // 
    // node Color[1]: x = 76, y = 337, inputs = 5, label = Color
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "white"
    //
main_Color_1_out_1 = 
    Color(
    main_AutoGlyph_1_out_1,
    main_Color_1_in_2,
    main_Color_1_in_3,
    main_Color_1_in_4,
    main_Color_1_in_5
    ) [instance: 1, cache: 1];
    // 
    // node Toggle[1]: x = 290, y = 263, inputs = 6, label = Toggle
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "Toggle_1"
    // input[2]: defaulting = 0, visible = 0, type = 29, value = 1
    // input[3]: defaulting = 0, visible = 0, type = 3, value = 1
    // input[4]: defaulting = 1, visible = 1, type = 29, value = 1
    // input[5]: defaulting = 1, visible = 1, type = 29, value = 0
    // output[1]: visible = 1, type = 29, value = 1
    // toggle : 1
    //
    // 
    // node ShowBox[1]: x = 310, y = 173, inputs = 1, label = ShowBox
    //
main_ShowBox_1_out_1,
main_ShowBox_1_out_2 = 
    ShowBox(
    main_Import_1_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Route[1]: x = 340, y = 338, inputs = 2, outputs = 2, label = Route
    //
main_Route_1_out_1,
main_Route_1_out_2 = 
    Route(
    main_Toggle_1_out_1,
    main_ShowBox_1_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Collect[1]: x = 198, y = 407, inputs = 3, label = Collect
    //
main_Collect_1_out_1 = 
    Collect(
    main_Color_1_out_1,
    main_Isosurface_1_out_1,
    main_Route_1_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Image[1]: x = 198, y = 481, inputs = 49, label = Image
    // input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_1"
    // input[4]: defaulting = 0, visible = 0, type = 1, value = 1
    // input[5]: defaulting = 0, visible = 0, type = 8, value = [0.720203 0.360102 0]
    // input[6]: defaulting = 0, visible = 0, type = 8, value = [0.720203 0.360102 4.12383]
    // input[7]: defaulting = 1, visible = 0, type = 5, value = 1.52709
    // input[8]: defaulting = 0, visible = 0, type = 1, value = 945
    // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.736
    // input[10]: defaulting = 0, visible = 0, type = 8, value = [0 1 0]
    // input[11]: defaulting = 0, visible = 0, type = 5, value = 20.9795
    // input[12]: defaulting = 0, visible = 0, type = 1, value = 1
    // input[14]: defaulting = 0, visible = 0, type = 1, value = 1
    // input[15]: defaulting = 1, visible = 0, type = 32, value = "none"
    // input[16]: defaulting = 1, visible = 0, type = 32, value = "none"
    // input[17]: defaulting = 1, visible = 0, type = 1, value = 1
    // input[18]: defaulting = 1, visible = 0, type = 1, value = 1
    // input[19]: defaulting = 0, visible = 0, type = 3, value = 0
    // input[22]: defaulting = 0, visible = 0, type = 32, value = "black"
    // input[29]: defaulting = 0, visible = 0, type = 3, value = 0
    // input[41]: defaulting = 0, visible = 0, type = 32, value = "zoom"
    // depth: value = 24
    // internal caching: 1
    //
main_Image_1_out_1,
main_Image_1_out_2,
main_Image_1_out_3 = 
    Image(
    main_Image_1_in_1,
    main_Collect_1_out_1,
    main_Image_1_in_3,
    main_Image_1_in_4,
    main_Image_1_in_5,
    main_Image_1_in_6,
    main_Image_1_in_7,
    main_Image_1_in_8,
    main_Image_1_in_9,
    main_Image_1_in_10,
    main_Image_1_in_11,
    main_Image_1_in_12,
    main_Image_1_in_13,
    main_Image_1_in_14,
    main_Image_1_in_15,
    main_Image_1_in_16,
    main_Image_1_in_17,
    main_Image_1_in_18,
    main_Image_1_in_19,
    main_Image_1_in_20,
    main_Image_1_in_21,
    main_Image_1_in_22,
    main_Image_1_in_23,
    main_Image_1_in_24,
    main_Image_1_in_25,
    main_Image_1_in_26,
    main_Image_1_in_27,
    main_Image_1_in_28,
    main_Image_1_in_29,
    main_Image_1_in_30,
    main_Image_1_in_31,
    main_Image_1_in_32,
    main_Image_1_in_33,
    main_Image_1_in_34,
    main_Image_1_in_35,
    main_Image_1_in_36,
    main_Image_1_in_37,
    main_Image_1_in_38,
    main_Image_1_in_39,
    main_Image_1_in_40,
    main_Image_1_in_41,
    main_Image_1_in_42,
    main_Image_1_in_43,
    main_Image_1_in_44,
    main_Image_1_in_45,
    main_Image_1_in_46,
    main_Image_1_in_47,
    main_Image_1_in_48,
    main_Image_1_in_49
    ) [instance: 1, cache: 1];
// network: end of macro body
CacheScene(main_Image_1_in_1, main_Image_1_out_1, main_Image_1_out_2);
}
main_FileSelector_1_out_1 = "/home/gavin/wien2dfsdx/example/TiC/fermisurf.dx";
main_Import_1_in_2 = NULL;
main_Import_1_in_3 = NULL;
main_Import_1_in_4 = NULL;
main_Import_1_in_5 = NULL;
main_Import_1_in_6 = NULL;
main_Import_1_out_1 = NULL;
main_ScalarList_1_in_1 = "ScalarList_1";
main_ScalarList_1_in_2 = NULL;
main_ScalarList_1_in_3 = { -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 };
main_ScalarList_1_in_4 = NULL;
main_ScalarList_1_in_5 = NULL;
main_ScalarList_1_in_6 = NULL;
main_ScalarList_1_in_7 = NULL;
main_ScalarList_1_in_8 = NULL;
main_ScalarList_1_in_9 = NULL;
main_ScalarList_1_in_10 = NULL;
main_ScalarList_1_in_11 = NULL;
main_ScalarList_1_out_1 = { -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 };
main_Isosurface_1_in_3 = NULL;
main_Isosurface_1_in_4 = NULL;
main_Isosurface_1_in_5 = NULL;
main_Isosurface_1_in_6 = NULL;
main_Isosurface_1_out_1 = NULL;
main_Integer_1_in_1 = "Integer_1";
main_Integer_1_in_2 = NULL;
main_Integer_1_in_3 = 5 ;
main_Integer_1_in_4 = NULL;
main_Integer_1_in_5 = NULL;
main_Integer_1_in_6 = NULL;
main_Integer_1_in_7 = NULL;
main_Integer_1_in_8 = NULL;
main_Integer_1_in_9 = NULL;
main_Integer_1_in_10 = NULL;
main_Integer_1_in_11 = NULL;
main_Integer_1_out_1 = 5 ;
main_Sample_1_out_1 = NULL;
main_AutoGlyph_1_in_2 = "text";
main_AutoGlyph_1_in_3 = NULL;
main_AutoGlyph_1_in_4 = 0.5;
main_AutoGlyph_1_in_5 = NULL;
main_AutoGlyph_1_in_6 = NULL;
main_AutoGlyph_1_in_7 = NULL;
main_AutoGlyph_1_out_1 = NULL;
main_Color_1_in_2 = "white";
main_Color_1_in_3 = NULL;
main_Color_1_in_4 = NULL;
main_Color_1_in_5 = NULL;
main_Color_1_out_1 = NULL;
main_Toggle_1_in_1 = "Toggle_1";
main_Toggle_1_in_2 = 1;
main_Toggle_1_in_3 = 1;
main_Toggle_1_in_4 = NULL;
main_Toggle_1_in_5 = NULL;
main_Toggle_1_in_6 = NULL;
main_Toggle_1_out_1 = 1;
main_ShowBox_1_out_1 = NULL;
main_Route_1_out_1 = NULL;
main_Collect_1_out_1 = NULL;
macro Image(
        id,
        object,
        where,
        useVector,
        to,
        from,
        width,
        resolution,
        aspect,
        up,
        viewAngle,
        perspective,
        options,
        buttonState = 1,
        buttonUpApprox = "none",
        buttonDownApprox = "none",
        buttonUpDensity = 1,
        buttonDownDensity = 1,
        renderMode = 0,
        defaultCamera,
        reset,
        backgroundColor,
        throttle,
        RECenable = 0,
        RECfile,
        RECformat,
        RECresolution,
        RECaspect,
        AAenable = 0,
        AAlabels,
        AAticks,
        AAcorners,
        AAframe,
        AAadjust,
        AAcursor,
        AAgrid,
        AAcolors,
        AAannotation,
        AAlabelscale,
        AAfont,
        interactionMode,
        title,
        AAxTickLocs,
        AAyTickLocs,
        AAzTickLocs,
        AAxTickLabels,
        AAyTickLabels,
        AAzTickLabels,
        webOptions) -> (
        object,
        camera,
        where)
{
    ImageMessage(
        id,
        backgroundColor,
        throttle,
        RECenable,
        RECfile,
        RECformat,
        RECresolution,
        RECaspect,
        AAenable,
        AAlabels,
        AAticks,
        AAcorners,
        AAframe,
        AAadjust,
        AAcursor,
        AAgrid,
        AAcolors,
        AAannotation,
        AAlabelscale,
        AAfont,
        AAxTickLocs,
        AAyTickLocs,
        AAzTickLocs,
        AAxTickLabels,
        AAyTickLabels,
        AAzTickLabels,
        interactionMode,
        title,
        renderMode,
        buttonUpApprox,
        buttonDownApprox,
        buttonUpDensity,
        buttonDownDensity) [instance: 1, cache: 1];
    autoCamera =
        AutoCamera(
            object,
            "front",
            object,
            resolution,
            aspect,
            [0,1,0],
            perspective,
            viewAngle,
            backgroundColor) [instance: 1, cache: 1];
    realCamera =
        Camera(
            to,
            from,
            width,
            resolution,
            aspect,
            up,
            perspective,
            viewAngle,
            backgroundColor) [instance: 1, cache: 1];
    coloredDefaultCamera = 
	 UpdateCamera(defaultCamera,
            background=backgroundColor) [instance: 1, cache: 1];
    nullDefaultCamera =
        Inquire(defaultCamera,
            "is null + 1") [instance: 1, cache: 1];
    resetCamera =
        Switch(
            nullDefaultCamera,
            coloredDefaultCamera,
            autoCamera) [instance: 1, cache: 1];
    resetNull = 
        Inquire(
            reset,
            "is null + 1") [instance: 2, cache: 1];
    reset =
        Switch(
            resetNull,
            reset,
            0) [instance: 2, cache: 1];
    whichCamera =
        Compute(
            "($0 != 0 || $1 == 0) ? 1 : 2",
            reset,
            useVector) [instance: 1, cache: 1];
    camera = Switch(
            whichCamera,
            resetCamera,
            realCamera) [instance: 3, cache: 1];
    AAobject =
        AutoAxes(
            object,
            camera,
            AAlabels,
            AAticks,
            AAcorners,
            AAframe,
            AAadjust,
            AAcursor,
            AAgrid,
            AAcolors,
            AAannotation,
            AAlabelscale,
            AAfont,
            AAxTickLocs,
            AAyTickLocs,
            AAzTickLocs,
            AAxTickLabels,
            AAyTickLabels,
            AAzTickLabels) [instance: 1, cache: 1];
    switchAAenable = Compute("$0+1",
	     AAenable) [instance: 2, cache: 1];
    object = Switch(
	     switchAAenable,
	     object,
	     AAobject) [instance:4, cache: 1];
    SWapproximation_options =
        Switch(
            buttonState,
            buttonUpApprox,
            buttonDownApprox) [instance: 5, cache: 1];
    SWdensity_options =
        Switch(
            buttonState,
            buttonUpDensity,
            buttonDownDensity) [instance: 6, cache: 1];
    HWapproximation_options =
        Format(
            "%s,%s",
            buttonDownApprox,
            buttonUpApprox) [instance: 1, cache: 1];
    HWdensity_options =
        Format(
            "%d,%d",
            buttonDownDensity,
            buttonUpDensity) [instance: 2, cache: 1];
    switchRenderMode = Compute(
	     "$0+1",
	     renderMode) [instance: 3, cache: 1];
    approximation_options = Switch(
	     switchRenderMode,
            SWapproximation_options,
	     HWapproximation_options) [instance: 7, cache: 1];
    density_options = Switch(
	     switchRenderMode,
            SWdensity_options,
            HWdensity_options) [instance: 8, cache: 1];
    renderModeString = Switch(
            switchRenderMode,
            "software",
            "hardware")[instance: 9, cache: 1];
    object_tag = Inquire(
            object,
            "object tag")[instance: 3, cache: 1];
    annoted_object =
        Options(
            object,
            "send boxes",
            0,
            "cache",
            1,
            "object tag",
            object_tag,
            "ddcamera",
            whichCamera,
            "rendering approximation",
            approximation_options,
            "render every",
            density_options,
            "button state",
            buttonState,
            "rendering mode",
            renderModeString) [instance: 1, cache: 1];
    RECresNull =
        Inquire(
            RECresolution,
            "is null + 1") [instance: 4, cache: 1];
    ImageResolution =
        Inquire(
            camera,
            "camera resolution") [instance: 5, cache: 1];
    RECresolution =
        Switch(
            RECresNull,
            RECresolution,
            ImageResolution) [instance: 10, cache: 1];
    RECaspectNull =
        Inquire(
            RECaspect,
            "is null + 1") [instance: 6, cache: 1];
    ImageAspect =
        Inquire(
            camera,
            "camera aspect") [instance: 7, cache: 1];
    RECaspect =
        Switch(
            RECaspectNull,
            RECaspect,
            ImageAspect) [instance: 11, cache: 1];
    switchRECenable = Compute(
          "$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4",
            RECenable,
            switchRenderMode,
            RECresolution,
            ImageResolution,
            RECaspect,
	     ImageAspect) [instance: 4, cache: 1];
    NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object);
    Display(
        NoRECobject,
        camera,
        where,
        throttle) [instance: 1, cache: 1];
    image =
        Render(
            RECNoRerenderObject,
            camera) [instance: 1, cache: 1];
    Display(
        image,
        NULL,
        where,
        throttle) [instance: 2, cache: 1];
    WriteImage(
        image,
        RECfile,
        RECformat) [instance: 1, cache: 1];
    rec_where = Display(
        RECNoRerHW,
        camera,
        where,
        throttle) [instance: 1, cache: 0];
    rec_image = ReadImageWindow(
        rec_where) [instance: 1, cache: 1];
    WriteImage(
        rec_image,
        RECfile,
        RECformat) [instance: 1, cache: 1];
    RECupdateCamera =
	UpdateCamera(
	    camera,
	    resolution=RECresolution,
	    aspect=RECaspect) [instance: 2, cache: 1];
    Display(
        RECRerenderObject,
        camera,
        where,
        throttle) [instance: 1, cache: 1];
    RECRerenderObject =
	ScaleScreen(
	    RECRerenderObject,
	    NULL,
	    RECresolution,
	    camera) [instance: 1, cache: 1];
    image =
        Render(
            RECRerenderObject,
            RECupdateCamera) [instance: 2, cache: 1];
    WriteImage(
        image,
        RECfile,
        RECformat) [instance: 2, cache: 1];
}
main_Image_1_in_1 = "Image_1";
main_Image_1_in_3 = "X24,,";
main_Image_1_in_4 = 1;
main_Image_1_in_5 = [0.720203 0.360102 0];
main_Image_1_in_6 = [0.720203 0.360102 4.12383];
main_Image_1_in_7 = NULL;
main_Image_1_in_8 = 945;
main_Image_1_in_9 = 0.736;
main_Image_1_in_10 = [0 1 0];
main_Image_1_in_11 = 20.9795;
main_Image_1_in_12 = 1;
main_Image_1_in_13 = NULL;
main_Image_1_in_14 = 1;
main_Image_1_in_15 = NULL;
main_Image_1_in_16 = NULL;
main_Image_1_in_17 = NULL;
main_Image_1_in_18 = NULL;
main_Image_1_in_19 = 0;
main_Image_1_in_20 = NULL;
main_Image_1_in_21 = NULL;
main_Image_1_in_22 = "black";
main_Image_1_in_23 = NULL;
main_Image_1_in_25 = NULL;
main_Image_1_in_26 = NULL;
main_Image_1_in_27 = NULL;
main_Image_1_in_28 = NULL;
main_Image_1_in_29 = 0;
main_Image_1_in_30 = NULL;
main_Image_1_in_31 = NULL;
main_Image_1_in_32 = NULL;
main_Image_1_in_33 = NULL;
main_Image_1_in_34 = NULL;
main_Image_1_in_35 = NULL;
main_Image_1_in_36 = NULL;
main_Image_1_in_37 = NULL;
main_Image_1_in_38 = NULL;
main_Image_1_in_39 = NULL;
main_Image_1_in_40 = NULL;
main_Image_1_in_41 = "zoom";
main_Image_1_in_42 = NULL;
main_Image_1_in_43 = NULL;
main_Image_1_in_44 = NULL;
main_Image_1_in_45 = NULL;
main_Image_1_in_46 = NULL;
main_Image_1_in_47 = NULL;
main_Image_1_in_48 = NULL;
main_Image_1_in_49 = NULL;
Executive("product version 4 4 4");
$sync
main();


More information about the Wien mailing list