Lines Matching refs:i
46 for (int i = 0; i < UniverseHeight; ++i) in InitializeUniverse() local
49 T[i][j] = S[i][j] = V[i][j] = ValueType(1.0E-6); in InitializeUniverse()
51 for (int i = 1; i < UniverseHeight - 1; ++i) { in InitializeUniverse() local
54 ValueType t = (ValueType)i / (ValueType)UniverseHeight; in InitializeUniverse()
56 D[i][j] = 1.0; in InitializeUniverse()
62 M[i][j] = 0.125; in InitializeUniverse()
63 L[i][j] = 0.125; in InitializeUniverse()
67 M[i][j] = 0.5; in InitializeUniverse()
68 L[i][j] = 0.6; in InitializeUniverse()
72 M[i][j] = 0.3; in InitializeUniverse()
73 L[i][j] = 0.4; in InitializeUniverse()
75 material[i][j] = m; in InitializeUniverse()
80 for (int i = 0; i < ColorMapSize; ++i) { in InitializeUniverse() local
82 ValueType t = (i - ColorMapSize / 2) * scale; in InitializeUniverse()
90 ColorMap[k][i] = colorizer.get_color(c[2], c[1], c[0]); in InitializeUniverse()
101 for (int i = 1; i < UniverseHeight - 1; ++i) { in InitializeUniverse() local
102 D[i][k] *= d; in InitializeUniverse()
103 D[i][UniverseWidth - 1 - k] *= d; in InitializeUniverse()
144 for (int i = r.StartY(); i < r.EndY(); ++i) { in UpdateStress() local
145 drawing.set_pos(1, i - r.StartY()); in UpdateStress()
148 S[i][j] += M[i][j] * (V[i][j + 1] - V[i][j]); in UpdateStress()
149 T[i][j] += M[i][j] * (V[i + 1][j] - V[i][j]); in UpdateStress()
150 int index = (int)(V[i][j] * (ColorMapSize / 2)) + ColorMapSize / 2; in UpdateStress()
155 color_t* c = ColorMap[material[i][j]]; in UpdateStress()
183 for (int i = r.StartY(); i < r.EndY(); ++i) in UpdateVelocity() local
186 V[i][j] = in UpdateVelocity()
187 D[i][j] * (V[i][j] + L[i][j] * (S[i][j] - S[i][j - 1] + T[i][j] - T[i - 1][j])); in UpdateVelocity()