====== Applying a set of attributes and union operation ====== ===== Set Attributes ===== {{http://hyperfun.org/HF2/Language/Library/Attri_Lib/images/hfA_SetAttributes.JPG?200x200&nolink}}\\ **Definition**: if(fв%_0) then s=c **Call**: hfA_SetAttributes(f,s,c); **Parameters**: \\ f - real values \\ s - Output Array \\ c - array of attributes **Output** : array s **Test file**: [[http://hyperfun.org/HF2/Language/Library/Attri_Lib/hffiles/hfA_SetAttributes.hf|hfA_SetAttributes.hf]] ===== Set Colors ===== {{http://hyperfun.org/HF2/Language/Library/Attri_Lib/images/hfA_SetColor.JPG?200x200&nolink}}\\ **Definition**: if(fв%_0) then s[1]=r;s[2]=g;s[3]=b; **Call**: hfA_SetColor(f,s,r,g,b); **Parameters**: \\ f - real values \\ s - Output Array \\ r,g,b - rgb color values \\ **Output** : s array **Test file**: [[http://hyperfun.org/HF2/Language/Library/Attri_Lib/hffiles/hfA_SetColor.hf|hfA_SetColor.hf]] ===== Union ===== {{http://hyperfun.org/HF2/Language/Library/Attri_Lib/images/hfA_union.JPG?200x200&nolink}}\\ **Definition** : R_uni(f1,f2) **Call**: hfA_Union(f1,f2,s,c1,c2,type); **Parameters**: \\ f1,f2 - function values \\ s - Output Array \\ c1 - array of attributes of f1 \\ c2 - array of attributes of f2 \\ type - Predefined Unions (for the intersection set) : * 0 : Attributes of f1 * 1 : Attributes of f2 * 2 : Sum of c1 and c2 * 3: Min of the components s [i] = min(c1[i],c2[i]); * 4: Max of the components s[i] = max(c1[i],c2[i]); **Output** : Return the value R_uni(f1,f2). Fill the s array **Test file**: [[http://hyperfun.org/HF2/Language/Library/Attri_Lib/hffiles/hfA_Union.hf|hfA_Union.hf]]