ppl plots multi-coloured point within a quarter circle
06-24-2021, 04:40 AM
Post: #1
 Liamtoh Resu Member Posts: 116 Joined: May 2021
ppl plots multi-coloured point within a quarter circle
This program demonstrates plotting different coloured point within a quarter circle.

It clears the screen, sets up local variables, uses a for loop, used the RANDINT
function to generate numbers for colours and points. It then plots the points
using the PIXon_P command for each cycle of the for loop.
The FREEZE commpands pauses the screen. Press Esc to exit the programs.

I thought some new users could benefit from seeing this program.

Code:
 // qtrcrc02 plots a quarter circle // with different coloured points EXPORT qtrcrc02() BEGIN print; // clear the text screen rect(); // clear the graphics screen local i,m; local x,y,z; local a,b,c; m := 65000; z := 208*208; for i from 1 to m do x := randint(0,208); y := randint(0,208); a := randint(0,255); b := randint(0,255); c := randint(0,255); if x*x+y*y <= z then pixon_p(x,y,rgb(a,b,c)) end; END; freeze; end;

Thanks.
 « Next Oldest | Next Newest »

 Messages In This Thread ppl plots multi-coloured point within a quarter circle - Liamtoh Resu - 06-24-2021 04:40 AM RE: ppl plots multi-coloured point within a quarter circle - C.Ret - 06-30-2021, 07:57 PM RE: ppl plots multi-coloured point within a quarter circle - Liamtoh Resu - 06-30-2021, 09:21 PM RE: ppl plots multi-coloured point within a quarter circle - matalog - 06-30-2021, 11:32 PM RE: ppl plots multi-coloured point within a quarter circle - Liamtoh Resu - 07-01-2021, 04:33 AM RE: ppl plots multi-coloured point within a quarter circle - C.Ret - 07-01-2021, 05:20 AM

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