|
![](/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) |