Post Reply 
Wow tried putting this program in the HP Guide:
05-19-2019, 02:57 PM
Post: #4
RE: Wow tried putting this program in the HP Guide:
How about 10 of them?

Code:

local x1:=160, x2:=299, x3:=21;
local y1:=0, y2:=240, y3:=240;
local xn:=160, yn:=0;
local a, b, color;

EXPORT Sierpinski()
BEGIN
  RECT();
  FOR N FROM 1 TO 10 DO
    FOR a FROM 1 TO 10000 STEP 1 DO
      b:=RANDINT(2)+1;
     CASE
       IF b=1 THEN xn:=(xn+x1)/2; yn:=(yn+y1)/2;END;
       IF b=2 THEN xn:=(xn+x2)/2; yn:=(yn+y2)/2;END;
       IF b=3 THEN xn:=(xn+x3)/2; yn:=(yn+y3)/2;END;
     END; 
     color:=RGB(255-a/40,0,a/40);
     PIXON_P(IP(xn),IP(yn),color);
    END;
    WAIT(2);
  END;  
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Wow tried putting this program in the HP Guide: - DrD - 05-19-2019 02:57 PM



User(s) browsing this thread: 1 Guest(s)