#ifndef LOCALSUPERHELIX_H
#define LOCALSUPERHELIX_H

#include "SETTINGS.h"

// helper equation for calculating superhelix position given a globally resolved darb
VEC3 darbEqn(const VEC3& globalDarb, const VEC3& base, const VEC3& t0, const double& s);

VEC3 darbCenterEqn(const VEC3& globalDarb, const VEC3& base, const VEC3& t0, const double& s);
// helper equation for calculating superhelix frame direction given a globally resolved darb
VEC3 FDarbEqn(const VEC3& globalDarb, const VEC3& n0, const double& s);

// samples a point given helixParams and a starting point (darboux is wrt local frame)
VEC3 sampleLocalSupHelix(const superHelix& h, const VEC3& base, const MATRIX3& F, const double& s);

VEC3 sampleLocalSupHelixCenter(const superHelix& h, const VEC3& base, const MATRIX3& F, const double& s);

// samples a tangent given by helixParams and starting conditions
MATRIX3 FsampleLocalSupHelix(const superHelix& h, const MATRIX3& F, const double& s);


// builds full list of points from helical strand with length-based (normalized on a zero-to-one) sampling. 
std::vector<VEC3> sampleLocalSupHelixes(const std::vector<superHelix>& hs, const VEC3& pB, const MATRIX3& FB, const std::vector<double>& sampleLens);

// builds full list of points from helical strand with number of even samples requested
std::vector<VEC3> sampleLocalSupHelixes(const std::vector<superHelix>& hs, const VEC3& pB, const MATRIX3& FB, int numEvenSamples);

std::vector<std::vector<VEC3>> sampleLocalSupHelixGroup(const std::vector<std::vector<superHelix>>& hs, const std::vector<VEC3>& pBs, const std::vector<MATRIX3>& FBs, int numEvenSamples);

// gets single point from helical strand with length-based (normalized on a zero-to-one) sampling. 
VEC3 sampleLSHSinglePoint(const std::vector<superHelix>& hs, const VEC3& pB, const MATRIX3& FB, const double& t);

#endif