julia.py

Created by vnap0v

Created on May 16, 2025

268 Bytes

This code displays the Julia set. It uses the kandinsky module. Tested on the calculator using software version 23.2.6.


from kandinsky import *
c=complex(-0.5125,0.5213)
for x in range(320):
  re=(x-160)/160*1.5
  for y in range(210):
    im=(y-105)/105
    z=complex(re,im)
    i=256
    while abs(z)<2 and i>0:
      z=z**2+c
      i-=1
    set_pixel(x,y,color(i,i,i))
    

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.