![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Trevor G Quayle" <Tin### [at] hotmail com> wrote:
> So it depends on how you intend to map you pattern. Usually desktop tiling
> doesn't mirror so you would want tne first ratio for a directly tileable
> pattern. I hope this clarifies things a bit.
>
> -tgq
Duh. That's what I get for not getting any sleep last night. :) Yes, I was
mirroring everything, which does not work on desktops or web pages. Doubling
the width (or the height) of the green box makes it so that it works without
mirroring.
-Mike
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"SharkD" <nomail@nomail> wrote:
> "Trevor G Quayle" <Tin### [at] hotmail com> wrote:
> > So it depends on how you intend to map you pattern. Usually desktop tiling
> > doesn't mirror so you would want tne first ratio for a directly tileable
> > pattern. I hope this clarifies things a bit.
> >
> > -tgq
>
> Duh. That's what I get for not getting any sleep last night. :) Yes, I was
> mirroring everything, which does not work on desktops or web pages. Doubling
> the width (or the height) of the green box makes it so that it works without
> mirroring.
>
> -Mike
Duh again. Only doubling the height works. Time for bed. :)
-Mike
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"SharkD" <nomail@nomail> wrote:
> "SharkD" <nomail@nomail> wrote:
> > "Trevor G Quayle" <Tin### [at] hotmail com> wrote:
> > > So it depends on how you intend to map you pattern. Usually desktop tiling
> > > doesn't mirror so you would want tne first ratio for a directly tileable
> > > pattern. I hope this clarifies things a bit.
> > >
> > > -tgq
Here's what it looks like:
http://img262.imageshack.us/img262/5598/tileablehexagon3rm8.png
-Mike
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Now that I know the aspect ratio, I just have to do some more trig and figure
out the area of the scene to render. What I've actually done is create a
horizontal plane with a checker pattern and rotate the camera so that the
checker pattern appears to cross at 60 and 120 degree angles. This probably
just involves reversing the camera transformations.
-Mike
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"SharkD" <nomail@nomail> wrote:
> Now that I know the aspect ratio, I just have to do some more trig and figure
> out the area of the scene to render. What I've actually done is create a
> horizontal plane with a checker pattern and rotate the camera so that the
> checker pattern appears to cross at 60 and 120 degree angles. This probably
> just involves reversing the camera transformations.
>
> -Mike
Alright! Here's a simple scene that shows everything in action. Simply render at
97x56 pixels or one of the other resolutions that fit the aspect ratio. You'll
notice there's no hexagons. That's because I was aiming for a grid of diamonds,
but with the same angles as hexagons or equilateral triangles.
#include "math.inc"
camera
{
#local CameraDistance = 10;
#local ScreenArea = sqrt(2*pow(1,2));
#local AspectRatio = image_width/image_height;
orthographic
location -z*CameraDistance
direction z*CameraDistance
right x*ScreenArea
up y*ScreenArea/AspectRatio
rotate x*asind(tand(30))
rotate y*45
}
plane
{
y,0
texture
{
pigment
{
checker color rgb 0, color rgb 1
}
finish
{
ambient 1
}
}
scale 1
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
SharkD wrote:
> Alright! Here's a simple scene that shows everything in action.
Ahh! I understand. I had thought this had something to do with the hexagon
pattern..... using image maps to fill each of the three reference hexagons.
This reminds me of the issue of finding orthogonal basis vectors for hexagonal
crystals. But of course it's the same thing.
Dan
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Dan Connelly <djc### [at] yahoo com> wrote:
> SharkD wrote:
>
> > Alright! Here's a simple scene that shows everything in action.
>
> Ahh! I understand. I had thought this had something to do with the hexagon
pattern..... using image maps to fill e
ach of the three reference hexagons.
>
> This reminds me of the issue of finding orthogonal basis vectors for hexagonal
crystals. But of course it's the same
thing.
>
> Dan
I forgot to implement your tip of using the exact camer aspect ratio of
2*cos(pi/6)/1. Here's the corrected code. Thanks again for your help?
camera
{
#local CameraDistance = 10;
#local ScreenArea = sqrt(2*pow(1,2));
#local AspectRatio = 2*cos(pi/6)/1;
orthographic
location -z*CameraDistance
direction z*CameraDistance
right x*ScreenArea
up y*ScreenArea/AspectRatio
rotate x*asind(tand(30))
rotate y*45
}
plane
{
y,0
texture
{
pigment
{
checker color rgb 0, color rgb 1
}
finish
{
ambient 1
}
}
scale 1
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
SharkD wrote:
> #local AspectRatio = 2*cos(pi/6)/1;
Not to be picky... okay, being picky....but why do you divide by 1 here? (even I can
do that in my head :)).
2 cos(pi/6) = sqrt(3), BTW.... (not that one's necessarily better than the other)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
SharkD 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?
If you look at the way bricks are generally placed in a wall, you can
see that the top half of an image, if split and switched left/right in
the bottom half, can make a good hex tiling image.
There are plenty of integer pairs that come very close to the value of
sqrt(.75), so getting an image with good-looking proportions isn't hard.
Regards,
John
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"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
I modified my website to make use of the technique:
http://www.geocities.com/mikehorvath.geo/povray.htm
You'll need Firefox (haven't tested Opera) for the full effect, since Geocities
inserts junk before the doctype and forces IE into quirksmode.
-Mike
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |