vector_projection_on_plane Function

private pure function vector_projection_on_plane(a, b) result(c)

Project a vector onto a plane.

Reference

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(3) :: a

the original vector

real(kind=wp), intent(in), dimension(3) :: b

the plane to project on to (a normal vector)

Return Value real(kind=wp), dimension(3)

the projection of a onto the b plane


Calls

proc~~vector_projection_on_plane~~CallsGraph proc~vector_projection_on_plane vector_projection_on_plane proc~vector_projection vector_projection proc~vector_projection_on_plane->proc~vector_projection

Called by

proc~~vector_projection_on_plane~~CalledByGraph proc~vector_projection_on_plane vector_projection_on_plane proc~generate_circle stl_file%generate_circle proc~generate_circle->proc~vector_projection_on_plane proc~add_cone stl_file%add_cone proc~add_cone->proc~generate_circle proc~add_cylinder stl_file%add_cylinder proc~add_cylinder->proc~generate_circle proc~add_arrow stl_file%add_arrow proc~add_arrow->proc~add_cone proc~add_arrow->proc~add_cylinder proc~add_curve stl_file%add_curve proc~add_curve->proc~add_cylinder proc~add_axes stl_file%add_axes proc~add_axes->proc~add_arrow

Source Code

    pure function vector_projection_on_plane(a,b) result(c)

    implicit none

    real(wp),dimension(3),intent(in)  :: a !! the original vector
    real(wp),dimension(3),intent(in)  :: b !! the plane to project on to (a normal vector)
    real(wp),dimension(3) :: c !! the projection of a onto the b plane

    c = a - vector_projection(a,b)

    end function vector_projection_on_plane