Post Reply 
ppl plots multi-coloured point within a quarter circle
08-31-2024, 07:29 PM
Post: #7
RE: Maurer Rose
(06-30-2021 07:57 PM)C.Ret Wrote:  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.
I am new to the Prime. Came across this old post. Thought I'd give it a try but it is not working for me. It will draw the "pedals" over and over again in multiple colors but the lines are really just the edge of the pedal. There are no crossing (in-fill) lines. I just copied and pasted the code. Calculator is in degrees. The code seems to be copied okay but maybe there is some hidden character code that is messing things up.
I would appreciate your thoughts.
Regards,
Jerry
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Maurer Rose - glfiedler - 08-31-2024 07:29 PM



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