|
|
> That's no surprise, because in the camera direction Z-axis formula you
> have a surplus "-1" factor at the end that's /not/ in the original
> Google formulae.
Ouch. Caused by my incompetence in 3D math... i'm a software security expert,
i'm working on ODS only for fun.
> My suggestion would be to go back to the original Google ODS formulas,
> and use a factor "Handedness" rather than a constant "-1" (also, make
> sure to use the factor on both Z-axis formulae), which can then be set
> to either "-1" for left-handed or "1" for right-handed.
Reverted to the original Google ODS:
// ODS - Top/Bottom
#declare odsIPD = 0.065; // Interpupillary distance
#declare odsLocationX = 0;
#declare odsLocationY = 0;
#declare odsLocationZ = 0;
#declare odsHandedness = -1; // "-1" for left-handed or "1" for right-handed
#declare odsAngle = 0; // Rotation, clockwise, in degree.
camera {
user_defined
location {
function { odsLocationX + cos(((x+0.5+odsAngle/360)) * 2 * pi -
pi)*odsIPD/2*select(-y,-1,+1) }
function { odsLocationY }
function { odsLocationZ + sin(((x+0.5+odsAngle/360)) * 2 * pi -
pi)*odsIPD/2*select(-y,-1,+1) * odsHandedness }
}
direction {
function { sin(((x+0.5+odsAngle/360)) * 2 * pi - pi) * cos(pi / 2
-select(y, 1-2*(y+0.5), 1-2*y) * pi) }
function { sin(pi / 2 - select(y, 1-2*(y+0.5), 1-2*y) * pi) }
function { -cos(((x+0.5+odsAngle/360)) * 2 * pi - pi) * cos(pi / 2
-select(y, 1-2*(y+0.5), 1-2*y) * pi) * odsHandedness }
}
}
The GOOD news for me: this generate pixel per pixel the same image of my
rewritten version of yesterday night.
So, the function above seem the release candidate for the Wiki page. I will
prepare the equivalent side-by-side and single-eye.
Thanks, thanks, thanks for your feedback.
Post a reply to this message
|
|