OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cr_spline_knots.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine cr_spline_knots (pts, knots, alpha)

Function/Subroutine Documentation

◆ cr_spline_knots()

subroutine cr_spline_knots ( dimension(0:3,3), intent(in) pts,
dimension(0:3), intent(inout) knots,
intent(in) alpha )

Definition at line 30 of file cr_spline_knots.F.

31C-----------------------------------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C D e s c r i p t i o n
37C-----------------------------------------------
38 ! computes knots for solving 4-point spline path.
39 ! CATMULL-ROM PARAMETER
40 ! ALPHA = 0.0 : uniform
41 ! ALPHA = 0.5 : centripetal
42 ! ALPHA = 1.0 : chordal
43 ! INPUT - PTS(0:3,:) are 4 control points
44 ! INPUT - ALPHA CCR SPLINE PARAMETER
45 ! OUTPU - KNOTS() : t0,t1,t2,t3
46C-----------------------------------------------
47C D u m m y A r g u m e n t s
48C-----------------------------------------------
49 my_real, INTENT(IN) :: pts(0:3,3), alpha
50 my_real, INTENT(INOUT) :: knots(0:3)
51C-----------------------------------------------
52C L o c a l V a r i a b l e s
53C-----------------------------------------------
54 my_real :: x,y,z
55C-----------------------------------------------
56C S o u r c e L i n e s
57C-----------------------------------------------
58 knots(0)=0.0
59 x=pts(1-1,1)-pts(1,1)
60 y=pts(1-1,2)-pts(1,2)
61 z=pts(1-1,3)-pts(1,3)
62 knots(1)=knots(0)+ exp(alpha*log(sqrt(x*x+y*y+z*z)))
63 x=pts(1,1)-pts(1+1,1)
64 y=pts(1,2)-pts(1+1,2)
65 z=pts(1,3)-pts(1+1,3)
66 knots(2)=knots(1)+ exp(alpha*log(sqrt(x*x+y*y+z*z)))
67 x=pts(1+1,1)-pts(1+2,1)
68 y=pts(1+1,2)-pts(1+2,2)
69 z=pts(1+1,3)-pts(1+2,3)
70 knots(3)=knots(2)+ exp(alpha*log(sqrt(x*x+y*y+z*z)))
#define my_real
Definition cppsort.cpp:32
#define alpha
Definition eval.h:35