Re: Hole/Disk function

*To*: mathgroup at smc.vnet.net*Subject*: [mg76167] Re: Hole/Disk function*From*: Mathieu G <ellocomateo at free.fr>*Date*: Thu, 17 May 2007 05:57:09 -0400 (EDT)*References*: <f2bs7i$gc0$1@smc.vnet.net> <f2ekvf$22o$1@smc.vnet.net>

dimitris a =E9crit : > I guess you really mean > > In[14]:= > DHole[x_, y_, HoleSize_] := If[Sqrt[x^2 + y^2] <= HoleSize, 1, 0]; > > What do you mean "a better way"? > The function looks ok. > > In[16]:= > Plot3D[DHole[x, y, 3], {x, -3, 3}, {y, -3, 3}, PlotPoints -> 50, > ColorFunction -> (Hue[2*((1 - #1)/5)] & )] > > Dimitris > > =CF/=C7 Mathieu G =DD=E3=F1=E1=F8=E5: >> Hello, >> Is there a better way to define a Disk/Hole function than that?: >> >> DHole[x_, y_] := If[Sqrt[x^2 + y^2] <= HoleSize, 1, 0]; >> >> I would like to use it for a convolution using the definition as shown >> in http://oldsite.vislab.usyd.edu.au/CP3/Four5/mod2-01.gif >> >> Best regards, >> MG > > I would like to integrate it (using Integrate, rather than NIntegrate) or use its FourierTransform... it seems to me than the code I propose was not quite efficient as for computing time...