FlagRawSynopsisAVS/Express Flag simulation from the XP_DEMO suite, in 3D Wind Field, with Analysis or Textures applied.
module FlagRaw <src_file="flag.c"> {
FlagParams+IPort2 &FlagParams;
int+read+notify+req count => FlagParams.count;
int+read+notify+req reset => FlagParams.reset;
int+read+notify+req flag_motion => FlagParams.flag_motion;
int+read+notify+req flag_color => FlagParams.flag_color;
int+read+notify+req release_top => FlagParams.release_top;
int+read+notify+req release_bottom => FlagParams.release_bottom;
float+read+notify+req flag_wind_1 => FlagParams.flag_wind_1;
float+read+notify+req flag_wind_2 => FlagParams.flag_wind_2;
float+read+notify+req flag_strength => FlagParams.flag_strength;
int+nonotify traverse = 0;
omethod+notify_val+notify_inst update = "flag_demo";
omethod+notify_del delete = "flag_demo_del";
Mesh_Struct+Dim2+Space3+Node_Data+Oparam out;
};
DescriptionThe Flag demo application is a running physical simulation. Over the 2D mesh of the flag, gravity, friction, wind force, and elasticity constraints are simulated. Optional controls allow two corner points to be constrained (tied) to a flag pole. Using the File-Open, you can select alternate flag images to use to color the flag. To view simulation parameters, Velocity Tricolor, Force Tricolor, and Force Magnitude modes can be selected. The raw mesh field data is available in the network, such that other visualization tools could be added, such as force magnitude contours, normal vector glyphs, etc. The simulation will run forever, and can be started using the Run/Pause control button. The flag strength control controls material strength parameter during the simulation. Inputs&FlagRawParams Reference to the parameter block, which contains real instances of: count Trigger to calculate next frame of simulation. reset Reset the flag to it's original starting place. flag_motion (Always set to 1). flag_color Select the colour mode for flag. release_top Trigger to allow top-left corner to be released from its tie. release_bottom Trigger to allow bottom-left corner to be released from its tie. flag_wind_1 First part of wind velocity vector. flag_wind_2 Second part of wind velocity vector. flag_strength Flag material strength. Outputsout Output mesh and data of the flag in its current state. Utility MacrosThe FlagRaw module is used in the functional macro Flag, and the user macro flag along with the UI macro FlagUI. ExampleAn example application FlagEg is provided, which demonstrates the flag simulation with two image textures available. Filesiac_proj/flag/flagmods.v contains the FlagParams group and the FlagRaw module V definitions. Other NotesThe low-level FlagMods library containing the module FlagRaw does not specify a process. By default the express process will be used. The simulation will sometimes pause - pressing reset will restart the simulation successfully. Author
Ian Curington - AVS Modifications
Paul G. Lever Andrew Dodd Contact
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL See AlsoFlagParams, FlagUI, Flag, and flag. |