art with code

2008-12-08

Distorted hex


Perspective projection gone horribly wrong. The gist of it is

cylinderProjection r (x, y) =
(mx * 200/z, my * 200/z)
where mx = r * sin (x/r)
my = y
z = 300 + r + r * cos (x/r)

Here the source: distorted_hex.hs

No comments:

Blog Archive