Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.algorithms > #322
| From | Nobody <nobody@nowhere.com> |
|---|---|
| Subject | Re: Honeycomb tiling algorithm |
| Date | 2011-08-12 04:48 +0100 |
| Message-Id | <pan.2011.08.12.03.48.24.965000@nowhere.com> |
| Newsgroups | comp.graphics.algorithms |
| References | <d5862864-f381-40c1-bc3e-8920730e772b@l11g2000prh.googlegroups.com> <pan.2011.08.11.07.30.19.442000@nowhere.com> <1a14f688-70fb-45c2-a5c9-756b50bbc54a@b11g2000prh.googlegroups.com> |
| Organization | Zen Internet |
On Thu, 11 Aug 2011 12:48:06 -0700, Tiron wrote:
> We are actually trying to use this in a vector scenario. So we can
> specify sub-pixel coordinates as points in the vector coordinate
> system. And the tiles will get rasterized with anti-aliasing when we
> do a pattern fill.
>
> Given that, to produce a perfect equilateral honeycomb pattern using
> only a single tile rendered over and over again across the screen,
> what would the formula be to calculate each point on the honeycomb
> shape. Additionally, to make sure it is a perfect honeycomb shape,
> what kind of requirements would I need to have on the tile sizes?
The vertices of a unit hexagon are:
(1,0), (1/2,s), (-1/2,s), (-1,0), (-1/2,-s), (1/2,-s)
where s = sin(pi/3) = sqrt(3)/2 ~= 0.866
Its bounding box has a width of 2 and a height of 2s = sqrt(3) ~= 1.732.
A honeycomb pattern has 3 axes of translational symmetry:
(-3/2,s), (-3/2,-s), (0,2s)
[These are the edges of an inscribed hexagram.]
For parallelogram tessellation, you can choose any two of these for the
tiling grid. For rectangular tesselation, add the first two together (so
that each tile has twice the area of a hexagon) to give:
(-3,0), (0,2s)
I.e. the tiling grid will consist of rectangles 3 units wide and
sqrt(3) ~= 1.732 units high.
The tiles will look something like:
+--------------------+
| o------o |
| / \ |
| / \ |
|o o------|
| \ / |
| \ / |
+--------------------+
Back to comp.graphics.algorithms | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Honeycomb tiling algorithm Tiron <weston17@gmail.com> - 2011-08-10 14:55 -0700
Re: Honeycomb tiling algorithm Nobody <nobody@nowhere.com> - 2011-08-11 08:30 +0100
Re: Honeycomb tiling algorithm Tiron <weston17@gmail.com> - 2011-08-11 12:48 -0700
Re: Honeycomb tiling algorithm Nobody <nobody@nowhere.com> - 2011-08-12 04:48 +0100
Re: Honeycomb tiling algorithm Kaba <kaba@nowhere.com> - 2011-08-12 01:23 +0300
csiph-web