# Designing the Uniform Stochastic Photomatrix Therapeutic Systems
## 3 Construction and Results
### Features of Designing the Stochastic Programmable Tools  
In the previous subsection, it was found that to create a uniform random plane, the independent generation of random variables along the axes of the Descartes coordinates in the photomatrix is not sufficient. In this case, the effect of an algorithmic dependence of the generated sequences of random variables may occur. Thus, let us indicate below the concept of a random plane.  
Usually, in analytical geometry, a random arrangement of a plane in three-dimensional space is understood to mean a variation of its equation \(Ax+By+Cz+D=0\) with respect to the coefficients \(A\), \(B\), \(C\) and \(D\). However, this definition is suitable only for the geometric arrangement of the plane [53; 54; 55; 56; 57; 58; 59], and such an approach is not enough for the complete characterization of stochastic planes. The reason for this is that in such a generalized geometric definition there is no main Descartes characteristic of the plane, which is due to the fact that two of its properties have to be provided on a discrete uniform plane:  
- the discrete grid of the Descartes plane must contain all points in its nodes;  
- each point is unique and represented once only.  
Next, the Descartes plane could be labeled as stochastic if a topological (meaning logically connected) transition from one point to another can be performed randomly. In [49] the generator _nsDeonYuliPlaneTwist32D_ was introduced to create all the stochastic uniform sequences without skipping or repeating the elements. All cells of the grid are taken into account, and the aforementioned property is fully satisfied. Figure 7 shows how the possible transitions between points along a stochastic path are performed. It should be noted that Figure 7 demonstrates only one of the possible ways to implement the transition process, although in reality they may reach over several thousand.  
As an example, in the program code _DMP0103_, it is shown how to organize and create such a generation for a square photomatrix with a size of \(N\times N=8\times 8\) cells. Such a small range is selected only for visual presentation in this article, but for the real task the range of construction \(N\times N\) could be chosen for any size.  
using nsDeonYuliPlaneTwist32D; //plane twist generator namespace DMP@103 { class CDMP@103  { static void Main(string[[] args)  { cDeonYuliPlaneTwist32D TP =  new cDeonYuliPlaneTwist32D();  int w = 3; // random number bit length  int N = 1 << w; // track length  TP.SetW(w);  TP.Start(); // generator start  Console.WriteLine(\"w = {0} N = {1}\", w, N);  int[[,] A = new int[N, N]; // result matrix  for (int i = 0; i < N; i++)  for (int j = 0; j < N; j++) A[i, j] = 0;  uint u = 0; // point job coordinates on plane  uint v = 0;  for (int i = 0; i < N; i++)  
Figure 7: (**A**) A random track and (**B**) a possible set of tracks for one complete stochastic matrix.  
for (int j = 0; j < N; j++)  { TP.Next(ref u, ref v); // point on grid  A[u, v]++; // generation counter for <u,v>  }  Console.WriteLine(\"Matrix A\");  for (int i = 0; i < N; i++)  { for (int j = 0; j < N; j++)  Console.Write(\"{0,4}\", A[i, j]);  Console.WriteLine();  }  Console.ReadKey(); // result viewing  }  }  After starting this program, the result of generation appears in the following form.  
w = 3 N = 8  Matrix A  1 1 1 1 1 1 1 1  1 1 1 1 1 1 1  1 1 1 1 1 1 1  1 1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1  1 1 1 1 1 1 1 1  This printout confirms that in matrix \(A\) each point source of cell grid (or LED, in the context of PMTS construction) is randomly turned on exactly once, ensuring the property of uniformity over the entire plane. It is necessary to obtain exactly this result for software applications that target the stochastic design of PMTS. In our case we have just achieved it.