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

Vector Analysis with POV-Ray
A Survey on POV-Ray's buildt-in expressions and functions with vectors.
In POV-Ray
predefined vectors
o = < 0, 0, 0> (center of the world!),
x = <1, 0, 0>; y = <0, 1, 0>; z = <0, 0, 1>;
xy = < 1, 1, 0>; yz = < 0, 1, 1>; xz = < 1, 0, 1>;
t = <0, 0, 0, 1>; u = <1, 0>; v = <0, 1>;
Vector addition
<a,b,c> + <d,e,f> = <a+d,b+e,c+f>
Multiplication with scalar values
5 * <1,2,-5> = <5,10,-25>
Extracting components
If V = < a, b, c >, than a = V.x, b = V.y and c = V.z .
Projection on coordinate planes
The projection of P on the xz plane is <P.x,0,P.z>
Length of vectors: |V|
vlength(V)
Dot product V1*V2
vdot(V1,V2)
Vector V normated to length 1
a 1 unit vector in the direction of V
vnormalize(V)
Cross product V1 x V2
vcross(V1,V2)
Rotation of a vector V1 around
a vector V2 by A degrees
vaxis_rotate(V1,V2,A)
Rotation of a vector V1 around the
axes by V2.x, V2.y, V2.z .
vrotate(V1,V2)
With "math.inc"
 
Projection of a vector V on
a plane defined by an axis
VProject_Plane(V, Axis)
Projection of a vector V on
the axis
VProject_Axis(V, Axis)
Vector perpendicular to axis
and in the plane of V and axis
VPerp_Adjust(V, Axis)
Vektor perpendicular to V1 and V2
VPerp_To_Plane(V1, V2)
Cosine of the angle
between V1 and V2
VCos_Angle(V1, V2)
Angle between V1 and V2 in radians
VAngle(V1, V2)
Angle between V1 and V2 in degrees
VAngleD(V1, V2)
mit "transforms.inc"
 
Sheering of an object, here
x axis points to A, y to B, z to C.
Shear_Trans(A, B, C)
Sheering of an object like above
additional translation by D.
Matrix_Trans(A, B, C, D)
Stretching along an axis
Axial_Scale_Trans(Axis, Amount)
Rotating around an axis
Axis_Rotate_Trans(Axis, Winkel)
Rotating around a Point
um <Rotx,Roty,Rotz>
Rotate_Around_Trans( <Rotx,Roty,Rotz>, Center_of_Rotation)
Reorientate of Axis1
to new Axis2
Reorient_Trans(Axis1, Axis2)
Reorientate in a way
that y axis points to YAxis
Point_At_Trans(YAxis)
top

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