/****************************************************************************/ /* (C) Copyright 1993 Universidade Estadual de Campinas (UNICAMP) */ /* Campinas, SP, Brazil */ /* */ /* This file can be freely distributed, modified, and used for any */ /* non-commercial purpose, provided that this copyright and authorship */ /* notice be included in any copy or derived version of this file. */ /* */ /* DISCLAIMER: This software is offered ``as is'', without any guarantee */ /* as to fitness for any particular purpose. Neither the copyright */ /* holder nor the authors or their employers can be held responsible for */ /* any damages that may result from its use. */ /****************************************************************************/ char *aat_gtag = "g5"; char *aat_gname = "u = 3(x-1)/4; v = 3x/2; r2 = u^2 + v^2;\nm2 = (u^2 - 3*v^2)^2;\ns = u*m2 - r2^2;\nt = (1/8)/(2 + r2);\ng = s + t"; Float aat_g_flt (Float x) { ROUND_NEAR; { Float u = Three*Quarter * (x - One); Float v = Three*Half * x; Float u2 = u*u; Float v2 = v*v; Float r2 = u2 + v2; Float m2 = u2 - Three * v2; Float s = u*m2 + r2*r2; Float t = (1.0/8.0)/(2.0 + r2); Float res = s + t; return (res); } } Interval aat_g_ia (Interval x) { Float Eighth = Half*Quarter; Interval u = ia_affine(x, Three, Four, -Three*Quarter, Zero); Interval v = ia_scale(x, Three, Two); Interval u2 = ia_sqr(u); Interval v2 = ia_sqr(v); Interval r2 = ia_add(u2, v2); Interval m2 = ia_sub(u2, ia_scale(v2, Three, One)); Interval s = ia_add(ia_mul(u, m2), ia_sqr(r2)); Interval t = ia_scale(ia_inv(ia_shift(r2, Two)), Eighth, One); Interval res = ia_add(s, t); return (res); } AAP aat_g_aa (AAP x) { MemP frame = aa_top(); Float Eighth = Half*Quarter; AAP u = aa_affine(x, Three, Four, -Three*Quarter, Zero); AAP v = aa_scale(x, Three, Two); AAP u2 = aa_sqr(u); AAP v2 = aa_sqr(v); AAP r2 = aa_add(u2, v2); AAP m2 = aa_sub(u2, aa_scale(v2, Three, One)); AAP s = aa_add(aa_mul(u, m2), aa_sqr(r2)); AAP t = aa_scale(aa_inv(aa_shift(r2, Two)), Eighth, One); AAP res = aa_add(s, t); return (aa_return(frame, res)); } Interval aat_gxd = {-One, One}; Interval aat_gyd = {-One, One}; int aat_gn = 16;