|
![](/i/fill.gif) |
"Rune" <aut### [at] runevision com> wrote:
> "SharkD" wrote:
> > Well, the face of the cube only diverges from a perfect square by one
> > pixel i
> > each direction at 640x480 resolution. Yes, I would call that "jagginess".
>
> That's only because the cube only fills a small part of the image. When you
> put in the grid like in your image below, it becomes clear that the lines
> are not horizontal and vertical at all, but diverges many pixels from the
> top of the image to the bottom. That's not just rounding errors; POV-Ray is
> far more precise than that.
>
> > That does work a lot better. Could you try a shot at this image?
> >
> > http://img139.imageshack.us/img139/7937/obliquetoprotatedgm6.png
>
> Sure:
>
> #declare CameraDistance = 40;
> camera {
> #local CameraArea = 3.03; // arbritary
> #local CameraSkewed = 1/sqrt(2);
> #local AspectRatio = image_width/image_height;
> orthographic
> location <-CameraSkewed,1,-CameraSkewed>*CameraDistance
> direction <CameraSkewed,-1,CameraSkewed>
> up x*CameraArea
> right -z*CameraArea*AspectRatio
> }
>
> background {color <0.5,0.7,1.0>}
> global_settings {assumed_gamma 1}
>
> light_source {
> <0,0,-100> color rgb 1
> rotate <60,30,0>
> parallel
> shadowless
> }
>
> box {-0.5,0.5 pigment {rgb 1}}
>
> #declare Arrow = union {
> cylinder {-x, x, 0.01}
> cone {x, 0.05, 1.1*x, 0}
> scale <1.35,1,1>
> }
> object {Arrow pigment {red 1}}
> object {Arrow rotate 90*z pigment {green 1}}
> object {Arrow rotate -90*y pigment {blue 1}}
>
> plane {y, 0
> pigment {
> boxed translate x+z warp {repeat x*2} warp {repeat z*2}
> scale 0.05
> color_map {[0.19, rgb 0.35][0.19, transmit 1]}
> }
> }
>
>
> > Also, you describe how you derived the float values?
>
> I changed the 0.7 to 1/sqrt(2) like Trevor G Quayle wrote. The CameraArea of
> 3.03 is arbritary to match your images.
>
> Rune
> --
> http://runevision.com
Here's my version (a little more exact).
Side view:
camera
{
#local CameraArea = 5/2;
#local CameraDistance = 40;
#local SkewAdjust = (tand(45)/sind(45))/(tand(30)/sind(30));
#local CameraSkewed = 1/sqrt(2);
#local CameraPosition =
vnormalize(<-CameraSkewed,CameraSkewed,-1>)*CameraDistance;
#local AspectRatio = image_width/image_height;
orthographic
location CameraPosition
direction -CameraPosition
up y*CameraArea*SkewAdjust
right x*CameraArea*SkewAdjust*AspectRatio
}
Top view:
camera
{
#local CameraArea = 5/2;
#local CameraDistance = 40;
#local SkewAdjust = (tand(45)/sind(45))/(tand(30)/sind(30));
#local CameraSkewed = 1/sqrt(2);
#local CameraPosition =
vnormalize(<-CameraSkewed,1,-CameraSkewed>)*CameraDistance;
#local AspectRatio = image_width/image_height;
orthographic
location CameraPosition
direction -CameraPosition
up vnormalize(x+z)*CameraArea*SkewAdjust
right vnormalize(x-z)*CameraArea*SkewAdjust*AspectRatio
}
Post a reply to this message
|
![](/i/fill.gif) |