we draw 5D relief creating a random array of heights
on QB64 in 5 minutes and plus in an hour
beauty and versatility
[ You are not allowed to view this attachment ]
' 5d relief and array
LINE (50+20*x
+20*y
, 400-20*y
-a
(x
,y
))-(50+20*(x
+1)+20*y
, 400-20*y
-a
(x
+1,y
)), y
LINE (50+20*x
+20*y
, 400-20*y
-a
(x
,y
))-(50+20*(x
+1)+20*y
, 400-20*(y
+1)-a
(x
,y
+1)), x
on C# pendulum program is used
because of what remained incomprehensible lines about timer
and random function depends on outside / inside cycles
and to understand another program created random
how to clear screen is still unclear and builds slowly
and it is unclear how to set color of lines by variables
[ You are not allowed to view this attachment ]
still as task manager shows
simple C# program or array fills memory
and only at end does memory clear line save
//RELIEF
class RELIEF
{
Form form;
{
var p = new RELIEF();
}
public RELIEF()
{
form
= new Form
() { Text
= "RELIEF", Width = 600, Height
= 360 };
{
// heights
{
}
// parallels X
{
{
var x1 = 50 + 20*x + 20*y;
var y1 = 300 - 20*y - a[x,y];
var x2 = 50 + 20*(x+1) + 20*y;
var y2 = 300 - 20*y - a[x+1,y];
Bitmap dblBuffer
= new Bitmap
(form.
Width, form.Height
);
Graphics g = Graphics.FromImage(dblBuffer);
Graphics f = Graphics.FromHwnd(form.Handle);
g.DrawLine
(Pens.Red
, new
Point(x1
, y1
), new
Point(x2
, y2
));
f.DrawImage
(dblBuffer
, new
Point(0, 0));
}
}
// parallels Y
{
{
var x1 = 50 + 20*x + 20*y;
var y1 = 300 - 20*y - a[x, y];
var x2 = 50 + 20*(x+1) + 20*y;
var y2 = 300 - 20*(y+1) - a[x, y+1];
Bitmap dblBuffer
= new Bitmap
(form.
Width, form.Height
);
Graphics g = Graphics.FromImage(dblBuffer);
Graphics f = Graphics.FromHwnd(form.Handle);
g.DrawLine
(Pens.Red
, new
Point(x1
, y1
), new
Point(x2
, y2
));
f.DrawImage
(dblBuffer
, new
Point(0, 0));
}
}
Array.
Clear(a
, 0, 22);
// clears memory
};
}
}
besides C# pendulum is C # diagonal simpler
and no other C# program is included
so as in basic: 1 file = 1 program
that's why my given 5D relief program is important.
drawing at least something predictable
and at same time we study nested loops
and I'm still looking for compilable graphics programs:
1 file = 1 program
1bas=1exe & 1cs=1exe
and already created studies about strings