The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Colourful Polygon Explorer
05-20-2021, 01:59 AM
Post: #1
Colourful Polygon Explorer
Use the cursor to play with some polygons, feel free to improve this and play with it:

Code:
EXPORT pOLYcOL()
BEGIN
    LOCAL COORD:={};
    LOCAL COL:={};
  LOCAL J,K,S;

  S:=0;  
  COL(1):=RGB(255,0,0,0);
  COL(2):=RGB(255,255,0,0);
  COL(3):=RGB(0,255,0,0);
  COL(4):=RGB(0,255,255,0);
  COL(5):=RGB(0,0,255,0);
  COL(6):=RGB(255,0,255,0);
  COL(7):=RGB(0,0,0,0);
  J:=60;
  K:=0;
  L:=6;
   REPEAT

  J:=360/L;
RECT_P(0,0,320,240,0);
   FOR T FROM 0 TO 6 DO
      FOR A FROM 0 TO L DO
          COORD(A+1,1):=160-(120-16*T)*Cos(J*A+K);
          COORD(A+1,2):=120-(120-16*T)*Sin(J*A);
      END;
       FILLPOLY_P(G0,COORD,COL(T+1),0);
   END; 
 REPEAT

  IF ISKEYDOWN(7) THEN L:=L-1;S:=1; END;
  IF ISKEYDOWN(8) THEN L:=L+1;S:=1; END;
  IF ISKEYDOWN(2) THEN K:=K-1;S:=1; END;
  IF ISKEYDOWN(12) THEN K:=K+1;S:=1; END;
  IF L<3 THEN L:=3 END;
  IF ISKEYDOWN(4) THEN BREAK(3); END;
  UNTIL S=1;
  S:=0;
UNTIL 0;
END;


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Colourful Polygon Explorer - matalog - 05-20-2021 01:59 AM
RE: Colourful Polygon Explorer - matalog - 05-20-2021, 03:24 PM



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