POV-Ray : Newsgroups : povray.advanced-users : Skewness (long) : Re: Skewness (long) Server Time
23 Jun 2024 08:07:53 EDT (-0400)
  Re: Skewness (long)  
From: Francois LE COAT
Date: 7 Nov 2018 11:15:01
Message: <5be30f85$1@news.povray.org>
Hi,

Bald Eagle writes:
> It looks to me like what you want to do is apply a shear in one directi
on, and a
> shear perpendicular to that.
> 
> So, looking at Friedrich Lohmueller's page, when you add that 0.5 in to
 the
> matrix, that equates to a shear of a certain angle.  FM says it's 30 de
grees,
> but I thought it would be calculated as atan (0.5/1) = 26.565.
> Do the same to a different axis, and that ought to get you the "skew" y
ou're
> looking for.
> 
> Looking down along the y axis, I think that might be:
> 
> matrix< 1 , 0, 0,
>           0.5, 1, 0.5,
>            0 , 0, 1,
>            0 , 0, 0 >
> 
> Maybe this is closer to what you need?

Now, with the image matching method that I developed, I compute 8
parameters in 3D space :

	Tx : translation along the x axis
	Ty : translation along the y axis
	Tz : translation along the z axis
	Rx : pitch angle along the x axis
	Ry : yaw angle along the y axis
	Rz : roll angle along the z axis
	Sx : skew angle along the x axis
	Sy : skew angle along the y axis

To render the computed projective transform I use the POV-Ray code :
"
     matrix < 1 , 0, 0,
          atan(Sx*3.141592654/180.0), 1, 0,
           0 , 0, 1,
           0 , 0, 0 >
     matrix < 1,atan(Sy*3.141592654/180.0),  0,
          0,  1,  0,
          0,  0,  1,
          0,  0,  0 >
     rotate <Rx,Ry,Rz>
     translate <Tx,Ty,Tz>
"
<Tx,Ty,Tz> are expressed in pixels. <Rx,Ry,Rz> and <Sx,Sy> are expressed
in degrees. This gives the following result following head's movement :

     <http://hebergement.u-psud.fr/lecoat/camera_fixe.mp4>

The interest with the method, is to evaluate large movements. It works !

Thanks for your help,

Best regards,

-- 

<http://eureka.atari.org/>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.