nearest_point_1d Program

Uses

  • program~~nearest_point_1d~~UsesGraph program~nearest_point_1d nearest_point_1d module~forcad forcad program~nearest_point_1d->module~forcad module~forcad_nurbs_curve forcad_nurbs_curve module~forcad->module~forcad_nurbs_curve module~forcad_nurbs_surface forcad_nurbs_surface module~forcad->module~forcad_nurbs_surface module~forcad_nurbs_volume forcad_nurbs_volume module~forcad->module~forcad_nurbs_volume module~forcad_utils forcad_utils module~forcad->module~forcad_utils module~forcad_nurbs_curve->module~forcad_utils module~forcad_nurbs_surface->module~forcad_utils module~forcad_nurbs_volume->module~forcad_utils stdlib_quadrature stdlib_quadrature module~forcad_utils->stdlib_quadrature

Define control points for the NURBS curve Define weights for the control points (optional) Define knot vector

Set knot vector, control points, and weights for the NURBS curve object. Wc is optional

Generate the NURBS curve with a resolution of 20

Find the nearest point on the curve to a given point Find the nearest point on the curve to a given point The optimization method is used to find the nearest point The optimization method is based on the Newton-Raphson method Finalize the NURBS curve object


Calls

program~~nearest_point_1d~~CallsGraph program~nearest_point_1d nearest_point_1d none~set~2 nurbs_curve%set program~nearest_point_1d->none~set~2 proc~create~2 nurbs_curve%create program~nearest_point_1d->proc~create~2 proc~finalize~2 nurbs_curve%finalize program~nearest_point_1d->proc~finalize~2 proc~nearest_point2~2 nurbs_curve%nearest_point2 program~nearest_point_1d->proc~nearest_point2~2 proc~nearest_point~2 nurbs_curve%nearest_point program~nearest_point_1d->proc~nearest_point~2 proc~set1a nurbs_curve%set1a none~set~2->proc~set1a proc~set1~2 nurbs_curve%set1 none~set~2->proc~set1~2 proc~set2~2 nurbs_curve%set2 none~set~2->proc~set2~2 proc~set3~2 nurbs_curve%set3 none~set~2->proc~set3~2 proc~set4~2 nurbs_curve%set4 none~set~2->proc~set4~2 interface~compute_xg~2 compute_Xg proc~create~2->interface~compute_xg~2 proc~is_rational~2 nurbs_curve%is_rational proc~create~2->proc~is_rational~2 proc~nearest_point2~2->proc~create~2 proc~nearest_point2~2->proc~finalize~2 proc~nearest_point2~2->proc~nearest_point~2 none~derivative2~2 nurbs_curve%derivative2 proc~nearest_point2~2->none~derivative2~2 proc~cmp_xg~2 nurbs_curve%cmp_Xg proc~nearest_point2~2->proc~cmp_xg~2 interface~nearest_point_help_1d nearest_point_help_1d proc~nearest_point~2->interface~nearest_point_help_1d proc~derivative2_scalar~2 nurbs_curve%derivative2_scalar none~derivative2~2->proc~derivative2_scalar~2 proc~derivative2_vector~2 nurbs_curve%derivative2_vector none~derivative2~2->proc~derivative2_vector~2 proc~cmp_xg~2->interface~compute_xg~2 proc~cmp_xg~2->proc~is_rational~2 proc~cmp_degree~2 nurbs_curve%cmp_degree proc~set1a->proc~cmp_degree~2 proc~set1~2->proc~cmp_degree~2 proc~compute_knot_vector compute_knot_vector proc~set2~2->proc~compute_knot_vector proc~set3~2->proc~cmp_degree~2 proc~get_multiplicity~2 nurbs_curve%get_multiplicity proc~cmp_degree~2->proc~get_multiplicity~2 proc~repelem repelem proc~compute_knot_vector->proc~repelem proc~derivative2_scalar~2->proc~is_rational~2 interface~compute_d2tgc~2 compute_d2Tgc proc~derivative2_scalar~2->interface~compute_d2tgc~2 proc~derivative2_vector~2->proc~is_rational~2 proc~derivative2_vector~2->interface~compute_d2tgc~2 interface~compute_multiplicity compute_multiplicity proc~get_multiplicity~2->interface~compute_multiplicity proc~compute_multiplicity1 compute_multiplicity1 interface~compute_multiplicity->proc~compute_multiplicity1 proc~compute_multiplicity2 compute_multiplicity2 interface~compute_multiplicity->proc~compute_multiplicity2

Variables

Type Attributes Name Initial
real(kind=rk), allocatable :: Wc(:)

Arrays for control points and weights

real(kind=rk), allocatable :: Xc(:,:)

Arrays for control points and weights

integer :: id

Variable for the id of the nearest point

real(kind=rk) :: knot(6)

Array for knot vector

real(kind=rk), allocatable :: nearest_Xg(:)

Array for the nearest point on the curve

real(kind=rk) :: nearest_Xt

Array for the parametric coordinates of the nearest point

type(nurbs_curve) :: shape

Declare a NURBS curve object