//////////////////////////////////////////////////////////////// // // RenderDemo.q // //////////////////////////////////////////////////////////////// //(New RenderDemo) (Export RenderDemo) (DefClass RenderDemo (: Window) grid prev next fs k (Def (RenderF) (Local f image) (Setq f (Elt fs k)) (Setq image (Render f)) (Grid.SetRow image 0) (Grid.SetColumn image 0) (Grid.SetColumnSpan image 2) (When (> grid.Children.Count 2) (grid.Children.RemoveAt 2)) (grid.Children.Add image)) (Def (prev_Click sender e) (Setq k (Mod (+ k -1) (Length fs))) (RenderF)) (Def (next_Click sender e) (Setq k (Mod (+ k 1) (Length fs))) (RenderF)) (Def (Fs) '[(Int (BesselJ mu x) [x 0 _Infinity]) (Int (over (Sin (* b x)) (^ (+ (^ x 2) (^ z 2)) rho)) [x 0 _Infinity]) (Int (Cos (+ (* a (^ x 2)) (* 2 b x))) [x 0 _Infinity]) (Int (* (Cos (* b x)) (ArcTan (over a (^ x 2)))) [x 0 _Infinity]) (Int (over (* (Cos (* b (Sqrt x))) (BesselJ 0 (* c x))) (Sqrt x)) [x 0 _Infinity]) (Int (over (* (BesselJ 1 (* b x)) (BesselJ 1 (* c x))) (^ x 2)) [x 0 _Infinity]) (Int (* x (^ (BesselJ (over nu 4) (* b (^ x 2))) 2) (BesselJ nu (* c x))) [x 0 _Infinity]) (Int (* (^ _E (* _I p x)) (HankelH1 0 (* c x))) [x 0 _Infinity]) (Int (* (^ _E (* -1 p x)) (^ (BesselI 1 (* c x)) 2)) [x 0 _Infinity]) (Int (over (* (^ _E (* -1 p x)) (^ (BesselI 1 (* c x)) 2)) x) [x 0 _Infinity]) (Int (* (^ x (+ nu 1)) (Sin (over (* c (^ x 2)) (* 2 a))) (BesselK nu (* c x))) [x 0 _Infinity]) (Int (* (Sin (* b (^ x 2))) (BesselK nu (* c x))) [x 0 _Infinity])]) (Def (RenderDemo) (ApplyXaml this "~/GuiDemo/RenderDemo.xaml") (Setq fs (Fs)) (Setq k 0) (RenderF) (Show)) )