myfrenet

Construct tangent, normal and binormal vectors of a curve
2,1K téléchargements
Mise à jour 10 déc. 2008

Afficher la licence

Calculation of Tangent (T), Normal (N) and Binormal (B) of a continuous curve at every points of the curve.

function [T N B]=myfrenet(x,y,z,init)
% "x","y",and "z" is the coordinates of the curve. The curve also can be 2d.
% "init" is initial normal vector that user can be specified. With this input, you can freely initialize your vectors.

Although the name of the function is "myfrenet", the vectors are calculated in a different way from "frenet" equations because of some discontinuities of "frenet".

Derrivatives of the curve are calculated with spline fitting, therefore spline toolbox are required. If the toolbox are not available, users can change the derrivative calculation method such as by using "diff" or "gradient" command.

% Example
clear,clc
t=2*pi*linspace(-1/2,1/2,100).';
x=cos(t); y=sin(t); z=t;
myfrenet(x,y,z)

Citation pour cette source

Mehmet OZTURK (2026). myfrenet (https://fr.mathworks.com/matlabcentral/fileexchange/22376-myfrenet), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2008a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Splines dans Help Center et MATLAB Answers
Version Publié le Notes de version
1.0.0.0