POV-Ray : Newsgroups : povray.general : Tiling hexagons : Re: Tiling hexagons Server Time
30 Jul 2024 16:16:45 EDT (-0400)
  Re: Tiling hexagons  
From: Trevor G Quayle
Date: 20 Nov 2008 12:00:01
Message: <web.492597351539762d81c811d20@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> I want to create an image of hexagons that is tilable (such as a Desktop image).
> However, I don't think it's possible to create a rectangular image with the
> correct width/height ratio due to the odd angles. What's the best way to go
> about doing this?
>
> -Mike

If I understand you correctly:

The ratio of width/height of a hexagon is (2 x cos(60) + 1)/(2 x sin(60) ~1.732
You can use this ratio or multiple to base your image size/resolution on
eg: 600 x 520
Due to rounding and that pixels need to be integers there is a slight
distortion, but it shouldn't be noticeable (actual size 600 x 519.6152, image
width is only 0.074% larger)

-tgq


Post a reply to this message

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