Voronoi fishing net fractal

Posted: August 30, 2012 in Uncategorized

Another creative fractal design: this time using layered Voronoi patterns:

(show (let [voronoi1 (voronoi :points 32)]
  (fractal
    :while (v- 0.97 (voronoi-function
             (v- 1 (v* (vdivide (v- y x) y) (vdivide (v- z x) z)))
    :voronoi voronoi1))
    :update (v+ (v* pos 2) pos)
    :result (vdivide 3 (v+ 3 'i))
    :max-iterations 4)) 512 512)

 

Tricks used here:

  • Using the :while condition to bailout early if a white area is hit
  • Scaling the position vector on each iteration to give the effect of being further away from rear layers – this is the  (v+ (v* pos 2) pos) part
  • Making the resulting colour darker on each iteration – this is the (vdivide 3 (v+ 3 ‘i)) part which tends towards zero as i increases.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s