mandelbrot_nap0.py

Created by vnap0v

Created on May 16, 2025

309 Bytes

There is a official Numworks Mandelbrot script. This is a different version made from scratch. Uses the library kandinsky. Tested on the calculator using software version 23.2.6.


from kandinsky import *
for x in range(320):
  re=x/319*3.5-2.5
  for y in range(210):
    im=y/219*2.5-1.25 
    c=complex(re,im)
    z=0
    i=0
    while abs(z)<2 and i<64:
      z=z**2+c
      i+=1
    r=(i % 64)*4
    g=(i % 32)*8
    b=(i % 16)*16
    set_pixel(x,y,color(r,g,b))

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.