Graphic performance test : TI-Nspire CX II, NumWorks N0100 & N0110, HP Prime G1 & G2
Top row : HP Prime G1 + HP Prime G2
Bottom row : TI-Nspire CX II CAS + NumWorks N0100 + NumWorks N0110
Mandelbrot fractal using complex numbers.
1st : NumWorks N0110
2nd : NumWorks N0100
3rd : HP Prime G2
4th : HP Prime G1
5th : TI-Nspire CX II CAS
NumWorks code :
from kandinsky import *
def mb(n,w=320,h=222):
for x in range(w):
for y in range(h):
z=0
d=3.5*x/(w-1)-2.5-2.5j*y/(h-1)+1.25j
k=0
while k {less than} n and abs(z) {less than} 2:
k=k+1
z=z*z+d
t=int(255*k/n)
c=color(int(t),int(t*0.75),int(t*0.25))
set_pixel(x,y,c)
HP Prime code :
EXPORT mb(n,w,h) BEGIN
LOCAL x,y,z,d,k,t,c;
FOR x FROM 0 TO w-1 DO
FOR y FROM 0 TO h-1 DO
z:=0;
d:=3.5*x/(w-1)-2.5-2.5**y/(h-1)+1.25*;
k:=0;
WHILE k{less than}n and abs(z){less than}2 DO
k:=k+1;
z:=z*z+d;
END;
t:=IP(255*k/n);
c:=RGB(IP(t),IP(t*0.75),IP(t*0.25));
PIXON_P(x,y,c);
END;
END;
WAIT();
END;