I need to draw a heat map in a Voronoi diagram with 4-5 Voronoi cell. Each cell needs to have its own heat map. Each cell should have maximum signal strength at the centre and then the strength should get weaker.

For example, let us consider a cellular system with 4-5 base stations or towers. In general, the closer you are to the base station, the better signal you get. As you move away from the base station, the signal weakens (although this is not always true, as a user close to the base station may also have weak signal if he/she is obstructed by the house, building etc).

I would like to draw a smooth heat map based on this scenario. Let $P$=1 be the transmit power of a base station. The power decays with distance $d$ with rate $d^{-\eta}$ where $\eta=3$.

  • $\begingroup$ Can you post some code to show what you've already tried and where it didn't work? $\endgroup$ Aug 17 '17 at 7:55
  • $\begingroup$ What is the function that measures the "signal strength"? Not everybody is a specialist, so you might wish to elaborate a bit on what you're plotting. $\endgroup$
    – J. M.'s torpor
    Aug 17 '17 at 7:59
  • $\begingroup$ @J.M. I have edited my question. $\endgroup$
    – Dimitrios
    Aug 17 '17 at 8:47
  • $\begingroup$ So your function is something like $$\sum_k \frac1{\|\mathbf x-\mathbf x_k\|^3}$$ for the $\mathbf x_k$ locations? $\endgroup$
    – J. M.'s torpor
    Aug 17 '17 at 12:10

Is this what you had in mind?

stations = RandomReal[{-2, 2}, {5, 2}];

pow[point_List] := Total[1/Norm[point - #]^3 & /@ stations]

With[{range = 2.5},
  {DensityPlot[Log10@pow[{x, y}], {x, -range, range}, {y, -range, range}, 
     PlotPoints -> 50, Epilog -> {Red, PointSize[0.02], Point@stations}],
   VoronoiMesh[stations, {{-1, 1} range, {-1, 1} range}, PlotTheme -> "Lines"]}

Show[%, Frame -> None]

Mathematica graphics

Note that this is plotting the density of the logarithm of the power, rather than the power itself, because the latter is a very spikey function and would not be very easy to capture a reasonable range. If that's not what you want, remove the Log10@ portion.

  • $\begingroup$ Very cool (+1). $\endgroup$ Aug 17 '17 at 16:59
  • $\begingroup$ @MarcoB, Thank you very much. Is there a way to make the circles rough. I mean they are not perfectly round. Smoothly varying radius and that red points need to be at the centres of respective voronoi cells. And the blue region need to be small. That is each voronoi cell is largely covered by the base stations, only small (20-30%) areas have weaker signal power. $\endgroup$
    – Dimitrios
    Aug 18 '17 at 1:30
  • $\begingroup$ @Dimitrios, shouldn't you 1. already have the mathematical model and reference for that (signal attenuation and everything); and 2. have included those additional assumptions in your question? $\endgroup$
    – J. M.'s torpor
    Aug 18 '17 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.