Emmanuelle Lafont wrote:
Hi,I have a .general file which describes many sources of pollutants (height, diameter, temperature, exit velocity...). Their number may vary and is around 400. I'd like to represent every sources with a cylinder wih the correct height and diameter, and with color corresponding to the data chosen by the user (temperature, exit velocity, ect...).I've used a Glyph module. I've succeed in representing one cylinder for each source and give it the right color, but I can't manage to give them the right height and diameter.The problem is that I have one only 'unit' cylinder that I send to the type input of Glyph, but the diameter and height data are fields. So when I put a Scale module to deform the cylinder, with the fields height or diameter in input, I've got the error message : ERROR Scale: Bad parameter: scale must be a scalar or a 3-vector I don't want to use a ForEach module because it would make the execution too slow. Any idea would be welcome. Thanks! Emmanuelle Lafont
I use the attached macro to draw arrows with a given diameter. If I remeber correctly I draw an arrow in a known position (glyph and then subtract the original point position), mark the arrows positions, deform the arrow and then put it back in the right place. Hope this helps. Regards, Marco
//
// time: Mon Jun 16 10:09:02 2003
//
// version: 3.1.2 (format), 4.1.3 (DX)
//
//
//
// macro reference (direct): V3Cross /home/marco/TT/V3Cross.net
include "V3Cross.net"
//
// macro reference (direct): RotTensor /home/marco/TT/RotTensor.net
include "RotTensor.net"
//
// macro reference (direct): Make3DField
/opt/dx/samples/macros/Make3DFieldMacro.net
include "Make3DFieldMacro.net"
//
// macro reference (direct): M3TimesP3 /home/marco/TT/M3TimesP3.net
include "M3TimesP3.net"
//
// Begin MDF
// MODULE PlotForces
// CATEGORY Macros
// INPUT Field; object; (none);
// INPUT TubeDiameter; object; (none);
// INPUT GlyphLegth; object; (none);
// INPUT behind; object; (no default);
// INPUT ThickPower; object; (no default);
// OUTPUT output_1; field;
// End MDF
//
// 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.
// page assignment: DeformArrows order=4, windowed=0, showing=0
// page assignment: Inputs order=3, windowed=0, showing=0
// page assignment: Main order=2, windowed=0, showing=1
// workspace: width = 726, height = 1063
// layout: snap = 0, width = 50, height = 50, align = CC
//
macro PlotForces(
Field
,TubeDiameter
,GlyphLegth
,behind
,ThickPower
) -> (
output_1
) {
//
// node Compute[9]: x = 144, y = 6, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "[1, 0,0]"
// page group: Inputs
// expression: value = [1, 0,0]
// name[2]: value = a
// name[3]: value = b
//
PlotForces_Compute_9_out_1 =
Compute(
"[1, 0,0]",
NULL,
NULL
) [instance: 9, cache: 1];
//
// node Input[10]: x = 307, y = 69, inputs = 0, label = Field
// page group: Inputs
// parameter: position = 1, name = 'Field', value = '(none)', descriptive =
1, description = ' ', required = 1, visible = 1
//
PlotForces_Input_10_out_1 = Field;
//
// node Transmitter[14]: x = 313, y = 171, inputs = 1, label = Fiel
// page group: Inputs
//
Fiel = PlotForces_Input_10_out_1;
//
// node Receiver[16]: x = 187, y = 23, inputs = 1, label = Fiel
// page group: Main
//
PlotForces_Receiver_16_out_1[cache: 0] = Fiel;
//
// node Compute[28]: x = 265, y = 91, inputs = 2, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value =
"mag($0)<1.E-10?byte(1):byte(0)"
// page group: Main
// expression: value = mag(a)<1.E-10?byte(1):byte(0)
// name[2]: value = a
//
PlotForces_Compute_28_out_1 =
Compute(
"mag($0)<1.E-10?byte(1):byte(0)",
PlotForces_Receiver_16_out_1
) [instance: 28, cache: 1];
//
// node Replace[5]: x = 112, y = 158, inputs = 4, label = Replace
// input[4]: defaulting = 0, visible = 1, type = 32, value = "invalid
positions"
// page group: Main
//
PlotForces_Replace_5_out_1 =
Replace(
PlotForces_Compute_28_out_1,
PlotForces_Receiver_16_out_1,
NULL,
"invalid positions"
) [instance: 5, cache: 1];
//
// node Replace[3]: x = 72, y = 229, inputs = 4, label = Replace
// input[3]: defaulting = 0, visible = 1, type = 32, value = "positions"
// input[4]: defaulting = 0, visible = 1, type = 32, value =
"orig_positions"
// page group: Main
//
PlotForces_Replace_3_out_1 =
Replace(
PlotForces_Replace_5_out_1,
PlotForces_Replace_5_out_1,
"positions",
"orig_positions"
) [instance: 3, cache: 1];
//
// node Compute[16]: x = 261, y = 300, inputs = 2, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "mag($0)"
// page group: Main
// expression: value = mag(a)
// name[2]: value = a
//
PlotForces_Compute_16_out_1 =
Compute(
"mag($0)",
PlotForces_Replace_3_out_1
) [instance: 16, cache: 1];
//
// node Compute[39]: x = 51, y = 310, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0/$1"
// page group: Main
// expression: value = a/b
// name[2]: value = a
// name[3]: value = b
//
PlotForces_Compute_39_out_1 =
Compute(
"$0/$1",
PlotForces_Replace_3_out_1,
PlotForces_Compute_16_out_1
) [instance: 39, cache: 1];
//
// node V3Cross[1]: x = 92, y = 440, inputs = 2, label = V3Cross
// input[1]: defaulting = 0, visible = 1, type = 16777245, value = {[1,0,0]}
// input[2]: defaulting = 1, visible = 1, type = 16777245, value = {[1,0,0]}
// page group: Main
//
PlotForces_V3Cross_1_out_1 =
V3Cross(
{[1,0,0]},
PlotForces_Compute_39_out_1
) [instance: 1, cache: 1];
//
// node Compute[49]: x = 177, y = 441, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "[1,0,0] dot
$0>=0.?asin(mag($1)):3.1415927-asin(mag($1))"
// page group: Main
// expression: value = [1,0,0] dot a>=0.?asin(mag(b)):3.1415927-asin(mag(b))
// name[2]: value = a
// name[3]: value = b
//
PlotForces_Compute_49_out_1 =
Compute(
"[1,0,0] dot $0>=0.?asin(mag($1)):3.1415927-asin(mag($1))",
PlotForces_Compute_39_out_1,
PlotForces_V3Cross_1_out_1
) [instance: 49, cache: 1];
//
// node Compute[15]: x = 284, y = 443, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0/mag($0)*$1"
// page group: Main
// expression: value = a/mag(a)*b
// name[2]: value = a
// name[3]: value = b
//
PlotForces_Compute_15_out_1 =
Compute(
"$0/mag($0)*$1",
PlotForces_V3Cross_1_out_1,
PlotForces_Compute_49_out_1
) [instance: 15, cache: 1];
//
// node RotTensor[1]: x = 432, y = 439, inputs = 1, label = RotTensor
// page group: Main
//
PlotForces_RotTensor_1_out_1 =
RotTensor(
PlotForces_Compute_15_out_1
) [instance: 1, cache: 1];
//
// node Replace[2]: x = 531, y = 445, inputs = 4, label = Replace
// input[1]: defaulting = 1, visible = 1, type = 16777245, value = {[0,
1,0]}
// input[4]: defaulting = 0, visible = 1, type = 32, value = "rotation"
// page group: Main
//
PlotForces_Replace_2_out_1 =
Replace(
PlotForces_RotTensor_1_out_1,
PlotForces_Replace_3_out_1,
NULL,
"rotation"
) [instance: 2, cache: 1];
//
// node Compute[45]: x = 276, y = 525, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "mag($0)"
// page group: Main
// expression: value = mag(a)
// name[2]: value = a
// name[3]: value = b
//
PlotForces_Compute_45_out_1 =
Compute(
"mag($0)",
PlotForces_Replace_2_out_1,
NULL
) [instance: 45, cache: 1];
//
// node Compute[40]: x = 412, y = 536, inputs = 2, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "1"
// page group: Main
// expression: value = 1
// name[2]: value = a
//
PlotForces_Compute_40_out_1 =
Compute(
"1",
PlotForces_Replace_2_out_1
) [instance: 40, cache: 1];
//
// node Replace[7]: x = 207, y = 619, inputs = 4, label = Replace
// input[4]: defaulting = 0, visible = 1, type = 32, value = "force_mod"
// page group: Main
//
PlotForces_Replace_7_out_1 =
Replace(
PlotForces_Compute_45_out_1,
PlotForces_Compute_40_out_1,
NULL,
"force_mod"
) [instance: 7, cache: 1];
//
// node Input[44]: x = 563, y = 80, inputs = 0, label = Input
// page group: Inputs
// parameter: position = 4, name = 'behind', value = '(no default)',
descriptive = 1, description = ' ', required = 0, visible = 1
//
PlotForces_Input_44_out_1 = behind;
//
// node Transmitter[16]: x = 563, y = 167, inputs = 1, label = behin
// page group: Inputs
//
behin = PlotForces_Input_44_out_1;
//
// node Receiver[20]: x = 52, y = 372, inputs = 1, label = behin
// page group: Inputs
//
PlotForces_Receiver_20_out_1[cache: 0] = behin;
//
// node Make3DField[3]: x = 99, y = 79, inputs = 4, label = Make3DField
// input[1]: defaulting = 0, visible = 1, type = 16777245, value = {0}
// input[2]: defaulting = 0, visible = 1, type = 16777245, value = {0}
// input[3]: defaulting = 0, visible = 1, type = 16777245, value = {0}
// page group: Inputs
//
PlotForces_Make3DField_3_out_1 =
Make3DField(
{0},
{0},
{0},
PlotForces_Compute_9_out_1
) [instance: 3, cache: 1];
//
// node Glyph[3]: x = 127, y = 156, inputs = 7, label = Glyph
// input[2]: defaulting = 0, visible = 1, type = 32, value = "rocket"
// page group: Inputs
//
PlotForces_Glyph_3_out_1 =
Glyph(
PlotForces_Make3DField_3_out_1,
"rocket",
NULL,
NULL,
NULL,
NULL,
NULL
) [instance: 3, cache: 1];
//
// node Mark[15]: x = 201, y = 232, inputs = 2, label = Mark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
// page group: Inputs
//
PlotForces_Mark_15_out_1 =
Mark(
PlotForces_Glyph_3_out_1,
"positions"
) [instance: 15, cache: 1];
//
// node Statistics[2]: x = 276, y = 313, inputs = 1, label = Statistics
// page group: Inputs
//
PlotForces_Statistics_2_out_1,
PlotForces_Statistics_2_out_2,
PlotForces_Statistics_2_out_3,
PlotForces_Statistics_2_out_4,
PlotForces_Statistics_2_out_5 =
Statistics(
PlotForces_Mark_15_out_1
) [instance: 2, cache: 1];
//
// node Compute[42]: x = 243, y = 384, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value =
"[$0.x-$1,$0.y,$0.z]"
// page group: Inputs
// expression: value = [a.x-b,a.y,a.z]
// name[2]: value = a
// name[3]: value = b
//
PlotForces_Compute_42_out_1 =
Compute(
"[$0.x-$1,$0.y,$0.z]",
PlotForces_Mark_15_out_1,
PlotForces_Statistics_2_out_5
) [instance: 42, cache: 1];
//
// node Unmark[7]: x = 297, y = 477, inputs = 2, label = Unmark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
// page group: Inputs
//
PlotForces_Unmark_7_out_1 =
Unmark(
PlotForces_Compute_42_out_1,
"positions"
) [instance: 7, cache: 1];
//
// node Switch[7]: x = 163, y = 472, inputs = 3, label = Switch
// page group: Inputs
//
PlotForces_Switch_7_out_1 =
Switch(
PlotForces_Receiver_20_out_1,
PlotForces_Glyph_3_out_1,
PlotForces_Unmark_7_out_1
) [instance: 7, cache: 1];
//
// node Transmitter[8]: x = 178, y = 547, inputs = 1, label = Arrow
// page group: Inputs
//
Arrow = PlotForces_Switch_7_out_1;
//
// node Receiver[12]: x = 108, y = 509, inputs = 1, label = Arrow
// page group: Main
//
PlotForces_Receiver_12_out_1[cache: 0] = Arrow;
//
// node Glyph[5]: x = 41, y = 620, inputs = 7, label = Glyph
// input[3]: defaulting = 1, visible = 1, type = 5, value = 3.0
// input[4]: defaulting = 1, visible = 1, type = 5, value = 2.0
// page group: Main
//
PlotForces_Glyph_5_out_1 =
Glyph(
PlotForces_Replace_7_out_1,
PlotForces_Receiver_12_out_1,
NULL,
NULL,
NULL,
NULL,
NULL
) [instance: 5, cache: 1];
//
// node Mark[4]: x = 21, y = 710, inputs = 2, label = Mark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
// page group: Main
//
PlotForces_Mark_4_out_1 =
Mark(
PlotForces_Glyph_5_out_1,
"positions"
) [instance: 4, cache: 1];
//
// node Mark[6]: x = 93, y = 710, inputs = 2, label = Mark
// input[2]: defaulting = 0, visible = 1, type = 32, value =
"orig_positions"
// page group: Main
//
PlotForces_Mark_6_out_1 =
Mark(
PlotForces_Glyph_5_out_1,
"orig_positions"
) [instance: 6, cache: 1];
//
// node Compute[17]: x = 36, y = 834, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0-$1"
// page group: Main
// expression: value = a-b
// name[2]: value = a
// name[3]: value = b
//
PlotForces_Compute_17_out_1 =
Compute(
"$0-$1",
PlotForces_Mark_4_out_1,
PlotForces_Mark_6_out_1
) [instance: 17, cache: 1];
//
// node Unmark[4]: x = 55, y = 912, inputs = 2, label = Unmark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
// page group: Main
//
PlotForces_Unmark_4_out_1 =
Unmark(
PlotForces_Compute_17_out_1,
"positions"
) [instance: 4, cache: 1];
//
// node Transmitter[10]: x = 34, y = 986, inputs = 1, label = StraightArrows
// page group: Main
//
StraightArrows = PlotForces_Unmark_4_out_1;
//
// node Receiver[14]: x = 81, y = 20, inputs = 1, label = StraightArrows
// page group: DeformArrows
//
PlotForces_Receiver_14_out_1[cache: 0] = StraightArrows;
//
// node Mark[2]: x = 20, y = 107, inputs = 2, label = Mark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
// page group: DeformArrows
//
PlotForces_Mark_2_out_1 =
Mark(
PlotForces_Receiver_14_out_1,
"positions"
) [instance: 2, cache: 1];
//
// node Mark[17]: x = 81, y = 118, inputs = 2, label = Mark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "volume"
// page group: DeformArrows
//
PlotForces_Mark_17_out_1 =
Mark(
PlotForces_Receiver_14_out_1,
"volume"
) [instance: 17, cache: 1];
//
// node Input[11]: x = 380, y = 72, inputs = 0, label = TubeDiameter
// page group: Inputs
// parameter: position = 2, name = 'TubeDiameter', value = '(none)',
descriptive = 1, description = ' ', required = 1, visible = 1
//
PlotForces_Input_11_out_1 = TubeDiameter;
//
// node Transmitter[12]: x = 366, y = 173, inputs = 1, label = TubeDiam
// page group: Inputs
//
TubeDiam = PlotForces_Input_11_out_1;
//
// node Receiver[19]: x = 248, y = 115, inputs = 1, label = TubeDiam
// page group: DeformArrows
//
PlotForces_Receiver_19_out_1[cache: 0] = TubeDiam;
//
// node Input[45]: x = 481, y = 286, inputs = 0, label = Input
// page group: Inputs
// parameter: position = 5, name = 'ThickPower', value = '(no default)',
descriptive = 1, description = ' ', required = 0, visible = 1
//
PlotForces_Input_45_out_1 = ThickPower;
//
// node Transmitter[17]: x = 462, y = 382, inputs = 1, label = ThickPo
// page group: Inputs
//
ThickPo = PlotForces_Input_45_out_1;
//
// node Receiver[21]: x = 326, y = 19, inputs = 1, label = ThickPo
// page group: DeformArrows
//
PlotForces_Receiver_21_out_1[cache: 0] = ThickPo;
//
// node Compute[46]: x = 154, y = 117, inputs = 4, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "pow($0,$2)*$1"
// page group: DeformArrows
// expression: value = pow(a,c)*b
// name[2]: value = a
// name[3]: value = b
// name[4]: value = c
//
PlotForces_Compute_46_out_1 =
Compute(
"pow($0,$2)*$1",
PlotForces_Mark_17_out_1,
PlotForces_Receiver_19_out_1,
PlotForces_Receiver_21_out_1
) [instance: 46, cache: 1];
//
// node Mark[16]: x = 375, y = 92, inputs = 2, label = Mark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "force_mod"
// page group: DeformArrows
//
PlotForces_Mark_16_out_1 =
Mark(
PlotForces_Receiver_14_out_1,
"force_mod"
) [instance: 16, cache: 1];
//
// node Input[42]: x = 466, y = 73, inputs = 0, label = Input
// page group: Inputs
// parameter: position = 3, name = 'GlyphLegth', value = '(none)',
descriptive = 1, description = ' ', required = 1, visible = 1
//
PlotForces_Input_42_out_1 = GlyphLegth;
//
// node Transmitter[13]: x = 454, y = 170, inputs = 1, label = GlyphLen
// page group: Inputs
//
GlyphLen = PlotForces_Input_42_out_1;
//
// node Receiver[17]: x = 462, y = 80, inputs = 1, label = GlyphLen
// page group: DeformArrows
//
PlotForces_Receiver_17_out_1[cache: 0] = GlyphLen;
//
// node Compute[43]: x = 382, y = 161, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0*$1"
// page group: DeformArrows
// expression: value = a*b
// name[2]: value = a
// name[3]: value = b
//
PlotForces_Compute_43_out_1 =
Compute(
"$0*$1",
PlotForces_Mark_16_out_1,
PlotForces_Receiver_17_out_1
) [instance: 43, cache: 1];
//
// node Compute[11]: x = 105, y = 230, inputs = 4, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "[$0.x*$2,
$0.y*$1, $0.z*$1]"
// page group: DeformArrows
// expression: value = [a.x*len, a.y*diam, a.z*diam]
// name[2]: value = a
// name[3]: value = diam
// name[4]: value = len
//
PlotForces_Compute_11_out_1 =
Compute(
"[$0.x*$2, $0.y*$1, $0.z*$1]",
PlotForces_Mark_2_out_1,
PlotForces_Compute_46_out_1,
PlotForces_Compute_43_out_1
) [instance: 11, cache: 1];
//
// node Mark[5]: x = 341, y = 767, inputs = 2, label = Mark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "rotation"
// page group: Main
//
PlotForces_Mark_5_out_1 =
Mark(
PlotForces_Glyph_5_out_1,
"rotation"
) [instance: 5, cache: 1];
//
// node Unmark[2]: x = 126, y = 318, inputs = 2, label = Unmark
// input[2]: defaulting = 1, visible = 1, type = 32, value = "positions"
// page group: DeformArrows
//
PlotForces_Unmark_2_out_1 =
Unmark(
PlotForces_Compute_11_out_1,
NULL
) [instance: 2, cache: 1];
//
// node Transmitter[9]: x = 111, y = 395, inputs = 1, label = ScaledArrow
// page group: DeformArrows
//
ScaledArrow = PlotForces_Unmark_2_out_1;
//
// node Receiver[11]: x = 398, y = 686, inputs = 1, label = ScaledArrow
// page group: Main
//
PlotForces_Receiver_11_out_1[cache: 0] = ScaledArrow;
//
// node Mark[9]: x = 430, y = 766, inputs = 2, label = Mark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
// page group: Main
//
PlotForces_Mark_9_out_1 =
Mark(
PlotForces_Receiver_11_out_1,
"positions"
) [instance: 9, cache: 1];
//
// node M3TimesP3[1]: x = 344, y = 883, inputs = 2, label = M3TimesP3
// page group: Main
//
PlotForces_M3TimesP3_1_out_1 =
M3TimesP3(
PlotForces_Mark_5_out_1,
PlotForces_Mark_9_out_1
) [instance: 1, cache: 1];
//
// node Compute[18]: x = 264, y = 986, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0+$1"
// page group: Main
// expression: value = a+b
// name[2]: value = a
// name[3]: value = b
//
PlotForces_Compute_18_out_1 =
Compute(
"$0+$1",
PlotForces_Mark_6_out_1,
PlotForces_M3TimesP3_1_out_1
) [instance: 18, cache: 1];
//
// node Compute[19]: x = 0, y = 78, inputs = 2, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value =
"$0/180*3.1415927"
// page group: Inputs
// expression: value = a/180*3.1415927
// name[2]: value = a
//
PlotForces_Compute_19_out_1 =
Compute(
"$0/180*3.1415927",
NULL
) [instance: 19, cache: 1];
//
// node Unmark[3]: x = 444, y = 992, inputs = 2, label = Unmark
// input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
// page group: Main
//
PlotForces_Unmark_3_out_1 =
Unmark(
PlotForces_Compute_18_out_1,
"positions"
) [instance: 3, cache: 1];
//
// node Output[5]: x = 571, y = 1001, inputs = 1, label = Output
// page group: Main
// parameter: position = 1, name = 'output_1', value = ' ', descriptive =
0, description = ' ', required = 0, visible = 1
//
output_1 = PlotForces_Unmark_3_out_1;
//
// node Receiver[9]: x = 681, y = 564, inputs = 1, label = Arrow
// page group: Main
//
PlotForces_Receiver_9_out_1[cache: 0] = Arrow;
//
// node Transmitter[7]: x = 12, y = 162, inputs = 1, label = Angle
// page group: Inputs
//
Angle = PlotForces_Compute_19_out_1;
// network: end of macro body
}
PlotForces_Compute_9_out_1 = NULL;
PlotForces_Input_10_out_1 = NULL;
PlotForces_Transmitter_14_out_1 = NULL;
PlotForces_Receiver_16_out_1 = NULL;
PlotForces_Compute_28_out_1 = NULL;
PlotForces_Replace_5_out_1 = NULL;
PlotForces_Replace_3_out_1 = NULL;
PlotForces_Compute_16_out_1 = NULL;
PlotForces_Compute_39_out_1 = NULL;
PlotForces_V3Cross_1_out_1 = NULL;
PlotForces_Compute_49_out_1 = NULL;
PlotForces_Compute_15_out_1 = NULL;
PlotForces_RotTensor_1_out_1 = NULL;
PlotForces_Replace_2_out_1 = NULL;
PlotForces_Compute_45_out_1 = NULL;
PlotForces_Compute_40_out_1 = NULL;
PlotForces_Replace_7_out_1 = NULL;
PlotForces_Input_44_out_1 = NULL;
PlotForces_Transmitter_16_out_1 = NULL;
PlotForces_Receiver_20_out_1 = NULL;
PlotForces_Make3DField_3_out_1 = NULL;
PlotForces_Glyph_3_out_1 = NULL;
PlotForces_Mark_15_out_1 = NULL;
PlotForces_Statistics_2_out_5 = NULL;
PlotForces_Compute_42_out_1 = NULL;
PlotForces_Unmark_7_out_1 = NULL;
PlotForces_Switch_7_out_1 = NULL;
PlotForces_Transmitter_8_out_1 = NULL;
PlotForces_Receiver_12_out_1 = NULL;
PlotForces_Glyph_5_out_1 = NULL;
PlotForces_Mark_4_out_1 = NULL;
PlotForces_Mark_6_out_1 = NULL;
PlotForces_Compute_17_out_1 = NULL;
PlotForces_Unmark_4_out_1 = NULL;
PlotForces_Transmitter_10_out_1 = NULL;
PlotForces_Receiver_14_out_1 = NULL;
PlotForces_Mark_2_out_1 = NULL;
PlotForces_Mark_17_out_1 = NULL;
PlotForces_Input_11_out_1 = NULL;
PlotForces_Transmitter_12_out_1 = NULL;
PlotForces_Receiver_19_out_1 = NULL;
PlotForces_Input_45_out_1 = NULL;
PlotForces_Transmitter_17_out_1 = NULL;
PlotForces_Receiver_21_out_1 = NULL;
PlotForces_Compute_46_out_1 = NULL;
PlotForces_Mark_16_out_1 = NULL;
PlotForces_Input_42_out_1 = NULL;
PlotForces_Transmitter_13_out_1 = NULL;
PlotForces_Receiver_17_out_1 = NULL;
PlotForces_Compute_43_out_1 = NULL;
PlotForces_Compute_11_out_1 = NULL;
PlotForces_Mark_5_out_1 = NULL;
PlotForces_Unmark_2_out_1 = NULL;
PlotForces_Transmitter_9_out_1 = NULL;
PlotForces_Receiver_11_out_1 = NULL;
PlotForces_Mark_9_out_1 = NULL;
PlotForces_M3TimesP3_1_out_1 = NULL;
PlotForces_Compute_18_out_1 = NULL;
PlotForces_Compute_19_out_1 = NULL;
PlotForces_Unmark_3_out_1 = NULL;
//
// time: Wed Dec 4 09:40:43 2002
//
// version: 3.1.2 (format), 4.1.3 (DX)
//
//
// Begin MDF
// MODULE RotTensor
// CATEGORY Macros
// DESCRIPTION RotTensor
// INPUT input_1; value list or field or string or string list; (no default);
// OUTPUT output_1; value or value list or field;
// End MDF
// page assignment: Sheet1 order=2, windowed=0, showing=1
// workspace: width = 734, height = 777
// layout: snap = 0, width = 50, height = 50, align = NN
//
macro RotTensor(
input_1
) -> (
output_1
) {
//
// node Input[1]: x = 220, y = 8, inputs = 0, label = Input
// page group: Sheet1
// parameter: position = 1, name = 'input_1', value = '(no default)',
descriptive = 1, description = ' ', required = 0, visible = 1
//
RotTensor_Input_1_out_1 = input_1;
//
// node Compute[1]: x = 83, y = 81, inputs = 2, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value =
"sqrt($0.0^2+$0.1^2+$0.2^2)"
// page group: Sheet1
// expression: value = sqrt(a.0^2+a.1^2+a.2^2)
// name[2]: value = a
//
RotTensor_Compute_1_out_1 =
Compute(
"sqrt($0.0^2+$0.1^2+$0.2^2)",
RotTensor_Input_1_out_1
) [instance: 1, cache: 1];
//
// node Compute[2]: x = 209, y = 82, inputs = 2, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "[0, -$0.2,
$0.1,$0.2,0,-$0.0,-$0.1,$0.0,0]"
// page group: Sheet1
// expression: value = [0, -a.2, a.1,a.2,0,-a.0,-a.1,a.0,0]
// name[2]: value = a
//
RotTensor_Compute_2_out_1 =
Compute(
"[0, -$0.2, $0.1,$0.2,0,-$0.0,-$0.1,$0.0,0]",
RotTensor_Input_1_out_1
) [instance: 2, cache: 1];
//
// node Compute[3]: x = 481, y = 173, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "[$0.6*$1.0 +
$0.7*$1.3 + $0.8*$1.6, $0.6*$1.1 + $0.7*$1.4 + $0.8*$1.7, $0.6*$1.2 +
$0.7*$1.5 + $0.8*$1.8]"
// page group: Sheet1
// expression: value = [a.6*b.0 + a.7*b.3 + a.8*b.6, a.6*b.1 + a.7*b.4 +
a.8*b.7, a.6*b.2 + a.7*b.5 + a.8*b.8]
// name[2]: value = a
// name[3]: value = b
//
RotTensor_Compute_3_out_1 =
Compute(
"[$0.6*$1.0 + $0.7*$1.3 + $0.8*$1.6, $0.6*$1.1 + $0.7*$1.4 + $0.8*$1.7,
$0.6*$1.2 + $0.7*$1.5 + $0.8*$1.8]",
RotTensor_Compute_2_out_1,
RotTensor_Compute_2_out_1
) [instance: 3, cache: 1];
//
// node Compute[4]: x = 343, y = 173, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "[$0.0*$1.0 +
$0.1*$1.3 + $0.2*$1.6, $0.0*$1.1 + $0.1*$1.4 + $0.2*$1.7, $0.0*$1.2 +
$0.1*$1.5 + $0.2*$1.8]"
// page group: Sheet1
// expression: value = [a.0*b.0 + a.1*b.3 + a.2*b.6, a.0*b.1 + a.1*b.4 +
a.2*b.7, a.0*b.2 + a.1*b.5 + a.2*b.8]
// name[2]: value = a
// name[3]: value = b
//
RotTensor_Compute_4_out_1 =
Compute(
"[$0.0*$1.0 + $0.1*$1.3 + $0.2*$1.6, $0.0*$1.1 + $0.1*$1.4 + $0.2*$1.7,
$0.0*$1.2 + $0.1*$1.5 + $0.2*$1.8]",
RotTensor_Compute_2_out_1,
RotTensor_Compute_2_out_1
) [instance: 4, cache: 1];
//
// node Compute[5]: x = 412, y = 173, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "[$0.3*$1.0 +
$0.4*$1.3 + $0.5*$1.6, $0.3*$1.1 + $0.4*$1.4 + $0.5*$1.7, $0.3*$1.2 +
$0.4*$1.5 + $0.5*$1.8]"
// page group: Sheet1
// expression: value = [a.3*b.0 + a.4*b.3 + a.5*b.6, a.3*b.1 + a.4*b.4 +
a.5*b.7, a.3*b.2 + a.4*b.5 + a.5*b.8]
// name[2]: value = a
// name[3]: value = b
//
RotTensor_Compute_5_out_1 =
Compute(
"[$0.3*$1.0 + $0.4*$1.3 + $0.5*$1.6, $0.3*$1.1 + $0.4*$1.4 + $0.5*$1.7,
$0.3*$1.2 + $0.4*$1.5 + $0.5*$1.8]",
RotTensor_Compute_2_out_1,
RotTensor_Compute_2_out_1
) [instance: 5, cache: 1];
//
// node Compute[6]: x = 410, y = 263, inputs = 4, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "[$0.0, $0.1,
$0.2, $1.0, $1.1, $1.2, $2.0, $2.1, $2.2]"
// page group: Sheet1
// expression: value = [V0.0, V0.1, V0.2, V1.0, V1.1, V1.2, V2.0, V2.1,
V2.2]
// name[2]: value = V0
// name[3]: value = V1
// name[4]: value = V2
//
RotTensor_Compute_6_out_1 =
Compute(
"[$0.0, $0.1, $0.2, $1.0, $1.1, $1.2, $2.0, $2.1, $2.2]",
RotTensor_Compute_4_out_1,
RotTensor_Compute_5_out_1,
RotTensor_Compute_3_out_1
) [instance: 6, cache: 1];
//
// node Transmitter[1]: x = 87, y = 155, inputs = 1, label = mod_phi
// page group: Sheet1
//
mod_phi = RotTensor_Compute_1_out_1;
//
// node Receiver[1]: x = 42, y = 390, inputs = 1, label = mod_phi
// page group: Sheet1
//
RotTensor_Receiver_1_out_1[cache: 0] = mod_phi;
//
// node Compute[8]: x = 123, y = 462, inputs = 2, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0^2"
// page group: Sheet1
// expression: value = a^2
// name[2]: value = a
//
RotTensor_Compute_8_out_1 =
Compute(
"$0^2",
RotTensor_Receiver_1_out_1
) [instance: 8, cache: 1];
//
// node Compute[26]: x = 259, y = 460, inputs = 2, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0<1.1?1:$0"
// page group: Sheet1
// expression: value = a<1.1?1:a
// name[2]: value = a
//
RotTensor_Compute_26_out_1 =
Compute(
"$0<1.1?1:$0",
RotTensor_Receiver_1_out_1
) [instance: 26, cache: 1];
//
// node Compute[7]: x = 26, y = 540, inputs = 4, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value =
"$0<1.1?1.-$1/6.+$1^2/120.-$1^3/5040.+$1^4/362880.-$1^5/39916800.+$1^6/6227020800.-$1^7/1307674368000.+$1^8/355687428096000.:sin($0)/($2)"
// page group: Sheet1
// expression: value =
a<1.1?1.-b/6.+b^2/120.-b^3/5040.+b^4/362880.-b^5/39916800.+b^6/6227020800.-b^7/1307674368000.+b^8/355687428096000.:sin(a)/(c)
// name[2]: value = a
// name[3]: value = b
// name[4]: value = c
//
RotTensor_Compute_7_out_1 =
Compute(
"$0<1.1?1.-$1/6.+$1^2/120.-$1^3/5040.+$1^4/362880.-$1^5/39916800.+$1^6/6227020800.-$1^7/1307674368000.+$1^8/355687428096000.:sin($0)/($2)",
RotTensor_Receiver_1_out_1,
RotTensor_Compute_8_out_1,
RotTensor_Compute_26_out_1
) [instance: 7, cache: 1];
//
// node Compute[11]: x = 577, y = 86, inputs = 1, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "[1,
0,0,0,1,0,0,0,1]"
// page group: Sheet1
// expression: value = [1, 0,0,0,1,0,0,0,1]
//
RotTensor_Compute_11_out_1 =
Compute(
"[1, 0,0,0,1,0,0,0,1]"
) [instance: 11, cache: 1];
//
// node Transmitter[4]: x = 51, y = 641, inputs = 1, label = a
// page group: Sheet1
//
a = RotTensor_Compute_7_out_1;
//
// node Receiver[3]: x = 461, y = 434, inputs = 1, label = a
// page group: Sheet1
//
RotTensor_Receiver_3_out_1[cache: 0] = a;
//
// node Transmitter[2]: x = 209, y = 158, inputs = 1, label = phi_cross
// page group: Sheet1
//
phi_cross = RotTensor_Compute_2_out_1;
//
// node Receiver[4]: x = 490, y = 435, inputs = 1, label = phi_cross
// page group: Sheet1
//
RotTensor_Receiver_4_out_1[cache: 0] = phi_cross;
//
// node Compute[12]: x = 454, y = 523, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0*$1"
// page group: Sheet1
// expression: value = a*b
// name[2]: value = a
// name[3]: value = b
//
RotTensor_Compute_12_out_1 =
Compute(
"$0*$1",
RotTensor_Receiver_3_out_1,
RotTensor_Receiver_4_out_1
) [instance: 12, cache: 1];
//
// node Compute[25]: x = 215, y = 548, inputs = 4, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value =
"$0<1.1?0.5-$1/24+$1^2/720.-$1^3/40320.+$1^4/3628800.-$1^5/479001600.+$1^6/87178291200.-$1^7/20922789888000.+$1^8/6402373705728000.:(1-cos($0))/($2^2)"
// page group: Sheet1
// expression: value =
a<1.1?0.5-b/24+b^2/720.-b^3/40320.+b^4/3628800.-b^5/479001600.+b^6/87178291200.-b^7/20922789888000.+b^8/6402373705728000.:(1-cos(a))/(c^2)
// name[2]: value = a
// name[3]: value = b
// name[4]: value = c
//
RotTensor_Compute_25_out_1 =
Compute(
"$0<1.1?0.5-$1/24+$1^2/720.-$1^3/40320.+$1^4/3628800.-$1^5/479001600.+$1^6/87178291200.-$1^7/20922789888000.+$1^8/6402373705728000.:(1-cos($0))/($2^2)",
RotTensor_Receiver_1_out_1,
RotTensor_Compute_8_out_1,
RotTensor_Compute_26_out_1
) [instance: 25, cache: 1];
//
// node Transmitter[5]: x = 237, y = 632, inputs = 1, label = b
// page group: Sheet1
//
b = RotTensor_Compute_25_out_1;
//
// node Receiver[5]: x = 565, y = 434, inputs = 1, label = b
// page group: Sheet1
//
RotTensor_Receiver_5_out_1[cache: 0] = b;
//
// node Transmitter[3]: x = 377, y = 343, inputs = 1, label =
phi_cross_phi_cross
// page group: Sheet1
//
phi_cross_phi_cross = RotTensor_Compute_6_out_1;
//
// node Receiver[6]: x = 595, y = 436, inputs = 1, label =
phi_cross_phi_cross
// page group: Sheet1
//
RotTensor_Receiver_6_out_1[cache: 0] = phi_cross_phi_cross;
//
// node Compute[13]: x = 559, y = 523, inputs = 3, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0*$1"
// page group: Sheet1
// expression: value = a*b
// name[2]: value = a
// name[3]: value = b
//
RotTensor_Compute_13_out_1 =
Compute(
"$0*$1",
RotTensor_Receiver_5_out_1,
RotTensor_Receiver_6_out_1
) [instance: 13, cache: 1];
//
// node Transmitter[6]: x = 575, y = 176, inputs = 1, label = IDENTITY
// page group: Sheet1
//
IDENTITY = RotTensor_Compute_11_out_1;
//
// node Receiver[2]: x = 375, y = 433, inputs = 1, label = IDENTITY
// page group: Sheet1
//
RotTensor_Receiver_2_out_1[cache: 0] = IDENTITY;
//
// node Compute[14]: x = 453, y = 633, inputs = 4, label = Compute
// input[1]: defaulting = 0, visible = 0, type = 32, value = "$0+$1+$2"
// page group: Sheet1
// expression: value = a+b+c
// name[2]: value = a
// name[3]: value = b
// name[4]: value = c
//
RotTensor_Compute_14_out_1 =
Compute(
"$0+$1+$2",
RotTensor_Receiver_2_out_1,
RotTensor_Compute_12_out_1,
RotTensor_Compute_13_out_1
) [instance: 14, cache: 1];
//
// node Output[1]: x = 462, y = 715, inputs = 1, label = Output
// page group: Sheet1
// parameter: position = 1, name = 'output_1', value = ' ', descriptive =
0, description = ' ', required = 0, visible = 1
//
output_1 = RotTensor_Compute_14_out_1;
// network: end of macro body
}
RotTensor_Input_1_out_1 = NULL;
RotTensor_Compute_1_out_1 = NULL;
RotTensor_Compute_2_out_1 = NULL;
RotTensor_Compute_3_out_1 = NULL;
RotTensor_Compute_4_out_1 = NULL;
RotTensor_Compute_5_out_1 = NULL;
RotTensor_Compute_6_out_1 = NULL;
RotTensor_Transmitter_1_out_1 = NULL;
RotTensor_Receiver_1_out_1 = NULL;
RotTensor_Compute_8_out_1 = NULL;
RotTensor_Compute_26_out_1 = NULL;
RotTensor_Compute_7_out_1 = NULL;
RotTensor_Compute_11_out_1 = NULL;
RotTensor_Transmitter_4_out_1 = NULL;
RotTensor_Receiver_3_out_1 = NULL;
RotTensor_Transmitter_2_out_1 = NULL;
RotTensor_Receiver_4_out_1 = NULL;
RotTensor_Compute_12_out_1 = NULL;
RotTensor_Compute_25_out_1 = NULL;
RotTensor_Transmitter_5_out_1 = NULL;
RotTensor_Receiver_5_out_1 = NULL;
RotTensor_Transmitter_3_out_1 = NULL;
RotTensor_Receiver_6_out_1 = NULL;
RotTensor_Compute_13_out_1 = NULL;
RotTensor_Transmitter_6_out_1 = NULL;
RotTensor_Receiver_2_out_1 = NULL;
RotTensor_Compute_14_out_1 = NULL;
M3TimesP3.net
Description: Binary data
//
// time: Wed Apr 28 14:31:13 1993
//
// version: 1.0.0
//
// Begin MDF
// MODULE V3Cross
// CATEGORY Vectors and Matrices
// DESCRIPTION returns 3D vector cross-product of two 3D vectors
// INPUT V30; value list or field; {[0,0,0]}; 3D vector
// INPUT V31; value list or field; {[0,0,0]}; 3D vector
// OUTPUT V3cross; value or value list or field; crossproduct 3D vector
// End MDF
//
//
// comment: Network name: V3Cross.net
// comment: Macro name: V3Cross
// comment: Category: Vectors and Matrices
// comment: Author: Chris Pelkie, Cornell Theory Center Visualization staff,
[EMAIL PROTECTED]
// comment: Date last modified: 04/06/93
// comment: Other required files: none
// comment:
// comment: V3Cross takes two 3D vectors (or fields) and returns the cross
product (a vector value). While Compute has a built-in function cross(), this
macro provides a self-describing module in your visual program. The cross
product is, of course, that vector which is perpendicular to the other two
vectors.
// comment:
// comment: See also:
// comment: V2MakePerpendicular (Vectors and Matrices macro)
//
// workspace: width = 1000, height = 1000
// layout: snap = 0, width = 50, height = 50, align = C
//
macro V3Cross(
V30 = {[0,0,0]},
V31 = {[0,0,0]}) -> (
V3cross)
{
//
// node Input[1]: x = 34, y = 39, inputs = 0, label = Input
// parameter: position = 1, name = 'V30', value = '{[0,0,0]}', descriptive
= 0, description = '3D vector', required = 0
//
Input_1_out_1 = V30;
//
// node Input[3]: x = 117, y = 37, inputs = 0, label = Input
// parameter: position = 2, name = 'V31', value = '{[0,0,0]}', descriptive
= 0, description = '3D vector', required = 0
//
Input_3_out_1 = V31;
//
// node Compute[1]: x = 61, y = 140, inputs = 3, label = Compute
// input[1]: type = 64, value = "$0 cross $1"
// expression: value = V0 cross V1
// name[2]: value = V0
// name[3]: value = V1
//
Compute_1_out_1 =
Compute(
Compute_1_in_1,
Input_1_out_1,
Input_3_out_1
) [instance: 1];
//
// node Output[1]: x = 68, y = 256, inputs = 1, label = Output
// parameter: position = 1, name = 'V3cross', value = ' ', descriptive = 0,
description = 'crossproduct 3D vector', required = 0
//
Output_1_in_1 = Compute_1_out_1;
V3cross = Output_1_in_1;
}
Compute_1_in_1 = "$0 cross $1";
Compute_1_in_2 = NULL;
Compute_1_in_3 = NULL;
Output_1_in_1 = NULL;
