New answers tagged

3

Most of your time is spent in defining PolarCoords. Let's take a look at your code. It looks like you've tried to optimize it already. Let's try to simplify it first: PolarCoords = Map[Function[i, ToPolarCoordinates /@ newCoord[[i]] /. {x_, y_} /; y < 0 -> {x, y + 2 \[Pi]}], Range@Length@pts] Simpler: PolarCoords = ...


3

If you use float instead integer you can reduce the computing time. data = RandomInteger[{1, 400}, {5000, 2}]; c = 10.; r = 60.; pts = c + r {Cos[#], Sin[#]} & /@ Range[0., 2. π, 2. π/16.]; newCoord = Table[(# - pts[[i]]) & /@ data, {i, 1, Length@pts}]; PolarCoords = Table[ToPolarCoordinates[#] & /@ ...



Top 50 recent answers are included