|
![](/i/fill.gif) |
Wasn't it Tyler Eaves who wrote:
>I'm looking for some way to specify a box at an angle. The way I see it, a
>box could be specified by giving 2 points, which would be the center of
>two oppisite faces, and would define one dimesion, call it length, and
>then giving the length of the width and height. This would be roughly
>comprable to the way a cylinder is specified. I can't seem to think of any
>obvious way to do this (3d math is not a strength of mine...)
The first thing that springs to mind is to write a macro like this:
#include "transforms.inc"
#macro aligned_box(P1, P2, H, W)
#local L = abs(vlength(P2-P1));
box {<0,-H/2,-W/2><L,H/2,W/2>
transform {Reorient_Trans(x,P2-P1)}
translate P1
}
#end
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |