Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"glxgears" simulacija u konzoli

18 views
Skip to first unread message

Luka Ćavara

unread,
Apr 24, 2012, 7:34:26 AM4/24/12
to
(:


clear;while true; do for ((a=1; a <= $(tput cols); a++)); do tput cup 0 $a;done;for ((b=1; b <= $(tput lines); b++)); do tput cup $b $(tput cols);done; for ((c=$(tput cols); c>=1; c--)); do tput cup $(tput lines) $c;done;for ((d=$(tput lines); d>=1; d--)); do tput cup $d 0;done;done

--
Tko što radi, sebi radi.

disco

unread,
Apr 24, 2012, 8:04:52 AM4/24/12
to
(nadam se da thunderbird nece razvalit)

#!/usr/bin/perl
$r=25; $c=80;
$xr=6;$yr=3;$xc=-0.5;$dw=$z=-4/
100;local$";while($q=$dr=rand()
/7){$w+=$dw;$_=join$/,map{$Y=$_*
$yr/$r;
join"" ,map{$ x=$_*$
xr/$c;($ x,$y)= ($xc+$x
*cos($ w)-$Y* sin$w,$yc+
$x*sin ($w)+$Y*cos
$w);$ e=-1;$ a=$b=0
;($a,$b) =($u-$v+$x,2*$a* $b+$y) while(
$ u=$a*$ a)+($v=$b*$b)<4.5 &&++$e <15;if (($e>$
q&&$e< 15)||($e==$q and rand() <$dr)) {$q=$e;($d0,$d1) =($x,$
y); } chr(+( 32,96,+ 46,45,43,58,73,37 ,36,64
,32)[$ e/1.5] );}(-$ c/2)..($c/2)-1;} (-$r/2
)..($ r/2)-1;select$", $",$", 0.015; system
$^O=~m ~[wW]in~x?"cls": "clear";print ;$xc=(
$d0+15 *$xc)/16;$yc=($ d1+15*$yc)/ 16;$_*=
1+$z for $xr,$yr;$dw *=-1 if rand
()<0.02; (++$i%110 )||($z*=-1)}

--
while (!sleep) {
++sheep;
}

Matija Nalis

unread,
Apr 24, 2012, 2:47:59 PM4/24/12
to
On Tue, 24 Apr 2012 13:34:26 +0200, Luka Ćavara <lca...@zg.htnet.hrREMOVE_THIS> wrote:
> clear;while true; do for ((a=1; a <= $(tput cols); a++)); do tput cup 0 $a;done;for ((b=1; b <= $(tput lines); b++)); do tput cup $b $(tput cols);done; for ((c=$(tput cols); c>=1; c--)); do tput cup $(tput lines) $c;done;for ((d=$(tput lines); d>=1; d--)); do tput cup $d 0;done;done


A zar je toliko tesko bilo napraviti da radi u standardnom SHellu?

--
Opinions above are GNU-copylefted.

Luka Ćavara

unread,
Apr 25, 2012, 1:54:01 AM4/25/12
to
Ne znam, godinama radim samo u bashu, sh mi ne da da šećem po history s tipkama 'gore' 'dolje', a ne bih htio biti bez toga.


--
Tko god što radi, sebi radi.

Mladen Gogala

unread,
Apr 26, 2012, 12:01:15 AM4/26/12
to
On Tue, 24 Apr 2012 20:47:59 +0200, Matija Nalis wrote:


> A zar je toliko tesko bilo napraviti da radi u standardnom SHellu?

A sto bi to trebalo biti? Standardni Bourne Shell se vec odavno ne
koristi. Sada se koriste Bourne Supremacy, Bourne Ultimatum i Bounrne
Legacy.



--
http://mgogala.byethost5.com

mimix

unread,
Apr 26, 2012, 2:19:32 PM4/26/12
to
On 2012-04-26, Mladen Gogala wrote:
> On Tue, 24 Apr 2012 20:47:59 +0200, Matija Nalis wrote:
>
>
>> A zar je toliko tesko bilo napraviti da radi u standardnom SHellu?
>
> A sto bi to trebalo biti? Standardni Bourne Shell se vec odavno ne
> koristi. Sada se koriste Bourne Supremacy, Bourne Ultimatum i Bounrne
> Legacy.

Python.


--
Milan Mimica
http://sparklet.sf.net
0 new messages