Vibrating rectangles: Difference between revisions
Content added Content deleted
(Vibrating rectangles in various BASIC dialents (BASIC256, FreeBASIC and True BASIC)) |
(Added Processing implementation) |
||
Line 875: | Line 875: | ||
<span style="color: #000000;">main</span><span style="color: #0000FF;">()</span> |
<span style="color: #000000;">main</span><span style="color: #0000FF;">()</span> |
||
<!--</lang>--> |
<!--</lang>--> |
||
=={{header|Processing}}== |
|||
<lang java> |
|||
//Aamrun, 3rd July 2022 |
|||
int counter = 100; |
|||
void setup(){ |
|||
size(1000,1000); |
|||
} |
|||
void draw(){ |
|||
for(int i=0;i<20;i++){ |
|||
fill(counter - 5*i); |
|||
rect(10 + 20*i,10 + 20*i,980 - 40*i,980 - 40*i); |
|||
} |
|||
counter++; |
|||
if(counter > 255) |
|||
counter = 100; |
|||
delay(100); |
|||
} |
|||
</lang> |
|||
=={{header|Python}}== |
=={{header|Python}}== |