Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmueller
Deutsch Deutsch

Home
back to overview
- POV-Ray Tutorials

  - Analytical Geometry
    with POV-Ray
    - Index -
  - Insert Menu Add-on
    & Download
 
  - Basics
    Possibilities and Needs

    Points & Lines
    - Points in 3D
    - Line Sections, Straight,
      Vectors, Distance Markers
    - Surfaces & Planes
    - Output of Results,
      Captions
    - Points of Intersection
    - Circles
    Solids
    - Tetrahedron
    - Parallelepiped
    - Round Solids
    -
  - Overview by Table
      on "analytical_g.inc"
  - Vector Analysis
      with POV-Ray
  - Righthanded & Lefthanded
    Systems of Coordinates
    and the Cross Product

  - Samples from
    Analytical Geometry
    - Parallelogram of the
        Middles of the Edges
    - Trace Points of a Straight Line
   > Calculations
      about a Triangle

    - Area of a Parallelogram
        and Cross Product
    - Shadow of a Pyramid
    - Hit a plane || yz-plane
    - Angle of triangle & yz-plane
                                       

Analytical Geometry with POV-Ray

- Samples -

Calculations about a Triangle  
Calculations of the length of the edges, the normal vector, the area and the angles

Calculations about a Triangle with POV-Ray
A triangle is defined by three points:
#declare A  = < 3.0, 0.0,-4.0>;
#declare B  = < 4.0, 3.0, 2.0>;
#declare C  = <-1.0, 2.0,-3.0>;
The following values we can calculate
with POV-Ray very easily:
The vectors of the edges:
#declare AB = B-A;
#declare AC = C-A;
#declare BC = AC-AB;
The normal vector:
#declare N = vcross(AB, AC);
and then by |N|/2
The area of the triangle:
#declare Area = vlength(N)/2;
The angles of the triangle:
(in degrees)
#declare Angle_A= VAngleD(AC,AB);
#declare Angle_B= VAngleD(-AB,BC);
#declare Angle_C= VAngleD(BC,AC); 
Calculations about a Triangle  
(length of the edges, normal vector, area, angles)

This scene for POV-Ray: ".txt" file or ".pov" file
top

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