Post Reply 
ppl plots multi-coloured point within a quarter circle
06-30-2021, 07:57 PM (This post was last modified: 07-01-2021 05:07 AM by C.Ret.)
Post: #2
RE: ppl plots multi-coloured point within a quarter circle
Hi,

You program not particularly spectacular miss a bit a dynamic and colorfull animation.
Here is a better example to demonstrate HP Prime capapilities to new users:


EXPORT MAURER(N,D)
BEGIN
LOCAL I,K,R,X,Y,U:=160,V:=120; LOCAL r,g,b,T;
// -------------------------- Black background
RECT_P(RGB(0,0,0));
// ++++++++++++++++++++++++++ MAIN LOOP
FOR I FROM 0 TO 360*30 DO
// -------------------------- Compute Coordinates
π*I*D/180▶K; 120*SIN(N*K)▶R; 160+R*COS(K)▶X; 120-R*SIN(K)▶Y;
// -------------------------- Color's Kaliodoscope schema
140+115*SIN(π*I/180)▶r; 140+115*SIN(π*I/120)▶g; 140+115*SIN(π*I/ 72)▶b;
// ------------------------- Draw full-colored roses
LINE_P(U,V,X,Y,RGB(r,g,b,92));
X▶U;Y▶V;
// ------------------------- Adjust speed for smooth animation
TICKS▶T;WHILE TICKS-T<60 DO END;
END;
// ++++++++++++++++++++++++++ FREEZE END
FREEZE;
END;


It is base on Maurer Rose drawings in varing colors as well as graphics by playing with periodic functions.
   
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: ppl plots multi-coloured point within a quarter circle - C.Ret - 06-30-2021 07:57 PM
RE: Maurer Rose - glfiedler - 08-31-2024, 07:29 PM



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