Anonymous user
Julia set: Difference between revisions
→{{header|C sharp|C#}}
Line 204:
=={{header|C sharp|C#}}==
{{trans|Python}}
<lang csharp>using System.Drawing;
// Note: You have to add the System.Drawing assembly
// (right-click "references," Add Reference, Assemblies, Framework,
// System.Drawing, OK)
using System.Linq;
namespace RosettaJuliaSet
Line 221 ⟶ 222:
const int moveX = 0;
const int moveY = 0;
const double cX = -0.7;▼
▲ double cX = -0.7;
double zx, zy, tmp;
int i;
var colors = (from c in Enumerable.Range(0, 256)
select Color.FromArgb((c >> 5) * 36, (c >> 3 & 7) * 36, (c & 3) * 85)).ToArray();
var bitmap = new Bitmap(w, h);
for (int x = 0; x < w; x++)
{
Line 241 ⟶ 245:
i -= 1;
}
}
}
|