|
faunus
|
The algorithms found here are mainly direct conversions from Robert Vacha's spherocylinder C code (~2008-2010). More...
Functions | |
| Point | mindist_segment2segment (const Point &dir1, double halfl1, const Point &dir2, double halfl2, const Point &r_cm) |
| Calculate minimum distance between two line segments. More... | |
| int | find_intersect_plane (const Cigar &part1, const Cigar &part2, const Point &r_cm, const Point &w_vec, double cutoff_squared, double cospatch, std::array< double, 5 > &intersections) |
| Finds intersections of spherocylinder and plane defined by vector "w_vec" and if they are in all-way patch then returns number of them (PSC) More... | |
| int | test_intrpatch (const Cigar &part1, Point &vec, double cospatch, double ti, std::array< double, 5 > &intersections) |
| Finds if vector "vec" has angular intersection w. More... | |
| int | find_intersect_planec (const Cigar &part1, const Cigar &part2, const Point &r_cm, const Point &w_vec, double rcut2, double cospatch, std::array< double, 5 > &intersections) |
| Intersect of plane. More... | |
| int | psc_intersect (const Cigar &particle1, const Cigar &particle2, const Point &r_cm, std::array< double, 5 > &intersections, double cutoff_squared) |
| Intersections of spherocylinder2 with a all-way patch of spherocylinder1 and return them (PSC) More... | |
| int | cpsc_intersect (const Cigar &part1, const Cigar &part2, const Point &r_cm, std::array< double, 5 > &intersections, double rcut2) |
| Intersection of PSC2 with cylindrical patch of PSC1 and return them (CPSC) More... | |
| Point | vec_perpproject (const Point &a, const Point &b) |
| Calculate perpendicular projection of the first vector versus the second vector. More... | |
| Point | mindist_segment2point (const Point &segment_direction, const double half_length, const Point &separation) |
| double | fanglscale (const double a, const Cigar &cigar) |
The algorithms found here are mainly direct conversions from Robert Vacha's spherocylinder C code (~2008-2010).
| int Faunus::SpheroCylinder::cpsc_intersect | ( | const Cigar & | cigar1, |
| const Cigar & | cigar2, | ||
| const Point & | r_cm, | ||
| std::array< double, 5 > & | intersections, | ||
| const double | cutoff_squared | ||
| ) |
Intersection of PSC2 with cylindrical patch of PSC1 and return them (CPSC)
| cigar1 | |
| cigar2 | |
| r_cm | |
| intersections | |
| cutoff_squared |
| int Faunus::SpheroCylinder::find_intersect_planec | ( | const Cigar & | part1, |
| const Cigar & | part2, | ||
| const Point & | r_cm, | ||
| const Point & | w_vec, | ||
| double | rcut2, | ||
| double | cospatch, | ||
| std::array< double, 5 > & | intersections | ||
| ) |
Intersect of plane.
| part1 | |
| part2 | |
| r_cm | |
| w_vec | |
| rcut2 | |
| cospatch | |
| intersections |
Finds intersections of plane defined by vector "w_vec" and if they are in cylindrical patch then returns number of them (CPSC)
|
inline |
| segment_direction | Direction of segment |
| half_length | Half length of segment |
| separation | Distance vector between the middle segment to point |
| Point Faunus::SpheroCylinder::mindist_segment2segment | ( | const Point & | dir1, |
| const double | half_length1, | ||
| const Point & | dir2, | ||
| const double | half_length2, | ||
| const Point & | r_cm | ||
| ) |
Calculate minimum distance between two line segments.
| dir1 | |
| half_length1 | |
| dir2 | |
| half_length2 | |
| r_cm |
Find closest distance between line segments and return its vector gets orientations and lengths of line segments and the vector connecting their center os masses (from vec1 to vec2) Copyright 2001, softSurfer (www.softsurfer.com) This code may be freely used and modified for any purpose providing that this copyright notice is included with it. SoftSurfer makes no warranty for this code, and cannot be held liable for any real or imagined damage resulting from its use. Users of this code must verify correctness for their application.
| dir1 | Direction of first segment |
| halfl1 | Half length of first segment |
| dir2 | Direction of second segment |
| halfl2 | Half length of second segment |
| r_cm | Distance vector between the middle of the two segments |
| int Faunus::SpheroCylinder::psc_intersect | ( | const Cigar & | particle1, |
| const Cigar & | particle2, | ||
| const Point & | r_cm, | ||
| std::array< double, 5 > & | intersections, | ||
| const double | cutoff_squared | ||
| ) |
Intersections of spherocylinder2 with a all-way patch of spherocylinder1 and return them (PSC)
| particle1 | |
| particle2 | |
| r_cm | |
| intersections | |
| cutoff_squared |
| int Faunus::SpheroCylinder::test_intrpatch | ( | const Cigar & | part1, |
| Point & | vec, | ||
| double | cospatch, | ||
| double | ti, | ||
| std::array< double, 5 > & | intersections | ||
| ) |
Finds if vector "vec" has angular intersection w.
| part1 | |
| vec | |
| cospatch | |
| ti | |
| intersections |
patch of part1
Calculate perpendicular projection of the first vector versus the second vector.
Calculate projection of a vector to a plane define by second vector (normal of a plan)
| a | the first vector |
| b | the second vector |
1.8.13