Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Elementary Geometry for Raytracing
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial

  - Geometrical Basics
    for Raytracing

    Right-angled Triangle
    Pythagorean Theorem
    Trigonometry Basics
    Law of cosines
    Equilateral Triangle
    Regular Polygon
    Polyhedron
      Tetrahedron
      Octahedron
      Cube & Cuboid
      Dodecahedron
      Icosahedron
      Cuboctahedron
      Truncated Octahedron
      Rhombicuboctahedron
      Truncated Icosahedron
    Circles
      Tangent circles
      Internal Tangents
      External Tangents
     
     
     
     
     
     
     
     
     
   - Geometric 3D Animations

                                               

The Pythagorean Theorem Some useful geometrical properties of right-angled triangles.
Note: In POV-Ray we use "sqrt(X)" for the square root of X and we use "X*X" or "pow(X,2)" for X2.

In a right-angled triangle with the hypotenuse c,
and the catheti a and b,
the Pythagorean theoreme says:

    a2 + b2 = c2
[In any right triangle, the area of the square whose side is the hypotenuse (the side opposite the right angle) is equal to the sum of the areas of the squares whose sides are the two legs (the two sides that meet at a right angle).]
Calculations of the sides:
 
 
   c = sqrt( a*a + b*b ) ; or
   c = sqrt( pow( a , 2) + pow( b , 2 ) ) .
 
 
   a = sqrt( c*c - b*b ) ;
 
 
   b = sqrt( c*c - a*a ) ;
 
The catheti a and b of right-angled triangle:
  a2 = p*c   or
  b2 = q*c
The height hc of right-angled triangle:
  h2 = p * q
    The Theorem of Pythagoras at a right-angled triangle
      h2 = p * q
  a2 + b2 = c2   and a2 = p*c   or   b2 = q*c
        h2 = p * q
top

© Friedrich A. Lohmüller, 2009
www.f-lohmueller.de