Projective Rational Arithmetic With Floating Point: Vaclav Skala
Projective Rational Arithmetic With Floating Point: Vaclav Skala
Projective Rational Arithmetic With Floating Point: Vaclav Skala
I.
INTRODUCTION
260
Name
Digits
E min
E max
B 16
Half
10+1
14
15
B 32
Single
23+1
126
127
B 64
Double
52+1
1022
1023
B 128
Quad
112+1
16382
16383
ALTERNATIVE REPRESENTATIONS
are integers
2013 5th International Conference on Computer Science and Information Technology (CSIT) ISBN: 978-1-4673-5825-5
IV.
projective scalar
projective vector
etc.
multiplication
division
B. vectors
It can be proved that the division operation is causing
substantial inaccuracy of computation.
There is a question whether the projective extension of the
Euclidean representation can bring advantages over the
classical using the floating point representation single or
double precision.
III.
PROJECTIVE REPRESENTATION
261
2013 5th International Conference on Computer Science and Information Technology (CSIT) ISBN: 978-1-4673-5825-5
TABLE II.
Disadvantages
HARDWARE CONSTATNTS
Precision
MASK
Exp_Digits
Single
&7FC0
255
Double
&7F80
2047
D. Comparison operation
Operations are approx. two times longer if not vectorvector architecture or SSE instructions are used
i.e.
TABLE III.
V.
262
REPRESENTATION OF VALUES
Projective vector
EXPERIMENTAL VERIFICATION
2013 5th International Conference on Computer Science and Information Technology (CSIT) ISBN: 978-1-4673-5825-5
The expression for
can be rewritten as
As the value of
can be very small, i.e.
, and
division by a denominator could cause significant inaccuracy
or floating point overflow, exchange of rows is made in
practice. If the projective notation is used
where:
where
REFERENCES
[1]
and
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
VII. CONCLUSION
Projective rational arithmetic with floating point was
described and fundamental arithmetic operations were
described. The projective representation using homogeneous
coordinates is used in computer graphics and computer vision
and its application enabled to solve many problems in more
effective way. As it was shown the projective representation is
convenient for general numerical computation as well as it has
several advantages of the standard single or double floating
[11]
[12]
[13]
263
2013 5th International Conference on Computer Science and Information Technology (CSIT) ISBN: 978-1-4673-5825-5
[14] Skala,V.: Duality and Robust Computation, ICCOMP12, 16th
WSEAS Int.Conf. on Computers ICCOMP12, Kos, Greece, pp.172-117,
2012
[15] Skala,V.: Projective Geometry and Duality for Graphics, Games and
Visualization, Course SIGGRAPH Asia 2012, Singapore,
ISBN 978-1-4503-1757-3, 2012
[16] Skala,V.: S-Clip E2: A New Concept of Clipping Algorithms,
SIGGRAPH Asia Posters, accepted for publication, 2012
[17] Skala,V., Kaiser,J., Ondracka,V.: Library for Computation in the
Projective Space, 6th Int.Conf. Aplimat, Bratislava, pp. 125-130, 2007
[18] Stolfi,J: Oriented Projective Geometry, Academic Press, 2001.
[19] Thomas,F., Torras,C.: A Projective invariant intersection test for
polyhedral, The Visual Computer, Vol.18, No.1, pp.405-414, 2002
[20] Yamaguchi,F.: Computer-Aided Geometric Design A Totally Four
Dimensional Approach, Springer Verlag, 1996
[21] Yamaguchi,F., Niizeki,M.: Some Basic Geometric Test Conditions in
Terms of Plcker Coordinates and Plcker Coefficients, The Visual
Computer, Vol.13, pp.29-41, 1997
WEB references
[22] Algol 68 - http://en.wikipedia.org/wiki/ALGOL_68
#Operating_Systems_written_in_ALGOL_68
[23] Algol 68- download, http://algol68.sourceforge.net/
[24] Algol68 summary, http://en.wikipedia.org/wiki/ALGOL_68
[25] C# Library for computation in the projective space P-Lib, download
http://www.kiv.zcu.cz/vyzkum/software/index.html
APPENDIX A
The cross product in 4D defined as
or more compactly
float4 cross_4D(float4 x1, float4 x2, float4 x3)
{
return ( dot(x1.yzw, cross(x2.yzw, x3.yzw)),
-dot(x1.xzw, cross(x2.xzw, x3.xzw)),
dot(x1.xyw, cross(x2.xyw, x3.xyw)),
-dot(x1.xyz, cross(x2.xyz, x3.xyz)) );
}
264