From Wikipedia, the free encyclopedia
Salut! Vă invit aici să lăsați un mic semn al venirii dumneavoastră pe pagina mea. Mulțumesc anticipat.
daca iti face placere, scrie-mi ce impresie ti-au facut ideile mele de mai jos, de pe acest link vreau sa spun
http://en.wikipedia.org/wiki/Special:Contributions/93.118.212.93
Multumesc, Florin
poti incerca si ideile de pe wiki ro
ok, multumesc frumos de raspuns, in loc de scuze, iata o legatura de pe un site unde postez din cand in cand
http://www.mediapromusic.ro/stiri/4356327-amadeus-sparge-topurile
93.118.212.93 (discuție) 25 decembrie 2013 14:32 (EET)
daca iti place poate mai gasesc si altele :-)
'the program is moving a filled blue cirle randomly, on the screen 'at each frame program writes all screen 12 (640 per 480) pixel 'therefore is a bit slow 'make it rewrite onle the pixels in a square that cntains surely the circle 'for a better speed 'compiled with qb64 enviroment 'another clallenge is to put more than one circle on the screen 'with "XOR" efect on mixing colors 'good luck
'... and a not so cautious solution below
CONST nc = 2 snap = 7
DEFINT A-Z DIM xs(nc), ys(nc), xd(nc), yd(nc) DIM dx(nc), dy(nc), d(nc)
SCREEN 12
RANDOMIZE TIMER FOR i = 1 TO nc
xs(i) = snap * INT(RND * 640 / snap) ys(i) = snap * INT(RND * 480 / snap)
NEXT i
alfa: FOR i = 1 TO nc
xd(i) = snap * INT(RND * 640 / snap) yd(i) = snap * INT(RND * 480 / snap)
NEXT i
d = 0 FOR i = 1 TO nc
dx(i) = ABS(xd(i) - xs(i)): dy(i) = ABS(yd(i) - ys(i)) d(i) = dx(i): IF dy(i) > d(i) THEN d(i) = dy(i) IF d(i) > d THEN d = d(i)
NEXT i
FOR cntr = 0 TO d - 1 STEP 1
' FOR h = 1 TO 2
FOR i = 1 TO nc FOR h = 1 TO 2 myx = xs(i) + (xd(i) - xs(i)) * (cntr + (h - 1) * snap) / d myy = ys(i) + (yd(i) - ys(i)) * (cntr + (h - 1) * snap) / d
myx = snap * INT(myx / snap) myy = snap * INT(myy / snap)
FOR x = myx - 32 TO myx + 32: FOR y = myy - 32 TO myy + 32 dist = (myx - x) * (myx - x) + (myy - y) * (myy - y) IF dist < 900 THEN IF dist < 150 THEN clr = ((14 + i) * SGN(2 * h - 3) + POINT(x, y)) MOD 16 ELSE clr = ((9 - i) * SGN(2 * h - 3) + POINT(x, y)) MOD 16 END IF
ELSE clr = (0 * SGN(2 * h - 3) + POINT(x, y)) MOD 16 END IF
PSET (x, y), clr PSET (y, x), clr
PSET (640 - x, 480 - y), clr PSET (640 - y, 480 - x), clr
PSET (x, 480 - y), clr PSET (y, 480 - x), clr
PSET (640 - x, y), clr PSET (640 - y, x), clr
NEXT y: NEXT x NEXT
NEXT i
' NEXT
NEXT cntr
FOR i = 1 TO nc
xs(i) = xd(i): ys(i) = yd(i)
NEXT i
GOTO alfa
este un mic fisier sursa cu care ai putea sa te joci dupa ce il compilezi, poti face mici modificari , mozaicul este pentru distractie Florin 93.118.212.93 (discuție) 27 ianuarie 2014 11:15 (EET)
SCREEN 12
RANDOMIZE TIMER GOSUB desenare GOSUB corodare GOTO endprog
desenare: FOR y = 50 TO 400
LINE (50, y)-(600, y), 9
NEXT y RETURN
corodare: gasit = 0 FOR x = 5 TO 635
FOR y = 5 TO 475 nrpct = 0 IF POINT(x, y) <> 0 THEN nrpct = nrpct + 1 IF POINT(x + 1, y) <> 0 THEN nrpct = nrpct + 1 IF POINT(x, y + 1) <> 0 THEN nrpct = nrpct + 1 IF POINT(x - 1, y) <> 0 THEN nrpct = nrpct + 1 IF POINT(x, y - 1) <> 0 THEN nrpct = nrpct + 1 IF (nrpct <> 5) OR (50 * INT(x / 50) = x AND 50 * INT(y / 50) = y) THEN clr = RND IF clr < .2 THEN PSET (x, y), 0 IF nrpct <> 0 THEN gasit = 1 END IF NEXT y
NEXT x IF gasit = 1 THEN GOTO corodare RETURN
endprog: Florin, 93.118.212.93 (discuție) 27 ianuarie 2014 13:37 (EET)
Pai...ce sa zic...frumos?! --NonBad 26 iulie 2019 11:49 (EEST)
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.