POV-Ray : Newsgroups : povray.general : Tiling hexagons : Re: Tiling hexagons Server Time
30 Jul 2024 22:17:34 EDT (-0400)
  Re: Tiling hexagons  
From: Dan Connelly
Date: 20 Nov 2008 15:40:37
Message: <4925cb45$1@news.povray.org>
SharkD wrote:

> Actually, you were correct to begin with!!!! :) I looked at it again and
> realized the method I described only reproduces the "isometric" pattern of
> intersecting lines (which is sufficient for my needs). To reproduce the actual
> *hexagon* in its entirety you need to take things a step further:

So we're back with sqrt(3)/2 (or 2/sqrt(3)) ?

> Thanks for the tip! I was hoping for an algorithmic approach, but I guess
> there's no real need to go to all that effort.
> 

This is what I did:

% perl -e 'my $fmin = 10; for (my $n = 1; $n < 10000; $n ++) { my $m = int(sqrt(3) / 2
* $n + 0.5); my $f = abs( $m / $n / (sqrt(3) / 2) - 1); if ($f < $fmin) { $fmin = $f;
$n0 = $n; $m0 = $m; printf "%6d %6d %g\n", $n0, $m0, $fmin } }'


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.