projection_onto_plane_R8P Function

public elemental function projection_onto_plane_R8P(self, pt1, pt2, pt3) result(projection)

Calculate the projection of point onto plane defined by 3 points.

The convention for the points numeration is the following:

 1.----.2
   \   |
    \ *---------> . self
     \ |
      \|
       .3
 type(vector_R8P) :: pt(0:3)

 pt(0) = 1 * ex_R8P + 2 * ey_R8P + 5.3 * ez_R8P
 pt(1) = ex_R8P
 pt(2) = ey_R8P
 pt(3) = ex_R8P - ey_R8P
 pt(0) = pt(0)%projection_onto_plane(pt1=pt(1), pt2=pt(2), pt3=pt(3))
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z
 type(vector_R8P) :: pt(0:3)

 pt(0) = 1 * ex_R8P + 2 * ey_R8P + 5.3 * ez_R8P
 pt(1) = ex_R8P
 pt(2) = ey_R8P
 pt(3) = ex_R8P - ey_R8P
 pt(0) = projection_onto_plane_R8P(pt(0), pt1=pt(1), pt2=pt(2), pt3=pt(3))
 print "(3(F3.1,1X))", pt(0)%x, pt(0)%y, pt(0)%z

Arguments

TypeIntentOptionalAttributesName
class(vector_R8P), intent(in) :: self

The point from which computing the distance.

type(vector_R8P), intent(in) :: pt1

First plane point.

type(vector_R8P), intent(in) :: pt2

Second plane point.

type(vector_R8P), intent(in) :: pt3

Third plane point.

Return Value type(vector_R8P)

Point projection.


Called by

proc~~projection_onto_plane_r8p~~CalledByGraph proc~projection_onto_plane_r8p projection_onto_plane_R8P program~volatile_doctest~332 volatile_doctest program~volatile_doctest~332->proc~projection_onto_plane_r8p

Contents

None