Re: Plot modular function on unit disk
- To: mathgroup at smc.vnet.net
- Subject: [mg109588] Re: Plot modular function on unit disk
- From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
- Date: Fri, 7 May 2010 06:28:25 -0400 (EDT)
Please replace the first "would" with "would not" Sorry for the typo Cheers Patrick Am May 6, 2010 um 10:51 AM schrieb Patrick Scheibe: > Hi, > > I would use RegionPlot. Why don't you create your raster of pixels > with > (Parallel)Table und use ArrayPlot to create the graphics? > ParallelTable is > fast and you can create rasters of arbitrary size. > > nx=512; > cmplxFunc[x_, y_] := > If[Abs[x + I y] != 0, > With[{nome = 1/(I Pi) Log[x + I y]}, > If[Im[nome] > 0.009, > With[{value = KleinInvariantJ[nome]}, > Min[2^15, Max[0, Re[value]]] > ], 0] > ], 0] > DistributeDefinitions[cmplxFunc,nx] > > data = ParallelTable[ > cmplxFunc[x, y], {y, -1, 1, 2./nx}, {x, -1, 1, 2./nx}]; > > ArrayPlot[data, > ColorFunction -> (If[# == 0., Lighter[Gray], > ColorData["GreenPinkTones"][#^0.2]] &)] > > Please note that you can use triples in ArrayPlot too if you want to > set > angle, saturation and brightness of hue: > > ArrayPlot[RandomReal[{0, 1}, {3, 3, 3}], ColorFunction -> (Hue[##] &)] > > Cheers > Patrick > > > Am May 3, 2010 um 1:55 PM schrieb Snas: > >> I have been using the following algorithm to plot some complex >> functions in Mathematica. I am trying to get a representation of >> modular function on the unit disk using Mathematica like in this >> link (not produced by mathematica) >> http://en.wikipedia.org/wiki/File:J-inv-real.jpeg >> >> I have tried modifying the function below using Cayley transform >> with no success. >> >> I would very much appreciate any suggestions. >> >> Sincerely, >> >> Snaes >> >> ComplexGraph[f_, xmin_, xmax_, ymin_, ymax_, points_: 100] := >> (* f is the complex function to be graphed in the region >> [xmin,xmax] * [ymin,ymax]. >> The parameter points controls how many points will be >> sampled in each direction;. good values are 100-500. *) >> RegionPlot[True, {x, xmin, xmax}, {y, ymin, ymax}, >> ColorFunction -> Function[{x, y}, >> Hue[Mod[Arg[f[(I - (x + I*y))/(I + (x + I*y))]], 2 Pi]/(2 Pi), >> 1/(1 + 0.3 Log[Abs[f[(I - (x + I*y))/(I + (x + I*y))]] + 1]), >> 1 - 1/(1.1 + >> 5 Log[Abs[f[(I - (x + I*y))/(I + (x + I*y))]] + 1])]], >> ColorFunctionScaling -> False, >> AspectRatio -> Automatic, >> PlotPoints -> points] >> > >