04-16-2016, 05:18 PM
Hello,
This morning I decided to graph arg of Zeta function.
Let me share with you how I easily build it thanks to hpprime with few line of program.
I wanted to see how Zeta function were extended to complex numbers in HpPrime.
Idea came from a picture from this video.
Ok, let's start.
To do this, I first had to create a function that would return a color from a number from [-pi ; -pi]
this function will take the argument, and will return a color.
for that I made a small program : a2c
and here is how R,G and B will be computed with this function :
Next I needed to "see" it working with the full complex plan.
it gives that :
and I just need to made few change to get the Zeta :
that gives :
note : on real calc, it takes about 7 minute to draw it, and at the end the calc will probably switch off (depending on your TOff).
note : CK "monitor" feature does not really respect colors displayed on real calc, I had to copy programs to virtual calc to have nice screen capture.
Regards,
primer.
This morning I decided to graph arg of Zeta function.
Let me share with you how I easily build it thanks to hpprime with few line of program.
I wanted to see how Zeta function were extended to complex numbers in HpPrime.
Idea came from a picture from this video.
Ok, let's start.
To do this, I first had to create a function that would return a color from a number from [-pi ; -pi]
this function will take the argument, and will return a color.
for that I made a small program : a2c
Code:
EXPORT a2c(A)
BEGIN
LOCAL R,G,B;
R:=127*(SIN(A)+1);
G:=127*(COS(A)+1);
B:=127*(SIN(A+π)+1);
RETURN RGB(R,G,B);
END;
Next I needed to "see" it working with the full complex plan.
Code:
EXPORT testc()
BEGIN
LOCAL M:=40,P:=100;
FOR X FROM −M TO M DO
FOR Y FROM −M TO M DO
IF X≠0 OR Y≠0 THEN
PIXON_P(X+P+M,Y+P+M,
a2c(ARG(X+i*Y)));
END;
END;
END;
FREEZE;
END;
and I just need to made few change to get the Zeta :
Code:
EXPORT testz()
BEGIN
LOCAL M:=40,P:=100,Q:=10,K;
FOR X FROM −80 TO 15 DO
FOR Y FROM −40 TO 40 DO
K:=approx(CAS.Zeta((X+i*Y)/Q));
IF K≠0 THEN
PIXON_P(X+P+M,Y+P+M,
a2c(ARG(K)));
END;
END;
END;
FREEZE();
WAIT();
END;
note : on real calc, it takes about 7 minute to draw it, and at the end the calc will probably switch off (depending on your TOff).
note : CK "monitor" feature does not really respect colors displayed on real calc, I had to copy programs to virtual calc to have nice screen capture.
Regards,
primer.