|
![](/i/fill.gif) |
"SharkD" <nomail@nomail> wrote:
> "SharkD" <nomail@nomail> wrote:
> > I experimented a bit and got pretty close. At least now it's clear that it's
> > possible. Unfortunately, the math is a bit too complex for me to figure out.
>
> Except, now there's the depth problem again; e.g., the 1:1 ratio is not
> preserved. Maybe you could fix this like you did the last time?
I fixed the depth problem. Here's the working code:
camera
{
orthographic
location -z*(CameraDistance)
direction z*(CameraDistance)
up vaxis_rotate(y,z,-15/2)*5/2
right vaxis_rotate(x,z,15/2)*5/2
rotate z*15
rotate x*asind(tand(30))
rotate y*45
Axis_Rotate_Trans(<1,1,0,>, -15)
}
light_source
{
<0, 0, -100> // light's position (translated below)
color rgb <1, 1, 1> // light's color
rotate <60,30,0>
parallel
shadowless
}
box
{
-0.5,0.5
texture
{
pigment {rgb 1}
finish {Phong_Glossy}
}
}
The rotations aren't perfect due to roundoff errors. There's noticable jagginess
on edges that are supposed to be smooth. If someone could look through the code
and simplify things in order to reduce the number of floating point
calculations, I would *really* appreciate it.
Post a reply to this message
|
![](/i/fill.gif) |