aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs
index 04ac283..aeff730 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs
@@ -34,7 +34,7 @@ namespace libTerrain
34{ 34{
35 partial class Channel 35 partial class Channel
36 { 36 {
37 private double[] coordinatesToPolar(int x, int y) 37 private double[] CoordinatesToPolar(int x, int y)
38 { 38 {
39 39
40 double theta = Math.Atan2(x - (w / 2), y - (h / 2)); 40 double theta = Math.Atan2(x - (w / 2), y - (h / 2));
@@ -48,7 +48,7 @@ namespace libTerrain
48 return coords; 48 return coords;
49 } 49 }
50 50
51 public int[] polarToCoordinates(double r, double theta) { 51 public int[] PolarToCoordinates(double r, double theta) {
52 double nx; 52 double nx;
53 double ny; 53 double ny;
54 54
@@ -78,14 +78,14 @@ namespace libTerrain
78 78
79 public void Polar() 79 public void Polar()
80 { 80 {
81 Channel n = this.copy(); 81 Channel n = this.Copy();
82 82
83 int x, y; 83 int x, y;
84 for (x = 0; x < w; x++) 84 for (x = 0; x < w; x++)
85 { 85 {
86 for (y = 0; y < h; y++) 86 for (y = 0; y < h; y++)
87 { 87 {
88 double[] coords = coordinatesToPolar(x,y); 88 double[] coords = CoordinatesToPolar(x,y);
89 89
90 coords[0] += w / 2.0; 90 coords[0] += w / 2.0;
91 coords[1] += h / 2.0; 91 coords[1] += h / 2.0;
@@ -105,8 +105,8 @@ namespace libTerrain
105 r += incRadius; 105 r += incRadius;
106 theta += incAngle; 106 theta += incAngle;
107 107
108 int[] coords = polarToCoordinates(r,theta); 108 int[] coords = PolarToCoordinates(r,theta);
109 raise(coords[0], coords[1], 20, 1); 109 Raise(coords[0], coords[1], 20, 1);
110 } 110 }
111 } 111 }
112 112
@@ -122,11 +122,11 @@ namespace libTerrain
122 r += incRadius; 122 r += incRadius;
123 theta += incAngle; 123 theta += incAngle;
124 124
125 int[] coords = polarToCoordinates(r, theta); 125 int[] coords = PolarToCoordinates(r, theta);
126 points.Add(new Point2D(coords[0],coords[1])); 126 points.Add(new Point2D(coords[0],coords[1]));
127 } 127 }
128 128
129 voronoiDiagram(points, c); 129 VoronoiDiagram(points, c);
130 } 130 }
131 131
132 public void Spiral(double wid, double hig, double offset) 132 public void Spiral(double wid, double hig, double offset)
@@ -143,7 +143,7 @@ namespace libTerrain
143 map[x, y] += Math.Sin(dx / wid) + Math.Cos(dy / hig); 143 map[x, y] += Math.Sin(dx / wid) + Math.Cos(dy / hig);
144 } 144 }
145 } 145 }
146 normalise(); 146 Normalise();
147 } 147 }
148 } 148 }
149} \ No newline at end of file 149} \ No newline at end of file