P.S. We need to use hardware rendering because the macro we are using to do stereo images stops working when changed from hardware to software rendering mode.
Thanks for taking a look, Abbye McEwen Department of Molecular and Cellular Biology The University of Texas at Dallas
//
// time: Thu Oct 21 16:43:23 2004
//
// version: 3.2.0 (format), 4.3.2 (DX)
//
//
// MODULE main
// CATEGORY Macros
//
// comment: This program shows how you can use Compute to make a parametric
surface from the 2D positions of a field. The Mark module is used to mark the
"positions" component as "data" so that Compute can operate on the positions.
The Compute module produces a 3-vector of positions. After the 2D positions are
mapped to 3D, the positions are returned to the "positions" component using
the Unmark module. Normals are added for shading, and the result is displayed.
// workspace: width = 943, height = 730
// layout: snap = 0, width = 50, height = 50, align = CC
//
macro main(
) -> (
) {
//
// node Construct[1]: x = 23, y = 33, inputs = 4, label = Make a 21x21 grid
centered at (0,0) and spanning (-1,-1) to (1,1)
// input[1]: defaulting = 0, visible = 1, type = 16777224, value = {[0 0]}
// input[2]: defaulting = 0, visible = 1, type = 16777224, value = {[.05
.05]}
// input[3]: defaulting = 0, visible = 1, type = 8, value = [100 100]
//
main_Construct_1_out_1 =
Construct(
main_Construct_1_in_1,
main_Construct_1_in_2,
main_Construct_1_in_3,
main_Construct_1_in_4
) [instance: 1, cache: 1];
//
// node Color[1]: x = 31, y = 100, inputs = 5, label = Color given as a
R,G,B vector
// input[2]: defaulting = 0, visible = 1, type = 8, value = [.8 .7 .2]
//
main_Color_1_out_1 =
Color(
main_Construct_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 Mark[1]: x = 44, y = 188, inputs = 2, label = Indicate to the
"Compute" module that you want to manipulate positions
// input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
//
main_Mark_1_out_1 =
Mark(
main_Color_1_out_1,
main_Mark_1_in_2
) [instance: 1, cache: 1];
//
// node Compute[4]: x = 8, y = 283, inputs = 2, label = extract x component
of position
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0.x"
// expression: value = a.x
// name[2]: value = a
//
main_Compute_4_out_1 =
Compute(
main_Compute_4_in_1,
main_Mark_1_out_1
) [instance: 4, cache: 1];
//
// node Transmitter[19]: x = 31, y = 346, inputs = 1, label = v
//
v = main_Compute_4_out_1;
//
// node Receiver[44]: x = 136, y = 82, inputs = 1, label = v
//
main_Receiver_44_out_1[cache: 0] = v;
//
// node Compute[5]: x = 86, y = 282, inputs = 2, label = extract y
component of position
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0.y"
// expression: value = a.y
// name[2]: value = a
//
main_Compute_5_out_1 =
Compute(
main_Compute_5_in_1,
main_Mark_1_out_1
) [instance: 5, cache: 1];
//
// node Transmitter[20]: x = 102, y = 352, inputs = 1, label = w
//
w = main_Compute_5_out_1;
//
// node Receiver[45]: x = 168, y = 77, inputs = 1, label = w
//
main_Receiver_45_out_1[cache: 0] = w;
//
// node Compute[3]: x = 40, y = 454, inputs = 1, label = Compute--pi
// input[1]: defaulting = 0, visible = 0, type = 32, value = "3.14159"
// expression: value = 3.14159
//
main_Compute_3_out_1 =
Compute(
main_Compute_3_in_1
) [instance: 3, cache: 1];
//
// node Transmitter[18]: x = 67, y = 537, inputs = 1, label = pi
//
pi = main_Compute_3_out_1;
//
// node Receiver[43]: x = 203, y = 77, inputs = 1, label = pi
//
main_Receiver_43_out_1[cache: 0] = pi;
//
// node Compute[17]: x = 874, y = 326, inputs = 1, label = Compute--theta1
(in radians)
// input[1]: defaulting = 0, visible = 0, type = 32, value = "0"
// expression: value = 0
//
main_Compute_17_out_1 =
Compute(
main_Compute_17_in_1
) [instance: 17, cache: 1];
//
// node Transmitter[23]: x = 883, y = 397, inputs = 1, label = theta1
//
theta1 = main_Compute_17_out_1;
//
// node Receiver[54]: x = 211, y = 13, inputs = 1, label = theta1
//
main_Receiver_54_out_1[cache: 0] = theta1;
//
// node Compute[15]: x = 666, y = 321, inputs = 1, label = Compute--phi1
(in radians)
// input[1]: defaulting = 0, visible = 0, type = 32, value = "-.91629763"
// expression: value = -.91629763
//
main_Compute_15_out_1 =
Compute(
main_Compute_15_in_1
) [instance: 15, cache: 1];
//
// node Transmitter[21]: x = 691, y = 399, inputs = 1, label = phi1
//
phi1 = main_Compute_15_out_1;
//
// node Receiver[55]: x = 265, y = 8, inputs = 1, label = phi1
//
main_Receiver_55_out_1[cache: 0] = phi1;
//
// node Compute[16]: x = 760, y = 326, inputs = 1, label = Compute--tau1(in
radians)
// input[1]: defaulting = 0, visible = 0, type = 32, value = "0"
// expression: value = 0
//
main_Compute_16_out_1 =
Compute(
main_Compute_16_in_1
) [instance: 16, cache: 1];
//
// node Transmitter[22]: x = 785, y = 398, inputs = 1, label = tau1
//
tau1 = main_Compute_16_out_1;
//
// node Receiver[56]: x = 313, y = 11, inputs = 1, label = tau1
//
main_Receiver_56_out_1[cache: 0] = tau1;
//
// node Compute[18]: x = 666, y = 10, inputs = 1, label = Compute--rx1
// input[1]: defaulting = 0, visible = 0, type = 32, value = "2"
// expression: value = 2
//
main_Compute_18_out_1 =
Compute(
main_Compute_18_in_1
) [instance: 18, cache: 1];
//
// node Transmitter[24]: x = 690, y = 85, inputs = 1, label = rx1
//
rx1 = main_Compute_18_out_1;
//
// node Receiver[53]: x = 374, y = 76, inputs = 1, label = rx1
//
main_Receiver_53_out_1[cache: 0] = rx1;
//
// node Compute[19]: x = 764, y = 8, inputs = 1, label = Compute--ry1
// input[1]: defaulting = 0, visible = 0, type = 32, value = "3"
// expression: value = 3
//
main_Compute_19_out_1 =
Compute(
main_Compute_19_in_1
) [instance: 19, cache: 1];
//
// node Transmitter[25]: x = 795, y = 85, inputs = 1, label = ry1
//
ry1 = main_Compute_19_out_1;
//
// node Receiver[52]: x = 405, y = 70, inputs = 1, label = ry1
//
main_Receiver_52_out_1[cache: 0] = ry1;
//
// node Compute[20]: x = 848, y = 12, inputs = 1, label = Compute--rz1
// input[1]: defaulting = 0, visible = 0, type = 32, value = "6"
// expression: value = 6
//
main_Compute_20_out_1 =
Compute(
main_Compute_20_in_1
) [instance: 20, cache: 1];
//
// node Transmitter[26]: x = 874, y = 85, inputs = 1, label = rz1
//
rz1 = main_Compute_20_out_1;
//
// node Receiver[51]: x = 438, y = 70, inputs = 1, label = rz1
//
main_Receiver_51_out_1[cache: 0] = rz1;
//
// node Compute[21]: x = 675, y = 168, inputs = 1, label = Compute--sx1
// input[1]: defaulting = 0, visible = 0, type = 32, value = "10.544059"
// expression: value = 10.544059
//
main_Compute_21_out_1 =
Compute(
main_Compute_21_in_1
) [instance: 21, cache: 1];
//
// node Transmitter[27]: x = 702, y = 255, inputs = 1, label = sx1
//
sx1 = main_Compute_21_out_1;
//
// node Receiver[50]: x = 481, y = 64, inputs = 1, label = sx1
//
main_Receiver_50_out_1[cache: 0] = sx1;
//
// node Compute[22]: x = 770, y = 164, inputs = 1, label = Compute--sy1
// input[1]: defaulting = 0, visible = 0, type = 32, value = "0"
// expression: value = 0
//
main_Compute_22_out_1 =
Compute(
main_Compute_22_in_1
) [instance: 22, cache: 1];
//
// node Transmitter[28]: x = 801, y = 248, inputs = 1, label = sy1
//
sy1 = main_Compute_22_out_1;
//
// node Receiver[49]: x = 520, y = 63, inputs = 1, label = sy1
//
main_Receiver_49_out_1[cache: 0] = sy1;
//
// node Compute[23]: x = 863, y = 161, inputs = 1, label = Compute--sz1
// input[1]: defaulting = 0, visible = 0, type = 32, value = "-13.741287"
// expression: value = -13.741287
//
main_Compute_23_out_1 =
Compute(
main_Compute_23_in_1
) [instance: 23, cache: 1];
//
// node Transmitter[29]: x = 895, y = 257, inputs = 1, label = sz1
//
sz1 = main_Compute_23_out_1;
//
// node Receiver[47]: x = 560, y = 64, inputs = 1, label = sz1
//
main_Receiver_47_out_1[cache: 0] = sz1;
//
// node Compute[1]: x = 224, y = 172, inputs = 13, label = makes a sphere
with radii rx,ry,rz rotated by theta, phi, and tau, displaced by sx,sy,sz
// input[1]: defaulting = 0, visible = 0, type = 32, value =
"[-(cos($3)*cos($1*$2)*$8*sin($4))+cos($0*2*$2)*$6*(cos($4)*cos($5)+sin($4)*sin($5)*sin($3))*sin($1*$2)+$7*(cos($4)*sin($5)-cos($5)*sin($4)*sin($3))*sin($0*2*$2)*sin($1*$2)+$9,
-(cos($1*$2)*$8*sin($3))-cos($3)*cos($0*2*$2)*$6*sin($5)*sin($1*$2)+cos($5)*cos($3)*$7*sin($0*2*$2)*sin($1*$2)+$10,cos($4)*cos($3)*cos($1*$2)*$8+cos($0*2*$2)*$6*(cos($5)*sin($4)-cos($4)*sin($5)*sin($3))*sin($1*$2)+$7*(sin($4)*sin($5)+cos($4)*cos($5)*sin($3))*sin($0*2*$2)*sin($1*$2)+$11]"
// expression: value =
[-(cos(theta)*cos(w*pi)*rz*sin(phi))+cos(v*2*pi)*rx*(cos(phi)*cos(tau)+sin(phi)*sin(tau)*sin(theta))*sin(w*pi)+ry*(cos(phi)*sin(tau)-cos(tau)*sin(phi)*sin(theta))*sin(v*2*pi)*sin(w*pi)+sx,
-(cos(w*pi)*rz*sin(theta))-cos(theta)*cos(v*2*pi)*rx*sin(tau)*sin(w*pi)+cos(tau)*cos(theta)*ry*sin(v*2*pi)*sin(w*pi)+sy,cos(phi)*cos(theta)*cos(w*pi)*rz+cos(v*2*pi)*rx*(cos(tau)*sin(phi)-cos(phi)*sin(tau)*sin(theta))*sin(w*pi)+ry*(sin(phi)*sin(tau)+cos(phi)*cos(tau)*sin(theta))*sin(v*2*pi)*sin(w*pi)+sz]
// name[2]: value = v
// name[3]: value = w
// name[4]: value = pi
// name[5]: value = theta
// name[6]: value = phi
// name[7]: value = tau
// name[8]: value = rx
// name[9]: value = ry
// name[10]: value = rz
// name[11]: value = sx
// name[12]: value = sy
// name[13]: value = sz
//
main_Compute_1_out_1 =
Compute(
main_Compute_1_in_1,
main_Receiver_44_out_1,
main_Receiver_45_out_1,
main_Receiver_43_out_1,
main_Receiver_54_out_1,
main_Receiver_55_out_1,
main_Receiver_56_out_1,
main_Receiver_53_out_1,
main_Receiver_52_out_1,
main_Receiver_51_out_1,
main_Receiver_50_out_1,
main_Receiver_49_out_1,
main_Receiver_47_out_1
) [instance: 1, cache: 1];
//
// node Unmark[1]: x = 412, y = 255, inputs = 2, label = Substitute new
positions for old
// input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
//
main_Unmark_1_out_1 =
Unmark(
main_Compute_1_out_1,
main_Unmark_1_in_2
) [instance: 1, cache: 1];
//
// node Normals[3]: x = 339, y = 433, inputs = 2, label = calculate surface
normals for lighting
//
main_Normals_3_out_1 =
Normals(
main_Unmark_1_out_1,
main_Normals_3_in_2
) [instance: 3, cache: 1];
//
// node Image[2]: x = 307, y = 668, inputs = 49, label = Image
// input[1]: defaulting = 0, visible = 0, type = 32, value = "Image_2"
// input[4]: defaulting = 0, visible = 0, type = 1, value = 1
// input[5]: defaulting = 0, visible = 0, type = 8, value = [10.5441 0
-13.7413]
// input[6]: defaulting = 0, visible = 0, type = 8, value = [10.5441 0
21.3827]
// input[7]: defaulting = 0, visible = 0, type = 5, value = 18.823
// input[8]: defaulting = 0, visible = 0, type = 1, value = 640
// input[9]: defaulting = 0, visible = 0, type = 5, value = 0.75
// input[10]: defaulting = 0, visible = 0, type = 8, value = [0 1 0]
// input[11]: defaulting = 1, visible = 0, type = 5, value = 30.0002
// input[12]: defaulting = 0, visible = 0, type = 1, value = 0
// 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 = 0, visible = 0, type = 1, value = 1
// input[18]: defaulting = 0, visible = 0, type = 1, value = 1
// input[19]: defaulting = 0, visible = 0, type = 1, value = 1
// input[25]: defaulting = 0, visible = 0, type = 32, value = "hardware"
// input[26]: defaulting = 0, visible = 0, type = 32, value = "tiff"
// input[29]: defaulting = 1, visible = 0, type = 3, value = 0
// depth: value = 24
// window: position = (0.2013,0.3483), size = 0.4088x0.4350
// internal caching: 1
// interaction mode = NONE
//
main_Image_2_out_1,
main_Image_2_out_2,
main_Image_2_out_3 =
Image(
main_Image_2_in_1,
main_Normals_3_out_1,
main_Image_2_in_3,
main_Image_2_in_4,
main_Image_2_in_5,
main_Image_2_in_6,
main_Image_2_in_7,
main_Image_2_in_8,
main_Image_2_in_9,
main_Image_2_in_10,
main_Image_2_in_11,
main_Image_2_in_12,
main_Image_2_in_13,
main_Image_2_in_14,
main_Image_2_in_15,
main_Image_2_in_16,
main_Image_2_in_17,
main_Image_2_in_18,
main_Image_2_in_19,
main_Image_2_in_20,
main_Image_2_in_21,
main_Image_2_in_22,
main_Image_2_in_23,
main_Image_2_in_24,
main_Image_2_in_25,
main_Image_2_in_26,
main_Image_2_in_27,
main_Image_2_in_28,
main_Image_2_in_29,
main_Image_2_in_30,
main_Image_2_in_31,
main_Image_2_in_32,
main_Image_2_in_33,
main_Image_2_in_34,
main_Image_2_in_35,
main_Image_2_in_36,
main_Image_2_in_37,
main_Image_2_in_38,
main_Image_2_in_39,
main_Image_2_in_40,
main_Image_2_in_41,
main_Image_2_in_42,
main_Image_2_in_43,
main_Image_2_in_44,
main_Image_2_in_45,
main_Image_2_in_46,
main_Image_2_in_47,
main_Image_2_in_48,
main_Image_2_in_49
) [instance: 2, cache: 1];
// network: end of macro body
CacheScene(main_Image_2_in_1, main_Image_2_out_1, main_Image_2_out_2);
}
main_Construct_1_in_1 = {[0 0]};
main_Construct_1_in_2 = {[.05 .05]};
main_Construct_1_in_3 = [100 100];
main_Construct_1_in_4 = NULL;
main_Construct_1_out_1 = NULL;
main_Color_1_in_2 = [.8 .7 .2];
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_Mark_1_in_2 = "positions";
main_Mark_1_out_1 = NULL;
main_Compute_4_in_1 = "$0.x";
main_Compute_4_out_1 = NULL;
main_Transmitter_19_out_1 = NULL;
main_Receiver_44_out_1 = NULL;
main_Compute_5_in_1 = "$0.y";
main_Compute_5_out_1 = NULL;
main_Transmitter_20_out_1 = NULL;
main_Receiver_45_out_1 = NULL;
main_Compute_3_in_1 = "3.14159";
main_Compute_3_out_1 = NULL;
main_Transmitter_18_out_1 = NULL;
main_Receiver_43_out_1 = NULL;
main_Compute_17_in_1 = "0";
main_Compute_17_out_1 = NULL;
main_Transmitter_23_out_1 = NULL;
main_Receiver_54_out_1 = NULL;
main_Compute_15_in_1 = "-.91629763";
main_Compute_15_out_1 = NULL;
main_Transmitter_21_out_1 = NULL;
main_Receiver_55_out_1 = NULL;
main_Compute_16_in_1 = "0";
main_Compute_16_out_1 = NULL;
main_Transmitter_22_out_1 = NULL;
main_Receiver_56_out_1 = NULL;
main_Compute_18_in_1 = "2";
main_Compute_18_out_1 = NULL;
main_Transmitter_24_out_1 = NULL;
main_Receiver_53_out_1 = NULL;
main_Compute_19_in_1 = "3";
main_Compute_19_out_1 = NULL;
main_Transmitter_25_out_1 = NULL;
main_Receiver_52_out_1 = NULL;
main_Compute_20_in_1 = "6";
main_Compute_20_out_1 = NULL;
main_Transmitter_26_out_1 = NULL;
main_Receiver_51_out_1 = NULL;
main_Compute_21_in_1 = "10.544059";
main_Compute_21_out_1 = NULL;
main_Transmitter_27_out_1 = NULL;
main_Receiver_50_out_1 = NULL;
main_Compute_22_in_1 = "0";
main_Compute_22_out_1 = NULL;
main_Transmitter_28_out_1 = NULL;
main_Receiver_49_out_1 = NULL;
main_Compute_23_in_1 = "-13.741287";
main_Compute_23_out_1 = NULL;
main_Transmitter_29_out_1 = NULL;
main_Receiver_47_out_1 = NULL;
main_Compute_1_in_1 =
"[-(cos($3)*cos($1*$2)*$8*sin($4))+cos($0*2*$2)*$6*(cos($4)*cos($5)+sin($4)*sin($5)*sin($3))*sin($1*$2)+$7*(cos($4)*sin($5)-cos($5)*sin($4)*sin($3))*sin($0*2*$2)*sin($1*$2)+$9,
-(cos($1*$2)*$8*sin($3))-cos($3)*cos($0*2*$2)*$6*sin($5)*sin($1*$2)+cos($5)*cos($3)*$7*sin($0*2*$2)*sin($1*$2)+$10,cos($4)*cos($3)*cos($1*$2)*$8+cos($0*2*$2)*$6*(cos($5)*sin($4)-cos($4)*sin($5)*sin($3))*sin($1*$2)+$7*(sin($4)*sin($5)+cos($4)*cos($5)*sin($3))*sin($0*2*$2)*sin($1*$2)+$11]";
main_Compute_1_out_1 = NULL;
main_Unmark_1_in_2 = "positions";
main_Unmark_1_out_1 = NULL;
main_Normals_3_in_2 = NULL;
main_Normals_3_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_2_in_1 = "Image_2";
main_Image_2_in_3 = "X24,,";
main_Image_2_in_4 = 1;
main_Image_2_in_5 = [10.5441 0 -13.7413];
main_Image_2_in_6 = [10.5441 0 21.3827];
main_Image_2_in_7 = 18.823;
main_Image_2_in_8 = 640;
main_Image_2_in_9 = 0.75;
main_Image_2_in_10 = [0 1 0];
main_Image_2_in_11 = NULL;
main_Image_2_in_12 = 0;
main_Image_2_in_13 = NULL;
main_Image_2_in_14 = 1;
main_Image_2_in_15 = NULL;
main_Image_2_in_16 = NULL;
main_Image_2_in_17 = 1;
main_Image_2_in_18 = 1;
main_Image_2_in_19 = 1;
main_Image_2_in_20 = NULL;
main_Image_2_in_21 = NULL;
main_Image_2_in_22 = NULL;
main_Image_2_in_23 = NULL;
main_Image_2_in_25 = "hardware";
main_Image_2_in_26 = "tiff";
main_Image_2_in_27 = NULL;
main_Image_2_in_28 = NULL;
main_Image_2_in_29 = NULL;
main_Image_2_in_30 = NULL;
main_Image_2_in_31 = NULL;
main_Image_2_in_32 = NULL;
main_Image_2_in_33 = NULL;
main_Image_2_in_34 = NULL;
main_Image_2_in_35 = NULL;
main_Image_2_in_36 = NULL;
main_Image_2_in_37 = NULL;
main_Image_2_in_38 = NULL;
main_Image_2_in_39 = NULL;
main_Image_2_in_40 = NULL;
main_Image_2_in_41 = NULL;
main_Image_2_in_42 = NULL;
main_Image_2_in_43 = NULL;
main_Image_2_in_44 = NULL;
main_Image_2_in_45 = NULL;
main_Image_2_in_46 = NULL;
main_Image_2_in_47 = NULL;
main_Image_2_in_48 = NULL;
main_Image_2_in_49 = NULL;
Executive("product version 4 3 2");
$sync
main();
<<attachment: software.jpg>>
<<attachment: hardware.jpg>>
