- 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 - |
The Trace Points of a Straight Line
|
|
|
Visualization of the trace points of a straight line
We have a straight line defined by two points, i.e. by:
#declare A = < 1.0, 2.0,-1.0>;
#declare B = < 2.0, 2.5,-0.5>;
The vector from A to B as the vector of the direction of the straight line is calculated by
#declare AB = B - A ;
Caculating the trace points
Sample: xy trace point of the straight line
We can calculate AB = <1.0,0.5,0.5>.
The equation of a staright line defined by parameters is:
x = A + s*AB;
or
in equation for the single components:
x1 = 1.0 + 1.0*s (I)
x2 = 2.0 + 0.5*s (II)
x3 = -1.0 + 0.5*s (III)
The trace points of the straight line are those points where the staight line hits
the coordinate planes.
By this fact we get the criterion for po.ints in the xy plane:
The z component x3 = 0.
If we take into consideration in the equation (III) we have for the xy trace point Txy:
0 = -1 + 0.5*s
<=> 1 = 0.5*s
<=> s = 2.
This means: we get the vector form zero to the xy trace point by adding s = 2 times
the vector of the direction of the straight line to the starting point A of the straight line.
Here we get fpr the xy trace point the coordinates Txy( 3 / 2.5 / 0).
This can be confirmed optical in an easy way by
drawing the point Txy:
#declare Txy = < 3.0, 3.0, 0.0>;
sphere{ Txy, Rp pigment{ color Red } }
For the representation of the coordinate planes by plane segments in POV-Ray we can
comment out the existing squared xz plane and replace it by thin boxes with
a transparent raster to demonstrate the coordinate planes.
(See the text of the according scene file!).
|
Visualization of the trace points of a straight line
This scene for POV-Ray:
".txt" file or
".pov" file
|
|