Картинки
с фрагментом кода -
Можете попытаться получить еще красивее... |
|
PROGRAM pi;
USES CRT,GRAPH,DOS;
VAR
R,M,S,X,Y,I,J,T : INTEGER;
Q : ARRAY [1..10,1..10] OF integer ;
PI,PI1,CH,CH1: STRING;
GraphDriver,GraphMode:INTEGER ;
BEGIN
PI:='31415926535897932384
6264338327950288419716939
9375105820974944
592307816406286208
99886280348253 42117067';
GraphDriver:= Detect;
InitGraph(GraphDriver,GraphMode,'');
SETLINESTYLE(0,0,1);
SETFILLSTYLE(1,0) ;
settextstyle(1,0,4) ;
BAR(0,0,640,480) ;
SETFILLSTYLE(1,7) ;
Y:=40 ; M:=30 ; S:=3 ; i:=1 ; j:=1 ;
REPEAT
X:=120 ; I:=1;
REPEAT
SETFILLSTYLE(1,6) ;
BAR(X,Y,X+M,Y+M) ;
SETFILLSTYLE(1,15);
PI1:=COPY(PI,((J-1)*10+I),1);
VAL(PI1,Q[j,i],T);
BAR(X,Y,(X+3*Q[J,I]),Y+M);
X:=X+M+S; i:=i+1 ;
UNTIL I>10 ;
Y:=Y+M+S ; j:=j+1 ;
UNTIL J>10 ;
ch1:=readkey;
end.
|
|
xmax = 730
ymax = 530
sc = 0.025
For y = 1 To ymax Step ss
For x = 1 To xmax Step ss
s1 = Sin(x * sc): c1 = Cos(x * sc): s2 = Sin(y * sc): c2 = Cos(y * sc)
a1 = Sin(s1) * (s2 - c1)
a2 = Cos(c2) * (c1 - s2)
b1 = Abs(a2 - a1)
If b1 > 0 Then
red = b1 * 300 Mod 255
green = b1 * 200 Mod 255
blue = b1 * 400 Mod 255
Else
red = 255: green = 255: blue = 255
End If
Col = RGB(red, green, blue)
If ss > 1 Then Line (x + 50, y)-Step(ss, ss), Col, BF
If ss = 1 Then PSet (x + 50, y), Col
Next x
Next y
|
|
xmax = 730
ymax = 530
sc = 0.07
For y = 1 To ymax Step ss
For x = 1 To xmax Step ss
xx = (x - xmax / 2) * sc: yy = (y - ymax / 2) * sc
a = 10 * (Cos(8) * Atn(100 * yy / (xx + 15.35))) * (Sin(((xx + 15) ^ 2 + yy ^ 2) ^ 0.5)) _
* Sin(((xx - 15) ^ 2 + (yy - 15) ^ 2) ^ 0.5) * Cos(8) * Atn((100 * yy + 5.5) / (xx +
0.35))
b1 = Abs(a)
If b1 > 0.07 Then
'b1 = Abs(b1)
red = b1 * 3000 Mod 255
green = b1 * 1000 Mod 255
blue = b1 * 2000 Mod 255
Else
red = 255: green = 255: blue = 255
End If
Col = RGB(red, green, blue)
If ss > 1 Then Line (x + 50, y)-Step(ss, ss), Col, BF
If ss = 1 Then PSet (x + 50, y), Col
Next x
Next y
|
|
M = 0.25
Line (0, 0)-(xmax, ymax), RGB(192, 192, 192), BF
For x = 1 To xmax Step ss
For Y = 1 To ymax Step ss
XX = x * M: YY = Y * M
RR = Sqr((XX - 40) ^ 2 + (1.5 * YY - 70.5) ^ 2)
AA = Atn((XX - 40) / (YY - 70.5))
Col = RGB(255 * Sin((AA + RR / 10) * 1) ^ 2, 255 * (Sin((AA - RR / 20) * 3)) ^ 2, 255 *
Cos((AA + RR / 10) * 1) ^ 2)
If ss > 1 Then Line (x, Y)-Step(ss, ss), Col, BF
If ss = 1 Then PSet (x, Y), Col
Next Y
Next x |
Картинка при сжатии ухудшилась, щелкните по ней
для просмотра, она стоит того. Рассмотрите ее
внимательно! Этот алгоритм знали только 2
человека в мире - автор галереи на http://www.peda.com/grafeq/gallery/threesome.html
(у него покрасивее даже) и я. Вы - третий :) |
xmax = 730
ymax = 530
sc = 0.1
For y = 1 To ymax Step ss
For x = 1 To xmax Step ss
xx = (x - xmax / 2) * sc: yy = (y - ymax / 2) * sc
a = 5000 * (Cos(8) * Atn(1 * yy / (xx - 15.353))) _
* Cos(8) * Atn((1 * (yy + 15)) / (xx + 15.333)) _
* Cos(8) * Atn((1 * (yy - 15)) / (xx + 0.353)) _
* (Sin(((xx + 15) ^ 2 + yy ^ 2) ^ 0.5)) _
* (Sin((xx ^ 2 + (yy + 15) ^ 2) ^ 0.5)) _
* Sin(((xx - 15) ^ 2 + (yy - 15) ^ 2) ^ 0.5)
b1 = a
If (b1 < 0 And b1 > -2.5) Or b1 > 2.5 Then
b1 = Abs(b1)
red = b1 * 5.5 Mod 255
green = b1 * 5.5 Mod 255
blue = b1 * 5.5 Mod 255
Else
red = 255: green = 255: blue = 255
End If
Col = RGB(red, green, blue)
If ss > 1 Then Line (x + 50, y)-Step(ss, ss), Col, BF
If ss = 1 Then PSet (x + 50, y), Col
Next x
Next y |
"День и ночь" - подражание
гравюре Мориса Эшера
Cравните... |
sc = 0.075
For y = 1 To ymax Step ss
For x = 1 To xmax Step ss
s1 = Sin(x * sc): c1 = Cos(x * sc): s2 = Sin(y * sc): c2 = Cos(y * sc)
a1 = x * sc * Sin(s1) * (s2 - c1)
a2 = y * sc * Cos(c2) * (c1 - s2)
b1 = a2 - a1
If b1 > -10 Then
b1 = Abs(b1)
red = b1 * 7.5 Mod 255
green = b1 * 6# Mod 255
blue = b1 * 4.5 Mod 255
Else
red = 255: green = 255: blue = 255
End If
Col = RGB(red, green, blue)
If ss > 1 Then Line (x + 50, y)-Step(ss, ss), Col, BF
If ss = 1 Then PSet (x + 50, y), Col
Next x
Next y |
Эротический этюд ;)
|
Cls
pi = 4 * Atn(1)
scal = 15
a = 140
For l = 0 To 180 Step ss
For t = 0 To 360 Step 0.25
tt = t * pi / 180
x = a * Cos(tt) ^ 2 + l * Cos(tt)
y = a * Cos(tt) * Sin(tt) + l * Sin(tt)
xx = x / 4000: yy = y / 4000
k = (xx * xx + yy * yy - a * xx) ^ 2 - l ^ 2 * (xx ^ 2 + yy ^ 2)
red = Abs(254 - 12.75 * k) Mod 255
green = Abs(254 - 13 * k) Mod 255
blue = Abs(255 - 13.25 * k) Mod 255
Col = RGB(red, green, blue)
If ss > 1 Then Line (x + 190, y + 250)-Step(ss, ss), Col, BF
If ss = 1 Then PSet (x + 190, y + 250), Col
Next t
Next l
|
Так выглядит работа тетон-тягового двигателя
(внизу эпицентр), если есть еще чудаки, не
знакомые с ними, то им сюда >>>>>
|
xmax = 730
ymax = 530
sc = 0.3
For y = 1 To ymax Step ss
For x = 1 To xmax Step ss
xx = (x - xmax / 2) * sc: yy = (y - ymax / 2) * sc
b1 = 70 * (Sin(((xx + 15) ^ 2 + yy ^ 2) ^ 0.5) _
+ Sin((xx ^ 2 + (yy + 15) ^ 2) ^ 0.5) _
+ Sin(((xx - 15) ^ 2 + (yy - 15) ^ 2) ^ 0.5))
If (b1 < 0 And b1 > -60) Or b1 > 0 Then
b1 = Abs(b1)
red = b1 * 2.5 Mod 255
green = b1 * 5.5 Mod 255
blue = b1 * 7.5 Mod 255
Else
red = 255: green = 255: blue = 255
End If
Col = RGB(red, green, blue)
If ss > 1 Then Line (x + 50, y)-Step(ss, ss), Col, BF
If ss = 1 Then PSet (x + 50, y), Col
Next x
Next y |
|