Set a surface with 4 control points The weights of the control points (Wc) are optional.
Generate the NURBS surface with resolutions of 30 in both dimensions
Find the nearest point on the surface to a given point Find the nearest point on the surface 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 surface object
Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
real(kind=rk) | :: | Wc(4) |
Weights of the control points |
|||
real(kind=rk) | :: | Xc(4,3) |
Control points |
|||
integer | :: | id |
id of the nearest point |
|||
real(kind=rk), | allocatable | :: | nearest_Xg(:) |
Coordinates of the nearest point on the surface |
||
real(kind=rk), | allocatable | :: | nearest_Xt(:) |
Corresponding parametric coordinates of the nearest point |
||
type(nurbs_surface) | :: | shape |
Declare a NURBS surface object |