Hacker News new | past | comments | ask | show | jobs | submit login

I don't think this has anything to do with directed graphs. The operation looks like this. For nonzero c in C, compute the distance d(a(i+1)/c, Z+iZ) to the nearest Gaussian integer, where a is an integer.

The max distance is A = 1/sqrt(2) so color the point a(1+i)/c proportionally by

  (A - d(a(i+1)/c, Z+iZ))/A
I'm taking a liberty with the description, since computing "the percentage of a(i+1)/c's that are Gaussian integers" is open to interpretation, and if taken literally could mean something else entirely, such as computation of the ratio

  #(A(c,n)\cap Z+iZ) / n
where

  A(c, n) = { a(i+1)/ c : 1 <= a <= n }
which is asking for a proportion products that become Gaussian integers--this is a divisibility test. However, this doesn't show how to vary the brightness of the images.



Applications are open for YC Winter 2022

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: