├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── imgs ├── MINVO_roots.png └── minvo3d.png └── src ├── comparison_with_slefes ├── MyAverageKeeper.m ├── abc_dataset │ ├── feat │ │ └── abc_0000_feat_v00 │ │ │ ├── 00002005 │ │ │ └── 00002005_b53d499a5d5c42dfade565bf_features_007.yml │ │ │ ├── 00004017 │ │ │ └── 00004017_690490b212df4d5eacc6635c_features_013.yml │ │ │ ├── 00004021 │ │ │ └── 00004021_690490b212df4d5eacc6635c_features_017.yml │ │ │ ├── 00005021 │ │ │ └── 00005021_0a675fbb89444f1a91da0315_features_006.yml │ │ │ ├── 00005022 │ │ │ └── 00005022_0a675fbb89444f1a91da0315_features_007.yml │ │ │ └── 00005045 │ │ │ └── 00005045_51a7e299c47e4228b019c74b_features_011.yml │ ├── feat_v00.txt │ ├── obj │ │ └── abc_0000_obj_v00 │ │ │ ├── 00002005 │ │ │ └── 00002005_b53d499a5d5c42dfade565bf_trimesh_007.obj │ │ │ ├── 00004017 │ │ │ └── 00004017_690490b212df4d5eacc6635c_trimesh_013.obj │ │ │ ├── 00004021 │ │ │ └── 00004021_690490b212df4d5eacc6635c_trimesh_017.obj │ │ │ ├── 00005021 │ │ │ └── 00005021_0a675fbb89444f1a91da0315_trimesh_006.obj │ │ │ ├── 00005022 │ │ │ └── 00005022_0a675fbb89444f1a91da0315_trimesh_007.obj │ │ │ └── 00005045 │ │ │ └── 00005045_51a7e299c47e4228b019c74b_trimesh_011.obj │ └── obj_v00.txt ├── comp_time.m ├── comparison_raw_points.m ├── comparison_using_abc_dataset.m ├── comparison_with_slefes.m ├── create_curves_reviewer_mat.m ├── curve_current_reviewer.mat ├── data_comparison_slefes_nonsmooth.mat ├── data_comparison_slefes_smooth.mat ├── filterVerticesPolyShape.m ├── formatNumber.m ├── plotCurve.m └── plotMatrix.m ├── curve_given3D.m ├── fit_MV_roots.m ├── formula_formulation.m ├── general_formulation_lukacs_theorem.m ├── general_formulation_sos.m ├── mader_related ├── astar_minvo.m ├── bspline_deboor.m ├── evaluateBSplinesusingMatrices.m ├── lp_feasibility_test.m └── plotComparisonBSBezMinvoPosVelAccel.m ├── other ├── checkCentroidalCondition.m ├── checkFormulaVolumeConvexHull.m ├── conversionMinvo_Bs_Bezier.m ├── kkt_conditions.m ├── plots_projection4DTo2D.m ├── projection_4D_to_2D.m └── test_recursivity.m ├── other_solvers ├── gloptipoly │ ├── formula_gloptipoly.m │ └── getCoeffMlp.m ├── gpops │ ├── tests_gpops │ │ ├── curveContinuous.m │ │ ├── curveEndpoint.m │ │ ├── fitCurveToRoots.m │ │ ├── main.m │ │ ├── printeps.m │ │ ├── solutionGpopsDeg1.mat │ │ ├── solutionGpopsDeg2.mat │ │ ├── solutionGpopsDeg3.mat │ │ ├── solutionGpopsDeg4.mat │ │ ├── solutionGpopsDeg5.mat │ │ └── solutionGpopsDeg7.mat │ └── tests_gpops2 │ │ ├── curveContinuous.m │ │ ├── curveEndpoint.m │ │ ├── generateBR.m │ │ ├── getA.m │ │ ├── main.m │ │ └── printeps.m ├── julia_TSSOS │ └── test_julia.jl ├── mathematica │ └── general_formulation_lukacs_theorem.nb ├── ncpol2sdpa │ ├── formula_formulation_ncpol2sdpa.py │ └── pointwise_formulation_ncpol2sdpa.py ├── other_formulations │ ├── general_formulation_3orderpoly_2d.m │ ├── general_formulation_3orderpoly_2d_projection_rationalcurve.m │ ├── pointwise_formulation.m │ ├── polynomial3orderIn2d.m │ └── robust_optimization.m └── sparse_BSOS │ ├── .readme.txt.swp │ └── general_formulation_sparsebsos.m ├── plot_solution.m ├── simple_example_bspline.m ├── simplex_given3D.m ├── solutions ├── getA_MV.m ├── getA_MV_Approx.m ├── getAllRoots_MV.m ├── getRoots_MV_Approx.m ├── old │ ├── solutionTangencyPointsDeg2.mat │ ├── solutionTangencyPointsDeg3.mat │ ├── solutionTangencyPointsDeg4.mat │ ├── solutionTangencyPointsDeg5.mat │ ├── solutionTangencyPointsDeg6.mat │ └── solutionTangencyPointsDeg7.mat ├── readme.txt ├── rootsLambdaiDeg0.mat ├── rootsLambdaiDeg1.mat ├── rootsLambdaiDeg2.mat ├── rootsLambdaiDeg3.mat ├── rootsLambdaiDeg4.mat ├── rootsLambdaiDeg5.mat ├── rootsLambdaiDeg6.mat ├── rootsLambdaiDeg7.mat ├── solutionDeg0.mat ├── solutionDeg1.mat ├── solutionDeg2.mat ├── solutionDeg3.mat ├── solutionDeg4.mat ├── solutionDeg5.mat ├── solutionDeg6.mat └── solutionDeg7.mat └── utils ├── BezierPatchSurface ├── BezierPatchSurface │ ├── BezierCurveSurface.pdf │ ├── BezierPatchSurface.PNG │ ├── bezierpatchinterp.m │ ├── main.m │ ├── plotbezierpatch3D.m │ ├── plotbeziersurface3D.m │ ├── readme.txt │ ├── reference.txt │ └── teapot.mat └── author_and_license.txt ├── CaptureFigVid ├── CaptureFigVid │ ├── CaptureFigVid.asv │ ├── CaptureFigVid.m │ ├── CaptureFigVid_Example.m │ ├── Thumbs.db │ ├── WellMadeVid.mp4 │ ├── WellMadeVid.png │ ├── WellMadeVid2.avi │ └── html │ │ ├── CaptureFigVid_Example.html │ │ ├── CaptureFigVid_Example.png │ │ ├── CaptureFigVid_Example_01.png │ │ ├── CaptureFigVid_Example_02.png │ │ └── Thumbs.db └── license.txt ├── ChebyshevRoots ├── ChebyshevRoots.m └── license.txt ├── arrow3D_pub ├── ColorSpec_LongName_to_RGBvalue.m ├── ColorSpec_ShortName_to_RGBvalue.m ├── arrow3D_v2.m ├── demoArrow3D.m ├── html │ ├── demoArrow3D.html │ ├── demoArrow3D.png │ ├── demoArrow3D_01.png │ ├── demoArrow3D_02.png │ ├── demoArrow3D_03.png │ └── demoArrow3D_04.png └── rotatePoints.m ├── arrow3d ├── arrow3d.gif ├── arrow3d.m ├── arrow3dWithColor.m ├── readme.txt └── rotatedata.m ├── bezier_bspline ├── computeMatrixForAnyBSpline.m ├── computeMatrixForAnyBSpline_old.m ├── computeMatrixForClampedUniformBSpline.m ├── computeMatrixForNonClampedUniformBSpline.m ├── getA_BS.m └── getA_Be.m ├── bspline_deboor.m ├── computeDet.m ├── computeInv.m ├── convSym.m ├── convertCoeffMatrixFromABtoCD.m ├── convertNumberFromABtoCD.m ├── exportAsPdf.m ├── exportAsSvg.m ├── fian ├── dispObj.m ├── license.txt ├── objvol.m └── readwObj.m ├── findWVgivenA.m ├── generateRandPol.m ├── generateRandPol1D.m ├── generateRandSmoothPol.m ├── getT.m ├── isEven.m ├── isOdd.m ├── lagrangeMinima ├── getAllMinima_La.m └── getMinimaLa.m ├── lagrangePoly ├── lagrangePoly.m ├── lagrangePoly_example.m └── licenseLagrangePoly.txt ├── minBoundingBox ├── license.txt └── minBoundingBox.m ├── plotAxesArrows.m ├── plotAxesArrowsT.m ├── plotAxesArrowsTnoColor.m ├── plotSphere.m ├── plotStandardSimplex2D.m ├── plotStandardSimplex3D.m ├── plot_convex_hull.m ├── plot_line_convex_hull.m ├── plot_plane_convex_hull.m ├── plot_splitted_convex_hulls.m ├── plotsegment.m ├── polytopes_2017_10_04_v1.9 ├── addBounds.m ├── intersectionHull.m ├── lcon2vert.m ├── license.txt ├── qlcon2vert.m ├── readme.txt ├── separateBounds.m ├── unionHull.m └── vert2lcon.m ├── projectOntoPlaneXEquals0.m ├── projectPoint.m ├── shadedErrorBar ├── LICENSE ├── README.md ├── demo_shadedErrorBar.m ├── exampleImages │ ├── basic_with_overlay.png │ ├── mod-handles.png │ └── multiple_lines.png └── shadedErrorBar.m ├── simplex_coordinates1.m ├── slefes ├── checkAndPlotSlefe.m ├── computeSlefe.m ├── computeSlefeScalar.m ├── computeSlefeScalarSpeedOptimized.m └── thirdparty │ └── SubLiME │ ├── COPYRIGHT.txt │ ├── Makefile │ ├── README.txt │ ├── SubLiME.h │ ├── bspSlefe.c │ ├── bspexample │ ├── bspexample.c │ ├── libSubLiME.a │ ├── range │ ├── README │ ├── bsprange-2_1.asc │ ├── bsprange-2_2.asc │ ├── bsprange-2_3.asc │ ├── bsprange-2_4.asc │ ├── bsprange-3_1.asc │ ├── bsprange-3_2.asc │ ├── bsprange-3_3.asc │ ├── bsprange-3_4.asc │ ├── bsprange-3_5.asc │ ├── bsprange-3_6.asc │ ├── bsprange-3_7.asc │ ├── bsprange-3_8.asc │ ├── bsprange-3_9.asc │ ├── unirange-2_1.asc │ ├── unirange-2_2.asc │ ├── unirange-2_3.asc │ ├── unirange-2_4.asc │ ├── unirange-2_5.asc │ ├── unirange-2_6.asc │ ├── unirange-2_7.asc │ ├── unirange-2_8.asc │ ├── unirange-2_9.asc │ ├── unirange-3_1.asc │ ├── unirange-3_2.asc │ ├── unirange-3_3.asc │ ├── unirange-3_4.asc │ ├── unirange-3_5.asc │ ├── unirange-3_6.asc │ ├── unirange-3_7.asc │ ├── unirange-3_8.asc │ ├── unirange-3_9.asc │ ├── unirange-4_1.asc │ ├── unirange-4_2.asc │ ├── unirange-4_3.asc │ ├── unirange-4_4.asc │ ├── unirange-4_5.asc │ ├── unirange-4_6.asc │ ├── unirange-4_7.asc │ ├── unirange-4_8.asc │ ├── unirange-4_9.asc │ ├── unirange-5_1.asc │ ├── unirange-5_2.asc │ ├── unirange-5_3.asc │ ├── unirange-5_4.asc │ ├── unirange-5_5.asc │ ├── unirange-5_6.asc │ ├── unirange-5_7.asc │ ├── unirange-5_8.asc │ ├── unirange-5_9.asc │ ├── unirange-6_1.asc │ ├── unirange-6_2.asc │ ├── unirange-6_3.asc │ ├── unirange-6_4.asc │ ├── unirange-6_5.asc │ ├── unirange-6_6.asc │ ├── unirange-6_7.asc │ ├── unirange-6_8.asc │ ├── unirange-6_9.asc │ ├── unirange-7_1.asc │ ├── unirange-7_2.asc │ ├── unirange-7_3.asc │ ├── unirange-7_4.asc │ ├── unirange-7_5.asc │ ├── unirange-7_6.asc │ ├── unirange-7_7.asc │ ├── unirange-7_8.asc │ ├── unirange-7_9.asc │ ├── unirange-8_1.asc │ ├── unirange-8_2.asc │ ├── unirange-8_3.asc │ ├── unirange-8_4.asc │ ├── unirange-8_5.asc │ ├── unirange-8_6.asc │ ├── unirange-8_7.asc │ ├── unirange-8_8.asc │ ├── unirange-8_9.asc │ ├── unirange-9_1.asc │ ├── unirange-9_2.asc │ ├── unirange-9_3.asc │ ├── unirange-9_4.asc │ ├── unirange-9_5.asc │ ├── unirange-9_6.asc │ ├── unirange-9_7.asc │ ├── unirange-9_8.asc │ └── unirange-9_9.asc │ ├── tpSlefe.c │ ├── type.h │ ├── uniSlefe.c │ ├── uniexample │ └── uniexample.c └── utils.nb /.gitattributes: -------------------------------------------------------------------------------- 1 | src/utils/*.nb linguist-vendored 2 | src/comparison_with_slefes/abc_dataset/** filter=lfs diff=lfs merge=lfs -text 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.m~ 2 | *.lyx~ 3 | *.lyx# 4 | *.asv 5 | **.o 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2020, Jesus Tordesillas Torres, MIT Aerospace Controls Laboratory 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MINVO Basis: Finding Simplexes with Minimum Volume Enclosing Polynomial Curves # 2 | 3 | Example for n=3: 4 | 5 | [![](./imgs/minvo3d.png)](https://www.youtube.com/watch?v=x5ORkDCe4O0) 6 | 7 | MINVO roots: 8 | 9 | [![](./imgs/MINVO_roots.png)](https://www.youtube.com/watch?v=x5ORkDCe4O0) 10 | 11 | ## Citation 12 | 13 | When using MINVO, please cite this paper ([pdf](https://arxiv.org/abs/2010.10726), [video](https://youtu.be/x5ORkDCe4O0)): 14 | 15 | ```bibtex 16 | @article{tordesillas2022minvo, 17 | title={MINVO Basis: Finding Simplexes with Minimum Volume Enclosing Polynomial Curves}, 18 | author={Tordesillas, Jesus and How, Jonathan P}, 19 | journal={Computer-Aided Design}, 20 | volume={151}, 21 | pages={103341}, 22 | year={2022}, 23 | publisher={Elsevier} 24 | } 25 | ``` 26 | 27 | ## Instructions to use the MINVO basis 28 | 29 | * **For a particular curve (Problem 1 of the paper)**: See an example (with `n=3`) in [`curve_given3D.m`](https://github.com/mit-acl/minvo/blob/master/src/curve_given3D.m) 30 | 31 | * **For a particular simplex (Problem 2 of the paper)**: See an example (with `n=3`) in [`simplex_given3D.m`](https://github.com/mit-acl/minvo/blob/master/src/simplex_given3D.m) 32 | 33 | To obtain all the figures of the paper, you can simply run [`plot_solution.m`](https://github.com/mit-acl/minvo/blob/master/src/plot_solution.m) 34 | 35 | You don't need to install any external solvers for the steps above. 36 | 37 | ## Instructions to derive the MINVO basis 38 | 39 | * The file [`general_formulation_sos.m`](https://github.com/mit-acl/minvo/blob/master/src/general_formulation_sos.m) solves Problem 3 in the paper using SOS. 40 | * The file [`general_formulation_lukacs_theorem.m`](https://github.com/mit-acl/minvo/blob/master/src/general_formulation_lukacs_theorem.m) solves Problem 3 in the paper using the Markov–Lukács Theorem. 41 | * The file [`formula_formulation.m`](https://github.com/mit-acl/minvo/blob/master/src/formula_formulation.m) solves Problem 4 in the paper. 42 | 43 | Follow the instructions in each file to prove local/global optimality. 44 | 45 | Depending on the settings you choose in each file, you may need to install [YALMIP](https://yalmip.github.io/) (tested with [this release](https://github.com/yalmip/YALMIP/releases/tag/R20200116_hotfix)), [SNOPT](https://ccom.ucsd.edu/~optimizers/) and/or [MOSEK](https://www.mosek.com/). 46 | 47 | 48 | --------- 49 | 50 | > **Approval for release**: This code was approved for release by The Boeing Company in December 2020. 51 | -------------------------------------------------------------------------------- /imgs/MINVO_roots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/imgs/MINVO_roots.png -------------------------------------------------------------------------------- /imgs/minvo3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/imgs/minvo3d.png -------------------------------------------------------------------------------- /src/comparison_with_slefes/MyAverageKeeper.m: -------------------------------------------------------------------------------- 1 | %See https://www.mathworks.com/help/matlab/matlab_oop/comparing-handle-and-value-classes.html 2 | classdef MyAverageKeeper< handle 3 | 4 | properties 5 | average 6 | size_so_far 7 | end 8 | 9 | methods 10 | 11 | function obj = MyAverageKeeper() 12 | obj.average=0.0; 13 | obj.size_so_far=0; 14 | 15 | end 16 | 17 | %https://stackoverflow.com/a/22999488/6057617 18 | function addToAverage(obj, value) 19 | obj.average=(obj.size_so_far * obj.average + value)/(obj.size_so_far+1); 20 | obj.size_so_far=obj.size_so_far+1; 21 | end 22 | 23 | end 24 | end -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/feat/abc_0000_feat_v00/00002005/00002005_b53d499a5d5c42dfade565bf_features_007.yml: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e33fbc108aa8566087dab79a084e5400e210e61963233e279441f6c1c212fa13 3 | size 1199182 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/feat/abc_0000_feat_v00/00004017/00004017_690490b212df4d5eacc6635c_features_013.yml: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:271e5023766043e0b75e0afd17148cb96c30131d764703df1f28d88b3602592b 3 | size 1086794 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/feat/abc_0000_feat_v00/00004021/00004021_690490b212df4d5eacc6635c_features_017.yml: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2747e55280fa385ba9db2847378ab40d5bd557abe735cf49a3a266e0e66d817a 3 | size 2515449 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/feat/abc_0000_feat_v00/00005021/00005021_0a675fbb89444f1a91da0315_features_006.yml: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a84d955ce2b84d920d0d283f19164ef39d1ffadf0861ee1b346a9dfdca00448e 3 | size 1467789 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/feat/abc_0000_feat_v00/00005022/00005022_0a675fbb89444f1a91da0315_features_007.yml: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1ef9da7705882f1c67f8a0c164f31a7d839ada20b02ce742a09b72febe5c573e 3 | size 5999044 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/feat/abc_0000_feat_v00/00005045/00005045_51a7e299c47e4228b019c74b_features_011.yml: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:581c624e24912daeb118fd4d6d6a461ec550e5dead304069041f7f54a65c4eb2 3 | size 1340179 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/feat_v00.txt: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c4af9e5a58cf90dc5d983e6071d72d239d255de50362aee16f632b69fe9ecb02 3 | size 7600 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/obj/abc_0000_obj_v00/00002005/00002005_b53d499a5d5c42dfade565bf_trimesh_007.obj: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:83106de609741747e0f35ea84a0c829838b86866f778b7b02f97779b78d35d83 3 | size 3487027 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/obj/abc_0000_obj_v00/00004017/00004017_690490b212df4d5eacc6635c_trimesh_013.obj: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1cc38ca79d2108f89af8029fbca4ee2e9660ab3ee653f78f688a379441a273ca 3 | size 2942008 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/obj/abc_0000_obj_v00/00004021/00004021_690490b212df4d5eacc6635c_trimesh_017.obj: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c0504ecac74e8843d4679ace3442bb009a94f217f49ab747a0bd5efc368def4e 3 | size 4961542 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/obj/abc_0000_obj_v00/00005021/00005021_0a675fbb89444f1a91da0315_trimesh_006.obj: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:68572b0032afb846b44765d01da0e066968e1b551cbb3bd6e00a8f719546e50e 3 | size 4326554 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/obj/abc_0000_obj_v00/00005022/00005022_0a675fbb89444f1a91da0315_trimesh_007.obj: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:36e0cd5d3d2acdd91441c0a39254bcd22b252903563a956481953af33b8610ee 3 | size 19138560 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/obj/abc_0000_obj_v00/00005045/00005045_51a7e299c47e4228b019c74b_trimesh_011.obj: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:14e31c748139012517d501c78ff5443cbfb76a2dd476cdced106e87c7242ccbd 3 | size 3914731 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/abc_dataset/obj_v00.txt: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:856b99dbeac8c5b6b56d8679f67635b631da61decea374b03aa8afcf0cd4f473 3 | size 74 4 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/comp_time.m: -------------------------------------------------------------------------------- 1 | close all; clear; clc; 2 | 3 | addpath(genpath('./../utils')); addpath(genpath('./../solutions')); 4 | set(0,'DefaultFigureWindowStyle','normal') %'normal' 'docked' 5 | set(0,'defaulttextInterpreter','latex'); set(groot, 'defaultAxesTickLabelInterpreter','latex'); set(groot, 'defaultLegendInterpreter','latex'); set(0,'defaultfigurecolor',[1 1 1]) 6 | 7 | 8 | interv=[-1,1]; 9 | 10 | 11 | all_deg=2:7;% 12 | % all_subdiv=1:6; 13 | all_break_points=2:8;%Only used for Slefe 14 | 15 | 16 | all_ratios=zeros(numel(all_break_points), numel(all_deg)); 17 | 18 | 19 | for i=1:numel(all_break_points) 20 | 21 | num_seg=all_break_points(i)-1; 22 | 23 | i 24 | 25 | for j=1:numel(all_deg) 26 | 27 | j 28 | 29 | deg=all_deg(j); 30 | 31 | A_MV=getA_MV(deg, interv); 32 | A_Be=getA_Be(deg, interv); 33 | A_Be_invA_MV=double(A_Be*inv(A_MV)); %This tabulation is done offline 34 | 35 | 36 | tmp_SLEFE=[]; 37 | tmp_MV=[]; 38 | 39 | for tmp=1:30 40 | 41 | P=generateRandPol1D(deg,interv); 42 | V_Be=P*inv(A_Be); 43 | 44 | [t_break_points, p_down, p_up, comp_time_slefe]=computeSlefeScalarSpeedOptimized(P, deg, num_seg, interv); %Note that, internally, this function uses the Bezier CPs. But the conversion P --> V_Be is not taken into account for the timer 45 | % [t_break_points2, p_down2, p_up2, comp_time_slefe]=computeSlefeScalar(P, deg, num_seg, interv); 46 | % 47 | % % isequal(p_up,p_up2) 48 | % % isequal(p_down,p_down2) 49 | 50 | 51 | tic 52 | V_Be*A_Be_invA_MV; 53 | comp_time_MV=toc; 54 | 55 | tmp_SLEFE=[tmp_SLEFE;comp_time_slefe]; 56 | tmp_MV=[tmp_MV;comp_time_MV]; 57 | 58 | 59 | end 60 | all_ratios(i,j)=mean(tmp_SLEFE)/mean(tmp_MV); 61 | end 62 | end 63 | 64 | vpa(all_ratios,3) 65 | 66 | 67 | mean(all_ratios(:)) -------------------------------------------------------------------------------- /src/comparison_with_slefes/create_curves_reviewer_mat.m: -------------------------------------------------------------------------------- 1 | clc; clear; close all; 2 | 3 | interv=[-1,1]; 4 | 5 | Pa=[3.34115869751238792, -0.12572358236293199; 6 | -0.99258948444093420, -0.08726938252180805; 7 | 0.18698463813093191, 0.07775396198589613; 8 | 0.22170068207754312, -0.05810072034972591; 9 | 0.65096214721255929, 0.01521124989580486; 10 | -1.98500774224586607, 0.03732748662786300; 11 | 1.77037734360645338, -0.04438449602466543; 12 | -0.54395295849079517, 0.01489729894652281; 13 | -0.00007633534108420, -0.00003252722792832]'; 14 | 15 | Pb=[2.64955698802109740, -0.17032071103097479; 16 | -1.61253965198086036, -0.07303550877844978; 17 | 2.11066147002008719, 0.20780457844813049; 18 | 0.12622621036667425, -0.29774468825977385; 19 | -10.40544788074401872, 0.27284015459226763; 20 | 26.50598191241082446, -0.03243084013165731; 21 | -31.64520219159549086, -0.23399751004035352; 22 | 18.82082952447404267, 0.22328847392002693; 23 | -4.48873587903633275, -0.06479010598509549]'; 24 | 25 | Pc=[2.06133050193587586, -0.16838615726588466; 26 | -0.06985677615436003, 0.00962970518327722; 27 | 0.06233914660861828, -0.00345318736421807; 28 | -0.08584278586624094, 0.00621083302737202; 29 | 0.04133845772184230, 0.00265187402342576; 30 | -0.00147396867568261, -0.00216768731643202; 31 | 0.00073698433779157, 0.00108384365812586; 32 | -0.00021056695361210, -0.00030966961656476; 33 | 0.00002632086922283, 0.00003870870206238]'; 34 | 35 | Pd=[2.00838731382344404, -0.15470173696884201; 36 | -0.03306833695344835, 0.02291796942835211; 37 | -0.17435860399669600, 0.04629746175401139; 38 | 1.69195785691483636, 0.32042395436038462; 39 | -4.45700292276443033, -1.81537826928605561; 40 | 5.75507559973297234, 3.27781842717398320; 41 | -3.70260047831342654, -2.58159085931029120; 42 | 0.94772743722552732, 0.75848946894638547; 43 | -0.00000000000000044, -0.00000000000005448]'; 44 | 45 | Pa=flip(Pa,2); 46 | Pb=flip(Pb,2); 47 | Pc=flip(Pc,2); 48 | Pd=flip(Pd,2); 49 | 50 | Pa=convertCoeffMatrixFromABtoCD(Pa,[0,1],interv); 51 | Pb=convertCoeffMatrixFromABtoCD(Pb,[0,1],interv); 52 | Pc=convertCoeffMatrixFromABtoCD(Pc,[0,1],interv); 53 | Pd=convertCoeffMatrixFromABtoCD(Pd,[0,1],interv); 54 | 55 | P={}; 56 | P{end+1}=Pd; 57 | P{end+1}=Pc; 58 | P{end+1}=Pb; 59 | P{end+1}=Pa; 60 | 61 | save('curve_current_reviewer','P') 62 | -------------------------------------------------------------------------------- /src/comparison_with_slefes/curve_current_reviewer.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/comparison_with_slefes/curve_current_reviewer.mat -------------------------------------------------------------------------------- /src/comparison_with_slefes/data_comparison_slefes_nonsmooth.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/comparison_with_slefes/data_comparison_slefes_nonsmooth.mat -------------------------------------------------------------------------------- /src/comparison_with_slefes/data_comparison_slefes_smooth.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/comparison_with_slefes/data_comparison_slefes_smooth.mat -------------------------------------------------------------------------------- /src/comparison_with_slefes/filterVerticesPolyShape.m: -------------------------------------------------------------------------------- 1 | function vertices=filterVerticesPolyShape(poly) 2 | 3 | vertices=poly.Vertices; 4 | vertices(any(isnan(vertices), 2), :) = []; %remove the rows with nnan 5 | vertices=uniquetol(vertices,'ByRows',true); %See https://www.mathworks.com/help/matlab/ref/uniquetol.html 6 | 7 | end -------------------------------------------------------------------------------- /src/comparison_with_slefes/formatNumber.m: -------------------------------------------------------------------------------- 1 | function result=formatNumber(number, digits) 2 | tmp=num2str(number,2); 3 | if(contains(tmp,'e')) 4 | %Number is in engineering format (e.g., 2e+5) 5 | result=strrep(tmp,'+0',''); %strrep will change 1e+02--> 1e2 (for shorter notation) 6 | else 7 | result=num2str(number,['%.',num2str(digits),'f']); 8 | end 9 | end -------------------------------------------------------------------------------- /src/comparison_with_slefes/plotCurve.m: -------------------------------------------------------------------------------- 1 | function plotCurve(P,interv) 2 | deg=size(P,2)-1; %degree 3 | syms t real 4 | T=getT(deg,t); fplot(P(1,:)*T,P(2,:)*T,interv,'r','LineWidth',2); 5 | end -------------------------------------------------------------------------------- /src/comparison_with_slefes/plotMatrix.m: -------------------------------------------------------------------------------- 1 | function plotMatrix(matrix_value, label_colorbar, all_deg, all_seg,font_size) 2 | 3 | imagesc(matrix_value); %title (title_string); 4 | 5 | %%%% Label Stuff 6 | xlabel('$n$'); ylabel('$s$'); 7 | c=colorbar; c.Label.Interpreter = 'latex'; c.Label.String = label_colorbar; c.TickLabelInterpreter= 'latex'; c.Label.FontSize=13; 8 | 9 | caxis([0,2]) 10 | 11 | tmp=c.TickLabels; 12 | c.TickLabels{end}=['$>',c.TickLabels{end},'$']; 13 | 14 | xticklabels(sprintfc('%d',all_deg)); yticklabels(sprintfc('%d',all_seg)); %yticklabels(sprintfc('%d',flip(all_seg))); 15 | set(gca, 'YTick', 1:numel(all_seg)); set(gca, 'XTick', 1:numel(all_deg)); 16 | %%%% 17 | 18 | % font_size=4.6; 19 | 20 | %%%Plot rectangles 21 | hold on; 22 | for i=1:size(matrix_value,1) 23 | for j=1:size(matrix_value,2) 24 | 25 | value_string=num2str(formatNumber(matrix_value(i,j),2)); 26 | if(matrix_value(i,j)>1) %MINVO performs better 27 | rectangle('Position',[j-0.5,i-0.5,1.0,1.0],'EdgeColor','r','LineWidth',1.3) 28 | % plot([j-0.5,j+0.5],[i-0.5,i+0.5]) 29 | % plot(j,i,'.r') 30 | text(j,i,['\textbf{',value_string,'}'],'HorizontalAlignment','center','FontSize',font_size,'Color','r') 31 | else 32 | text(j,i,value_string,'HorizontalAlignment','center','FontSize',font_size,'Color','k') 33 | end 34 | end 35 | end 36 | end -------------------------------------------------------------------------------- /src/curve_given3D.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | %% RESULT for 3D for a given curve 10 | close all; clear; clc; 11 | 12 | addpath(genpath('./utils')); addpath(genpath('./solutions')); 13 | interv=[-1,1]; 14 | syms t real; T3=[t*t*t t*t t 1]'; 15 | 16 | view1=30; view2=30; figure; set(gcf, 'Position', [500, 500, 3000, 1000]) 17 | 18 | %The given polynomial curve 19 | P=[ 0.7160 -0.1370 -0.4618 0.3999; 20 | 0.3365 0.8679 -0.2322 0.2508; 21 | 0.4907 -0.0914 -0.8137 0.4999]; 22 | 23 | disp("______________________________"); 24 | %%%% MINVO basis 25 | subplot(1,3,1);hold on; plotAxesArrows(1.0); 26 | 27 | A=getA_MV(3,interv); 28 | pol_x=P(1,:)'; pol_y=P(2,:)'; pol_z=P(3,:)'; 29 | 30 | volumen_minvo=plot_convex_hull(pol_x,pol_y,pol_z,A,'g',0.017); 31 | fplot3(pol_x'*T3,pol_y'*T3,pol_z'*T3,interv,'r','LineWidth',3); view(view1, view2); axis equal; 32 | 33 | disp("The vertexes of the simplex generated by the MINVO basis are"); 34 | V=P*inv(A) 35 | fprintf("Total volume of the simplex=%f\n", volumen_minvo) 36 | 37 | disp("______________________________"); 38 | %%%% Bernstein basis 39 | subplot(1,3,2); hold on; plotAxesArrows(1.0); 40 | 41 | A=getA_Be(3,interv); 42 | 43 | volumen_bernstein=plot_convex_hull(pol_x,pol_y,pol_z,A,'b',0.02); 44 | fplot3(pol_x'*T3,pol_y'*T3,pol_z'*T3,interv,'r','LineWidth',3); view(view1, view2); axis equal; 45 | 46 | disp("The vertexes of the simplex generated by the Bernstein (Bezier) basis are"); 47 | V=P*inv(A) 48 | fprintf("Total volume of the simplex=%f\n", volumen_bernstein) 49 | 50 | disp("______________________________"); 51 | %%%% BSpline basis 52 | subplot(1,3,3); hold on; plotAxesArrows(1.0); 53 | A=getA_BS(3,interv); 54 | 55 | volumen_bspline=plot_convex_hull(pol_x,pol_y,pol_z,A,'y',0.2); 56 | fplot3(pol_x'*T3,pol_y'*T3,pol_z'*T3,interv,'r','LineWidth',3); view(view1, view2); axis equal; 57 | 58 | disp("The vertexes of the simplex generated by the B-Spline basis are"); 59 | V=P*inv(A) 60 | fprintf("Total volume of the simplex=%f\n", volumen_bspline) 61 | -------------------------------------------------------------------------------- /src/other/conversionMinvo_Bs_Bezier.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | clc; clear; 10 | 11 | interv=[0,1]; 12 | 13 | %% For n=3 14 | 15 | A_be=getA_Be(3,interv); 16 | A_bs_seg0=computeMatrixForClampedUniformBSpline(3,0,interv); 17 | A_bs_seg1=computeMatrixForClampedUniformBSpline(3,1,interv); 18 | A_bs_rest=computeMatrixForClampedUniformBSpline(3,2,interv); 19 | A_bs_seg_last2=computeMatrixForClampedUniformBSpline(3,-2,interv); 20 | A_bs_seg_last=computeMatrixForClampedUniformBSpline(3,-1,interv); 21 | 22 | A_mv=getA_MV(3,interv); 23 | 24 | Mbs2mv_seg0=A_bs_seg0*inv(A_mv); 25 | Mbs2mv_seg1=A_bs_seg1*inv(A_mv); 26 | Mbs2mv_rest=A_bs_rest*inv(A_mv); 27 | Mbs2mv_seg_last2=A_bs_seg_last2*inv(A_mv); 28 | Mbs2mv_seg_last=A_bs_seg_last*inv(A_mv); 29 | 30 | Mbs2be_seg0=A_bs_seg0*inv(A_be); 31 | Mbs2be_seg1=A_bs_seg1*inv(A_be); 32 | Mbs2be_rest=A_bs_rest*inv(A_be); 33 | Mbs2be_seg_last2=A_bs_seg_last2*inv(A_be); 34 | Mbs2be_seg_last=A_bs_seg_last*inv(A_be); 35 | 36 | 37 | %% For n=2 38 | 39 | A_be=getA_Be(2,interv); 40 | A_bs_seg0=computeMatrixForClampedUniformBSpline(2,0,interv); 41 | A_bs_rest=computeMatrixForClampedUniformBSpline(2,1,interv); 42 | A_bs_seg_last=computeMatrixForClampedUniformBSpline(2,-1,interv); 43 | 44 | A_mv=getA_MV(2,interv); 45 | 46 | Mbs2mv_seg0=A_bs_seg0*inv(A_mv); 47 | Mbs2mv_rest=A_bs_rest*inv(A_mv); 48 | Mbs2mv_seg_last=A_bs_seg_last*inv(A_mv); 49 | 50 | Mbs2be_seg0=A_bs_seg0*inv(A_be); 51 | Mbs2be_rest=A_bs_rest*inv(A_be); 52 | Mbs2be_seg_last=A_bs_seg_last*inv(A_be); 53 | 54 | 55 | % Mbs2mv=A_bs*inv(A_mv); 56 | % 57 | % 58 | % Mbs2be=A_bs*inv(A_be); 59 | 60 | %% For n=1 61 | 62 | %Everything here is for the interval [0,1] 63 | A_be=getA_Be(1,interv); 64 | A_bs=getA_BS(1,interv); 65 | A_mv=getA_MV(1,interv); 66 | 67 | Mbs2mv=A_bs*inv(A_mv); 68 | 69 | 70 | Mbs2be=A_bs*inv(A_be); -------------------------------------------------------------------------------- /src/other/plots_projection4DTo2D.m: -------------------------------------------------------------------------------- 1 | %% Non-rational curves (projection) 2 | close all; clear; clc; 3 | 4 | addpath(genpath('./../utils')); 5 | addpath(genpath('./../solutions')); 6 | 7 | interv=[-1,1]; 8 | 9 | set(0,'DefaultFigureWindowStyle','normal') %'normal' 'docked' 10 | set(0,'defaulttextInterpreter','latex');set(groot, 'defaultAxesTickLabelInterpreter','latex'); set(groot, 'defaultLegendInterpreter','latex');set(0,'defaultfigurecolor',[1 1 1]) 11 | 12 | syms t real 13 | 14 | T1=[t 1]'; 15 | T2=[t*t t 1]'; 16 | T3=[t*t*t t*t t 1]'; 17 | T4=[t*t*t*t t*t*t t*t t 1]'; 18 | T5=[t^5 T4']'; 19 | T6=[t^6 T5']'; 20 | T7=[t^7 T6']'; 21 | V=[zeros(4,1) eye(4)]; %Standard simplex 22 | 23 | linewidth=2; 24 | 25 | A=getA_MV(4,interv); 26 | % P=V*A; 27 | 28 | T4=getT(4,t); 29 | 30 | px=A(2,:)*T4; 31 | py=A(3,:)*T4; 32 | pz=A(4,:)*T4; 33 | pw=A(5,:)*T4; 34 | assume(t,'real') 35 | figure; 36 | subplot(2,2,1);hold on; 37 | 38 | % curve_projected=(1/(px+pz))*[px pz]'; 39 | 40 | curve_projected=(1/(1-pw-py))*[px pz]'; 41 | 42 | patch([0 0 1],[0 1 0],'green','FaceAlpha',.3); 43 | fplot(curve_projected(1),curve_projected(2),interv,'LineWidth',linewidth); %Note that we are using the standard simplex 44 | 45 | 46 | A=getA_MV(3,interv); 47 | 48 | px=A(2,:)*T3; 49 | py=A(3,:)*T3; 50 | pz=A(4,:)*T3; 51 | 52 | curve_projected=(-1/(py-1))*[px pz]'; 53 | 54 | fplot(curve_projected(1),curve_projected(2),interv,'LineWidth',linewidth); %Note that we are using the standard simplex 55 | -------------------------------------------------------------------------------- /src/other/projection_4D_to_2D.m: -------------------------------------------------------------------------------- 1 | %% Non-rational curves (projection) 2 | close all; clear; clc; 3 | 4 | addpath(genpath('./utils')); 5 | addpath(genpath('./solutions')); 6 | 7 | interv=[-1,1]; 8 | 9 | set(0,'DefaultFigureWindowStyle','normal') %'normal' 'docked' 10 | set(0,'defaulttextInterpreter','latex');set(groot, 'defaultAxesTickLabelInterpreter','latex'); set(groot, 'defaultLegendInterpreter','latex');set(0,'defaultfigurecolor',[1 1 1]) 11 | 12 | syms t real 13 | 14 | T1=[t 1]'; 15 | T2=[t*t t 1]'; 16 | T3=[t*t*t t*t t 1]'; 17 | T4=[t*t*t*t t*t*t t*t t 1]'; 18 | T5=[t^5 T4']'; 19 | T6=[t^6 T5']'; 20 | T7=[t^7 T6']'; 21 | V=[zeros(4,1) eye(4)]; %Standard simplex 22 | 23 | linewidth=2; 24 | 25 | A=getA_MV(4,interv); 26 | % P=V*A; 27 | 28 | T4=getT(4,t); 29 | 30 | px=A(2,:)*T4; 31 | py=A(3,:)*T4; 32 | pz=A(4,:)*T4; 33 | pw=A(5,:)*T4; 34 | assume(t,'real') 35 | figure; 36 | subplot(2,2,1);hold on; 37 | 38 | % curve_projected=(1/(px+pz))*[px pz]'; 39 | 40 | curve_projected=(1/(1-pw-py))*[px pz]'; 41 | 42 | patch([0 0 1],[0 1 0],'green','FaceAlpha',.3); 43 | fplot(curve_projected(1),curve_projected(2),interv,'LineWidth',linewidth); %Note that we are using the standard simplex 44 | 45 | 46 | A=getA_MV(3,interv); 47 | 48 | px=A(2,:)*T3; 49 | py=A(3,:)*T3; 50 | pz=A(4,:)*T3; 51 | 52 | curve_projected=(-1/(py-1))*[px pz]'; 53 | 54 | fplot(curve_projected(1),curve_projected(2),interv,'LineWidth',linewidth); %Note that we are using the standard simplex 55 | -------------------------------------------------------------------------------- /src/other/test_recursivity.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | %%This file tries to check numerically if there exists a recursive formula of the polynomials 10 | %%of the MINVO basis. It does so by imposing conditions between the 11 | %%polynomials of different n, and then solving by least squares 12 | 13 | close all; clear; clc; 14 | 15 | addpath(genpath('./utils')); 16 | addpath(genpath('./solutions')); 17 | 18 | global interv 19 | interv=[0,1]; 20 | 21 | t=sym('t',[1,1], 'real') 22 | getLambda(2,1,t) 23 | 24 | n_initial=2; 25 | n_final=2; 26 | q=9; 27 | 28 | a=sym('a',[1,q+1],'real'); 29 | b=sym('b',[1,q+1],'real'); 30 | c=sym('c',[1,q+1],'real'); 31 | 32 | eqs=[]; 33 | 34 | 35 | for n=n_initial:n_final 36 | 37 | for i=1:(n+1) 38 | 39 | lambda_np1_i= getLambda(n+1,i,t); 40 | lambda_n_i= getLambda(n,i,t); 41 | lambda_n_im1= getLambda(n,i-1,t); 42 | 43 | blend1=a*getT(q,t); 44 | blend2=b*getT(q,t); 45 | 46 | should_be_zero=lambda_np1_i-(blend1*lambda_n_i+blend2*lambda_n_im1 ); 47 | 48 | % should_be_zero=lambda_np1_i-(blend1*lambda_n_i+blend2*lambda_n_im1); 49 | 50 | coeff1=coeffs(should_be_zero,t,'All'); 51 | eqs=[eqs coeff1==zeros(size(coeff1))]; 52 | end 53 | 54 | end 55 | 56 | 57 | [C,d]=equationsToMatrix(eqs); 58 | C=double(C); d=double(d); %% Cx=d 59 | 60 | [x,resnorm] = lsqlin(C,d,[],[]) 61 | 62 | if(resnorm<0.1) %If the residual is small enogh 63 | disp("Recursive formula Found") 64 | else 65 | disp('NOT found') 66 | end 67 | 68 | 69 | 70 | function result=getLambda(n,i,t) 71 | global interv 72 | 73 | 74 | % if(i<=0) 75 | % i 76 | % i=i+n+1 77 | % end 78 | % 79 | % if(i>(n+1)) 80 | % i 81 | % i=i-(n+1) 82 | % end 83 | % disp('===') 84 | % A=getA_MV(n,interv); 85 | % result= A(i,:)*getT(n,t); 86 | 87 | 88 | if(i<1 || i>(n+1)) 89 | result=0*t; 90 | else 91 | A=getA_MV(n,interv); 92 | result= A(i,:)*getT(n,t); 93 | end 94 | 95 | 96 | 97 | end -------------------------------------------------------------------------------- /src/other_solvers/gloptipoly/formula_gloptipoly.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | close all; clc; clear; 11 | 12 | % mset('yalmip',true); 13 | % mset(sdpsettings('solver','sdpt3')); 14 | 15 | deg=3; %breaks (not enough memory) if deg>3 16 | 17 | mpol('B',deg-1,1) 18 | mpol('R',(deg+1)/2, (deg-1)/2) 19 | mpol('t',1,1) %This is not optimized, but needed to handle symbolic expressions 20 | 21 | 22 | W=[]; 23 | %Insert half of the polynomials 24 | for i=1:((deg+1)/2) 25 | pol=-B(i)*(t-1); 26 | for j=1:(deg-1)/2 27 | pol=pol*((t-R(i,j))^2); 28 | end 29 | W=[W;pol]; 30 | end 31 | 32 | %Insert the other half (with -t) 33 | for i=1:((deg+1)/2) 34 | pol=-B(i)*(-t-1); 35 | for j=1:(deg-1)/2 36 | pol=pol*((-t-R(i,j))^2); 37 | end 38 | W=[W;pol]; 39 | end 40 | 41 | % Match the coefficients: 42 | coeffic=getCoeffMlp(sum(W),t); 43 | coeffic=[zeros(1,deg+1-length(coeffic)) coeffic]; 44 | 45 | %Create the A matrix: 46 | A=[]; 47 | for i=1:length(W) 48 | tmp=getCoeffMlp(W(i),t); 49 | A=[A; tmp]; 50 | end 51 | 52 | % d: relaxation order. SDP will be based on the moments up to order 2d. 53 | % 2d>= max ( deg(p),deg(g_i) ) 54 | d=10; %6 for deg=3 55 | %10 for deg=5 56 | P = msdp(max(det(A)),B>=0,coeffic==[zeros(1,deg) 1],d); 57 | 58 | % Solve Moment SDP 59 | [status,obj] = msol(P) 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/other_solvers/gloptipoly/getCoeffMlp.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | % 10 | % Obtain the coefficients of a polynomial in GloptiPoly, given a variable 11 | % Return in decreasing order. Example: a*t^3+bt^2+ct+d --> [a b c d] 12 | % EXAMPLE: 13 | % mpol('x',1,1); 14 | % mpol('y',1,1); 15 | % mpol('t',1,1); 16 | % 17 | % my_polynomial=x*x +2*x*y*t*t*t +y + 5*x*y*t; 18 | % 19 | % getCoeffMlp(my_polynomial,t) 20 | 21 | function coefficients= getCoeffMlp(polynomial, variable) 22 | 23 | scalar_coeffs=coef(polynomial); 24 | variables=listvar(polynomial); 25 | A=pow(polynomial); 26 | 27 | coefficients=[]; 28 | for i=1:length(variables) 29 | if(indvar(variables(i))==indvar(variable)) 30 | column_variable_in_A=i; 31 | break 32 | end 33 | end 34 | 35 | max_degree=max(A(:,column_variable_in_A)); 36 | 37 | coefficients=mpol(zeros(max_degree+1,1)); 38 | 39 | for i=1:size(A,1) %For each row (each monomial) 40 | tmp=scalar_coeffs(i)*mpol(1); 41 | 42 | for j=1:size(A,2) %For each column (each variable) 43 | if( j~=column_variable_in_A && A(i,j)~=0 ) 44 | tmp=tmp*power(variables(j),A(i,j)); 45 | end 46 | end 47 | 48 | degree=A(i,column_variable_in_A); 49 | 50 | coefficients(degree+1) = coefficients(degree+1) + tmp; 51 | end 52 | 53 | coefficients=flip(coefficients)'; 54 | 55 | 56 | end 57 | -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops/curveEndpoint.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | function output = curveEndpoint (input) 11 | 12 | global deg_pol coeff_pol_x coeff_pol_y coeff_pol_z dim coeff_pol 13 | 14 | V=[]; %V is a matrix whose columns are the control points v1,v2,v3,... 15 | for i=1:dim:size(input.parameter,2) 16 | V=[V input.parameter(1,i:i+(dim-1))']; 17 | end 18 | 19 | % v1=input.parameter(1:3)'; 20 | % v2=input.parameter(4:6)'; 21 | % v3=input.parameter(7:9)'; 22 | % v4=input.parameter(10:12)'; 23 | % 24 | % tmp=[v1 v2 v3 v4]; 25 | % tmp=[tmp;1 1 1 1]; 26 | 27 | tmp=[V;ones(1,size(V,2))]; %Add a row of ones at the bottom of V 28 | 29 | output.objective = abs(det(tmp)); %I want to minimize the volume 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops/fitCurveToRoots.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | sol2=load('solutionDeg2.mat'); 11 | sol3=load('solutionDeg3.mat'); 12 | sol4=load('solutionDeg4.mat'); 13 | sol5=load('solutionDeg5.mat'); 14 | 15 | 16 | scatter(2*ones(size(sol2.rootsA(:))), sol2.rootsA(:)); hold on 17 | scatter(3*ones(size(sol3.rootsA(:))), sol3.rootsA(:)) 18 | scatter(4*ones(size(sol4.rootsA(:))), sol4.rootsA(:)) 19 | scatter(5*ones(size(sol5.rootsA(:))), sol5.rootsA(:)) -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops/printeps.m: -------------------------------------------------------------------------------- 1 | function printeps(fignum, figname) 2 | % printeps(fignum, figname) 3 | % this is a simple function that overrides Matlab's desire to call all 4 | % fonts 'Helvetica' in an exported .eps file. This is particularly annoying 5 | % if you import your file into Illustrator and find that not only do you 6 | % NOT have 'Helvetica', but that in substituting for it, your subscripts 7 | % have moved a mile away and things otherwise just don't look 'right.' 8 | % It is suggested that you set your default font in a 9 | % startup file to something that you actually have on your system. For 10 | % instance, if you purchased the Helvetica family straight from Adobe, 11 | % set(0, 'DefaultAxesFontName', 'HelveticaLTStd-Roman'); 12 | % the whole point of this is that when you generate a figure in Matlab, 13 | % you'd like your exported file to be as close a representation of that 14 | % figure as possible. 15 | % J. Aumentado 16 | % 4/20/05 17 | % Note: This is a global change of font in the file. That is, any text you 18 | % add via text() and title() commands will end up in the default axes font. 19 | % this is because there is no easy way to parse out the fonts of these 20 | % objects in the .eps file for replacement. 21 | % 22 | % 23 | % EXAMPLE: 24 | % set(0, 'DefaultAxesFontName', 'Arial'); %replace fontname with something 25 | % %you have 26 | % figure(1);clf;fplot(@tanh,[-5,5]); %plot something 27 | % printeps(1,'test'); %print the contents of figure 1 28 | % %to test.eps. 29 | figfilestr = [figname '.eps']; 30 | eval(['print -depsc2 -f' num2str(fignum) ' ' figfilestr ';']); 31 | 32 | % now read in the file 33 | fid = fopen(figfilestr); 34 | ff = char(fread(fid))'; 35 | fclose(fid); 36 | 37 | %get the actual font 38 | figure(fignum); 39 | actualfont = get(gca,'FontName') 40 | 41 | %these are the only allowed fonts in MatLab and so we have to weed them out 42 | %and replace them: 43 | mlabfontlist = {'AvantGarde','Helvetica-Narrow','Times-Roman','Bookman',... 44 | 'NewCenturySchlbk','ZapfChancery','Courier','Palatino','ZapfDingbats',... 45 | 'Helvetica'};%,'Symbol'}; 46 | 47 | for k = 1:length(mlabfontlist) 48 | ff = strrep(ff,mlabfontlist{k},actualfont); 49 | end 50 | 51 | % open the file up and overwrite it 52 | fid = fopen(figfilestr,'w'); 53 | fprintf(fid,'%s',ff); 54 | fclose(fid); 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops/solutionGpopsDeg1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/other_solvers/gpops/tests_gpops/solutionGpopsDeg1.mat -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops/solutionGpopsDeg2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/other_solvers/gpops/tests_gpops/solutionGpopsDeg2.mat -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops/solutionGpopsDeg3.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/other_solvers/gpops/tests_gpops/solutionGpopsDeg3.mat -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops/solutionGpopsDeg4.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/other_solvers/gpops/tests_gpops/solutionGpopsDeg4.mat -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops/solutionGpopsDeg5.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/other_solvers/gpops/tests_gpops/solutionGpopsDeg5.mat -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops/solutionGpopsDeg7.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/other_solvers/gpops/tests_gpops/solutionGpopsDeg7.mat -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops2/curveContinuous.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | function output = curveContinuous( input ) 11 | %A is a matrix whose rows are the coefficients of the polynomials 12 | 13 | global num_of_states 14 | 15 | [B, R]=generateBR(input.phase.state); 16 | A=getA(B,R); 17 | 18 | tmp=sum(double(A))-[zeros(1,size(A,1)-1) 1]; 19 | 20 | output.path=repmat(tmp, size(input.phase.time,1),1); 21 | 22 | output.dynamics =zeros(size(input.phase(1).time,1),num_of_states); -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops2/curveEndpoint.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | function output = curveEndpoint (input) 11 | 12 | [B R]=generateBR(input.phase.finalstate); 13 | A=getA(B,R); 14 | 15 | obj=abs(double(det(A))); 16 | 17 | output.objective = -obj; %I want to maximize |A| 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops2/generateBR.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | function [B,R]= generateBR(parameters) 11 | 12 | global deg_pol 13 | 14 | B=parameters(1,1:((deg_pol+1)/2)); 15 | R=parameters(1,(deg_pol+1)/2+1:end); 16 | 17 | R=reshape(R, (deg_pol+1)/2, (deg_pol-1)/2); 18 | 19 | 20 | end -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops2/getA.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | function A=getA(B,R) 11 | global deg_pol t 12 | 13 | 14 | 15 | W=[]; 16 | %Insert half of the polynomials 17 | for i=1:((deg_pol+1)/2) 18 | pol=-B(i)*(t-1); 19 | for j=1:(deg_pol-1)/2 20 | pol=pol*((t-R(i,j))^2); 21 | end 22 | W=[W;pol]; 23 | end 24 | 25 | %Insert the other half 26 | W=[W;subs(W,t,-t)]; 27 | 28 | 29 | %Create the A matrix: 30 | A=[]; 31 | for i=1:length(W) 32 | tmp=coeffs(W(i),t,'All'); 33 | 34 | tmp=[zeros(1,deg_pol+1-length(tmp)) tmp]; 35 | 36 | A=[A; tmp]; 37 | end 38 | 39 | % vpa(W) 40 | % vpa(A) 41 | 42 | 43 | end -------------------------------------------------------------------------------- /src/other_solvers/gpops/tests_gpops2/printeps.m: -------------------------------------------------------------------------------- 1 | function printeps(fignum, figname) 2 | % printeps(fignum, figname) 3 | % this is a simple function that overrides Matlab's desire to call all 4 | % fonts 'Helvetica' in an exported .eps file. This is particularly annoying 5 | % if you import your file into Illustrator and find that not only do you 6 | % NOT have 'Helvetica', but that in substituting for it, your subscripts 7 | % have moved a mile away and things otherwise just don't look 'right.' 8 | % It is suggested that you set your default font in a 9 | % startup file to something that you actually have on your system. For 10 | % instance, if you purchased the Helvetica family straight from Adobe, 11 | % set(0, 'DefaultAxesFontName', 'HelveticaLTStd-Roman'); 12 | % the whole point of this is that when you generate a figure in Matlab, 13 | % you'd like your exported file to be as close a representation of that 14 | % figure as possible. 15 | % J. Aumentado 16 | % 4/20/05 17 | % Note: This is a global change of font in the file. That is, any text you 18 | % add via text() and title() commands will end up in the default axes font. 19 | % this is because there is no easy way to parse out the fonts of these 20 | % objects in the .eps file for replacement. 21 | % 22 | % 23 | % EXAMPLE: 24 | % set(0, 'DefaultAxesFontName', 'Arial'); %replace fontname with something 25 | % %you have 26 | % figure(1);clf;fplot(@tanh,[-5,5]); %plot something 27 | % printeps(1,'test'); %print the contents of figure 1 28 | % %to test.eps. 29 | figfilestr = [figname '.eps']; 30 | eval(['print -depsc2 -f' num2str(fignum) ' ' figfilestr ';']); 31 | 32 | % now read in the file 33 | fid = fopen(figfilestr); 34 | ff = char(fread(fid))'; 35 | fclose(fid); 36 | 37 | %get the actual font 38 | figure(fignum); 39 | actualfont = get(gca,'FontName') 40 | 41 | %these are the only allowed fonts in MatLab and so we have to weed them out 42 | %and replace them: 43 | mlabfontlist = {'AvantGarde','Helvetica-Narrow','Times-Roman','Bookman',... 44 | 'NewCenturySchlbk','ZapfChancery','Courier','Palatino','ZapfDingbats',... 45 | 'Helvetica'};%,'Symbol'}; 46 | 47 | for k = 1:length(mlabfontlist) 48 | ff = strrep(ff,mlabfontlist{k},actualfont); 49 | end 50 | 51 | % open the file up and overwrite it 52 | fid = fopen(figfilestr,'w'); 53 | fprintf(fid,'%s',ff); 54 | fclose(fid); 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/other_solvers/ncpol2sdpa/pointwise_formulation_ncpol2sdpa.py: -------------------------------------------------------------------------------- 1 | from ncpol2sdpa import * 2 | import numpy as np 3 | from sympy import * 4 | 5 | level = 3 6 | 7 | 8 | deg=3; 9 | num_el_A_cropped=(deg)*(deg+1); 10 | A_cropped_var = generate_variables('A', num_el_A_cropped) 11 | print A_cropped_var 12 | A_cropped=np.reshape(A_cropped_var, (deg, deg+1)) 13 | columns_sum=A_cropped.sum(axis=0); 14 | print((np.array([0,0,0,1])-columns_sum)).shape 15 | tmp=np.reshape([0,0,0,1]-columns_sum,(1,deg+1)); 16 | A=np.concatenate((A_cropped, tmp)); 17 | 18 | print(A) 19 | 20 | 21 | t=[-1.0, -0.77354858731953, -0.030882541230, 0.030882541230, 0.77354858731953, 1.0]; 22 | 23 | inequalities=[] 24 | for t_i in t: 25 | T=np.array([t_i**3, t_i**2, t_i**1, 1]) 26 | T=np.reshape(T, (deg+1, )); 27 | for j in range(deg+1): 28 | row_of_A=np.reshape(A[j:j+1,:], (deg+1, )); 29 | inequalities.append(np.inner(row_of_A,T)) 30 | 31 | print(inequalities) 32 | 33 | #Convert to simpy matrix 34 | A = Matrix(A) 35 | detA=A.det() 36 | 37 | obj=-detA; 38 | 39 | sdp=SdpRelaxation(flatten([A_cropped_var]),verbose=1) 40 | sdp.get_relaxation(level, objective=obj, inequalities=inequalities, chordal_extension=True) 41 | sdp.solve() 42 | print(sdp.primal, sdp.dual) -------------------------------------------------------------------------------- /src/other_solvers/other_formulations/polynomial3orderIn2d.m: -------------------------------------------------------------------------------- 1 | clc; clear; close all; 2 | V=rand(2,3); 3 | A=rand(3,4); 4 | A(end,:)= [0 0 0 1]-sum(A(1:end-1,:)); 5 | 6 | P=V*A; 7 | 8 | det_original=det([V' ones(3,1)]) 9 | 10 | % r= ones(4,1); 11 | r= rand(4,1)%[1 0 0 0]'; %It must be such that det(Aprime!=0) 12 | Aprime=[A ; r']; 13 | 14 | ev=[0 0 0 1]'; 15 | 16 | det_nuevo=(1/det(Aprime))*det([P' ev r]); 17 | 18 | 19 | 20 | A=rand(3,4); 21 | r=rand(4,1); 22 | [A' r]*[V' ones(3,1) zeos(3,1); 0 0 1] -------------------------------------------------------------------------------- /src/other_solvers/other_formulations/robust_optimization.m: -------------------------------------------------------------------------------- 1 | 2 | %Using robust optimization, doesn't seem to work for my problem 3 | 4 | %Read this tutorial for more details: https://yalmip.github.io/tutorial/robustoptimization/ 5 | clc; cloar; close all; 6 | 7 | n=3; 8 | A=sdpvar(n+1, n+1,'full'); 9 | sdpvar t 10 | 11 | constraints=[sum(A)==[zeros(1,size(A,1)-1) 1] ]; 12 | constraints = [constraints -1.0<= t <= 1.0, uncertain(t)]; 13 | constraints=[constraints A*getT(n,t)>=zeros(n+1,1) ]; 14 | 15 | settings=sdpsettings('usex0',1,'savesolveroutput',0,'savesolverinput',1,'solver','snopt','showprogress',1,'verbose',2,'debug',1,'fmincon.maxfunevals',300000,'fmincon.MaxIter', 300000); 16 | 17 | 18 | A_cropped=A(1:end-1,1:end-1); 19 | obj=-det(A_cropped,'polynomial'); 20 | sol = optimize(constraints,obj,settings) -------------------------------------------------------------------------------- /src/other_solvers/sparse_BSOS/.readme.txt.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/other_solvers/sparse_BSOS/.readme.txt.swp -------------------------------------------------------------------------------- /src/solutions/getA_MV.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | %Returns the A matrix for the MINVO basis (and the roots of each 10 | %polynomial of the basis) 11 | 12 | function [A rootsA]=getA_MV(degree, interval) 13 | 14 | 15 | % order stuff 16 | if(degree==0) 17 | co=[1]; 18 | elseif(degree==1) 19 | co=[1 2]; %correct order 20 | elseif(degree==2) 21 | co=[3 2 1]; %correct order 22 | elseif(degree==3) 23 | co=[1 4 2 3]; %correct order 24 | elseif(degree==4) 25 | co=[5 4 3 1 2]; %correct order 26 | elseif(degree==5) 27 | co=[3 4 2 5 1 6]; %correct order 28 | elseif(degree==6) 29 | co=[2 5 3 4 7 1 6]; %correct order 30 | elseif(degree==7) 31 | co=[3 6 1 8 4 5 2 7]; %correct order 32 | else 33 | %warning('on') 34 | %warning("Using approximated roots (i.e., feasible but not optimal)") 35 | [A rootsA]=getA_MV_Approx(degree, interval); 36 | return 37 | end 38 | 39 | sol=load(strcat('solutionDeg',num2str(degree),'.mat')); 40 | A_saved=sol.A; 41 | 42 | sol=load(strcat('rootsLambdaiDeg',num2str(degree),'.mat')); 43 | roots_lambdai=sol.roots_lambda_solution; 44 | 45 | 46 | A=[]; 47 | rootsA=[]; 48 | i=1; 49 | for j=co 50 | A=[A; A_saved(j,:)]; 51 | rootsA{i}=roots_lambdai{j}; 52 | i=i+1; 53 | end 54 | 55 | 56 | %Sort the roots in increasing order 57 | for j=1:length(rootsA) 58 | rootsA{j}=reshape(rootsA{j},1,[]); %Make sure its a row vector; 59 | rootsA{j}=sort(rootsA{j}); 60 | end 61 | 62 | 63 | A=convertCoeffMatrixFromABtoCD(A,[-1,1],interval); 64 | 65 | for j=1:length(rootsA) 66 | rootsA{j}=convertNumberFromABtoCD(rootsA{j},[-1,1],interval); 67 | end 68 | 69 | 70 | end -------------------------------------------------------------------------------- /src/solutions/getA_MV_Approx.m: -------------------------------------------------------------------------------- 1 | function [A rootsA]=getA_MV_Approx(n,interv) 2 | 3 | rootsA=getRoots_MV_Approx(n,interv); 4 | 5 | %Now I need to compute the coefficients of the polynomial that satisfy A'1=ee 6 | 7 | ee=[zeros(1,n) 1]'; 8 | 9 | %Option 1: Use symbolic toolbox 10 | % b=sym('b', [n+1 1],'real'); 11 | % A=[]; 12 | % for i=0:n 13 | % A=[A; b(i+1)*poly(approx_mv_roots(indexes==i))]; 14 | % end 15 | % b_solved=solve(sum(A)==[zeros(1,n) 1]); 16 | % A=double(subs(A,b_solved)) 17 | 18 | 19 | %Option 2 (same as before, but solve "manually" the linear system avoiding 20 | % the symbolic toolbox) 21 | C=[]; 22 | for i=1:(n+1) 23 | C=[C; poly(rootsA{i})]; 24 | end 25 | 26 | b=linsolve(C',ee); %Other options: b=C'\ee; b=pinv(C')*ee; TODO: this step can run into numerical issues if n is very large, because C is close to singular. 27 | A=diag(b)*C; 28 | 29 | %Option 3 30 | % C=[]; 31 | % for i=1:(n+1) 32 | % C=[C; poly(rootsA{i})]; 33 | % end 34 | % b=sym('b', [n+1 1],'real'); 35 | % tt=linspace(-1,1,n+1)'.^(n:-1:0); 36 | % b_solved=solve(sum(diag(b)*C*tt)==ones(1,n+1)) 37 | % A=double(diag(subs(b,b_solved))*C); 38 | 39 | % norm(sum(A)-ee'); 40 | % assert(norm(sum(A)-ee')<1e-3); 41 | 42 | end -------------------------------------------------------------------------------- /src/solutions/getAllRoots_MV.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | function all_roots=getAllRoots_MV(degree, interv) 10 | 11 | % if(degree>7 || degree<=0) 12 | % error('not implemented yet!') 13 | % end 14 | % 15 | % if(degree==1) 16 | % tangency_points= []; 17 | % else 18 | % 19 | % sol=load(strcat('solutionTangencyPointsDeg',num2str(degree),'.mat')); 20 | % tangency_points=sol.tangencyPoints; 21 | % 22 | % end 23 | % 24 | % 25 | % for i=1:length(tangency_points) 26 | % tangency_points(i)=convertNumberFromABtoCD(tangency_points(i),[-1,1],interv); 27 | % end 28 | 29 | [A,rA]=getA_MV(degree,interv); 30 | 31 | all_roots=unique(cell2mat(rA)); 32 | 33 | end -------------------------------------------------------------------------------- /src/solutions/old/solutionTangencyPointsDeg2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/old/solutionTangencyPointsDeg2.mat -------------------------------------------------------------------------------- /src/solutions/old/solutionTangencyPointsDeg3.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/old/solutionTangencyPointsDeg3.mat -------------------------------------------------------------------------------- /src/solutions/old/solutionTangencyPointsDeg4.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/old/solutionTangencyPointsDeg4.mat -------------------------------------------------------------------------------- /src/solutions/old/solutionTangencyPointsDeg5.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/old/solutionTangencyPointsDeg5.mat -------------------------------------------------------------------------------- /src/solutions/old/solutionTangencyPointsDeg6.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/old/solutionTangencyPointsDeg6.mat -------------------------------------------------------------------------------- /src/solutions/old/solutionTangencyPointsDeg7.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/old/solutionTangencyPointsDeg7.mat -------------------------------------------------------------------------------- /src/solutions/readme.txt: -------------------------------------------------------------------------------- 1 | These solutions are for t \in [-1,1] 2 | -------------------------------------------------------------------------------- /src/solutions/rootsLambdaiDeg0.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/rootsLambdaiDeg0.mat -------------------------------------------------------------------------------- /src/solutions/rootsLambdaiDeg1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/rootsLambdaiDeg1.mat -------------------------------------------------------------------------------- /src/solutions/rootsLambdaiDeg2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/rootsLambdaiDeg2.mat -------------------------------------------------------------------------------- /src/solutions/rootsLambdaiDeg3.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/rootsLambdaiDeg3.mat -------------------------------------------------------------------------------- /src/solutions/rootsLambdaiDeg4.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/rootsLambdaiDeg4.mat -------------------------------------------------------------------------------- /src/solutions/rootsLambdaiDeg5.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/rootsLambdaiDeg5.mat -------------------------------------------------------------------------------- /src/solutions/rootsLambdaiDeg6.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/rootsLambdaiDeg6.mat -------------------------------------------------------------------------------- /src/solutions/rootsLambdaiDeg7.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/rootsLambdaiDeg7.mat -------------------------------------------------------------------------------- /src/solutions/solutionDeg0.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/solutionDeg0.mat -------------------------------------------------------------------------------- /src/solutions/solutionDeg1.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/solutionDeg1.mat -------------------------------------------------------------------------------- /src/solutions/solutionDeg2.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/solutionDeg2.mat -------------------------------------------------------------------------------- /src/solutions/solutionDeg3.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/solutionDeg3.mat -------------------------------------------------------------------------------- /src/solutions/solutionDeg4.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/solutionDeg4.mat -------------------------------------------------------------------------------- /src/solutions/solutionDeg5.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/solutionDeg5.mat -------------------------------------------------------------------------------- /src/solutions/solutionDeg6.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/solutionDeg6.mat -------------------------------------------------------------------------------- /src/solutions/solutionDeg7.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/solutions/solutionDeg7.mat -------------------------------------------------------------------------------- /src/utils/BezierPatchSurface/BezierPatchSurface/BezierCurveSurface.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/BezierPatchSurface/BezierPatchSurface/BezierCurveSurface.pdf -------------------------------------------------------------------------------- /src/utils/BezierPatchSurface/BezierPatchSurface/BezierPatchSurface.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/BezierPatchSurface/BezierPatchSurface/BezierPatchSurface.PNG -------------------------------------------------------------------------------- /src/utils/BezierPatchSurface/BezierPatchSurface/main.m: -------------------------------------------------------------------------------- 1 | clc, close all, clear all 2 | 3 | load('teapot'); %loading matrix S 4 | % % Matrix S stores all the control points of all the patches of 5 | % % teapot surface such that 6 | % % S(:,:,:,k) control points of kth patch, where k=1..32 7 | % % Size of S(:,:,:,k) is 4 x 4 x 3, i.e., 16 control points and each 8 | % % control point has three values (x,y,z) 9 | 10 | % % S(:,:,1,k): x-coordates of control points of kth patch as 4 x 4 matrix 11 | % % S(:,:,2,k): y-coordates of control points of kth patch as 4 x 4 matrix 12 | % % S(:,:,3,k): z-coordates of control points of kth patch as 4 x 4 matrix 13 | % % ------------------------------------ 14 | [r c d np]=size(S); 15 | % % np: number of patches 16 | ni=20; %number of interpolated values between end control points 17 | u=linspace(0,1,ni); v=u; %uniform parameterization 18 | % % Higher the value of ni smoother the surface but computationally 19 | % % expensive 20 | % % ------------------------------------ 21 | % % Cubic Bezier interpolation of control points of each patch 22 | for k=1:np 23 | Q(:,:,:,k)=bezierpatchinterp(S(:,:,:,k),u,v); %interpolation of kth patch 24 | end 25 | % % ------------------------------------ 26 | % % Plotting a signle Bezier Patch in many ways 27 | k=13; %ploting kth patch 28 | plotbezierpatch3D(S(:,:,:,k),Q(:,:,:,k)) 29 | 30 | xlabel('x') 31 | ylabel('y') 32 | zlabel('z') 33 | 34 | %% 35 | % % Plotting Bezier surface (all the patches) in many ways 36 | plotbeziersurface3D(S,Q) 37 | % % -------------------------------- 38 | % % This program or any other program(s) supplied with it does not provide any 39 | % % warranty direct or implied. 40 | % % This program is free to use/share for non-commerical purpose only. 41 | % % Kindly reference the author. 42 | % % Author: Dr. Murtaza Khan 43 | % % URL : http://www.linkedin.com/pub/dr-murtaza-khan/19/680/3b3 44 | % % -------------------------------- 45 | -------------------------------------------------------------------------------- /src/utils/BezierPatchSurface/BezierPatchSurface/readme.txt: -------------------------------------------------------------------------------- 1 | Cubic Bezier Patch and Surface 2 | --------------------------------------- 3 | Unzip the archive, add to current working directory and run the main.m program 4 | Following files are included in the archive: 5 | 6 | main.m 7 | A simple test program to construct a Bezier surface for given set of control points. The Bezier surface is composed of 32 patches. 8 | 9 | bezierpatchinterp.m 10 | A function to evaluate cubic Bezier patch for given set of 16 control points. It returns interpolated points. 11 | 12 | plotbezierpatch3D.m 13 | A function to plot cubic Bezier patch for given set of 16 control points and interpolated points. 14 | 15 | plotbeziersurface3D.m 16 | A function to plot cubic Bezier surface (one or more patches) for given set of control points and interpolated points for each patch. 17 | 18 | teapot.mat 19 | Data file that contains control points for 3D surface teapot. The surface composed of 32 patches. Each patch has 16 control points. Each control point has three values (x,y,z) 20 | 21 | BezierCurveSurface.pdf 22 | A brief description of Bezier curve and surface 23 | 24 | % % -------------------------------- 25 | % % This program or any other program(s) supplied with it does not provide 26 | % % warranty direct or implied. 27 | % % This program is free to use/share for non-commercial purpose only. 28 | % % Kindly reference the work. 29 | % % Author: Dr. Murtaza Khan 30 | % % URL : http://www.linkedin.com/pub/dr-murtaza-khan/19/680/3b3 31 | % % -------------------------------- 32 | 33 | -------------------------------------------------------------------------------- /src/utils/BezierPatchSurface/BezierPatchSurface/reference.txt: -------------------------------------------------------------------------------- 1 | Murtaza Khan, "Cubic Bezier Curve and Surface", Aug. 2012. 2 | ------------------------------------------------------------ 3 | LaTeX 4 | 5 | \bibitem{KhanAug2012} 6 | Murtaza Khan, \emph{Cubic Bezier Curve and Surface}, August 2012. -------------------------------------------------------------------------------- /src/utils/BezierPatchSurface/BezierPatchSurface/teapot.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/BezierPatchSurface/BezierPatchSurface/teapot.mat -------------------------------------------------------------------------------- /src/utils/BezierPatchSurface/author_and_license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Dr. Murtaza Khan 2 | All rights reserved. 3 | 4 | https://www.mathworks.com/matlabcentral/fileexchange/37876-construction-of-cubic-bezier-patch-and-surface 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are 8 | met: 9 | 10 | * Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in 14 | the documentation and/or other materials provided with the distribution 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/CaptureFigVid/CaptureFigVid_Example.m: -------------------------------------------------------------------------------- 1 | % Example of using CaptureFigVid 2 | % Cheers, Dr. Alan Jennings, Research assistant professor, 3 | % Department of Aeronautics and Astronautics, Air Force Institute of Technology 4 | 5 | %% Set up 3D plot to record 6 | figure(171);clf; 7 | surf(peaks,'EdgeColor','none','FaceColor','interp','FaceLighting','phong') 8 | daspect([1,1,.3]);axis tight; 9 | 10 | %% Set up recording parameters (optional), and record 11 | OptionZ.FrameRate=15;OptionZ.Duration=5.5;OptionZ.Periodic=true; 12 | CaptureFigVid([-20,10;-110,10;-190,80;-290,10;-380,10], 'WellMadeVid2',OptionZ) 13 | -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/CaptureFigVid/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/CaptureFigVid/CaptureFigVid/Thumbs.db -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/CaptureFigVid/WellMadeVid.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/CaptureFigVid/CaptureFigVid/WellMadeVid.mp4 -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/CaptureFigVid/WellMadeVid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/CaptureFigVid/CaptureFigVid/WellMadeVid.png -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/CaptureFigVid/WellMadeVid2.avi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/CaptureFigVid/CaptureFigVid/WellMadeVid2.avi -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/CaptureFigVid/html/CaptureFigVid_Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/CaptureFigVid/CaptureFigVid/html/CaptureFigVid_Example.png -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/CaptureFigVid/html/CaptureFigVid_Example_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/CaptureFigVid/CaptureFigVid/html/CaptureFigVid_Example_01.png -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/CaptureFigVid/html/CaptureFigVid_Example_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/CaptureFigVid/CaptureFigVid/html/CaptureFigVid_Example_02.png -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/CaptureFigVid/html/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/CaptureFigVid/CaptureFigVid/html/Thumbs.db -------------------------------------------------------------------------------- /src/utils/CaptureFigVid/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Alan Jennings 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the distribution 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /src/utils/ChebyshevRoots/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009, Russell Francis 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the distribution 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /src/utils/arrow3D_pub/ColorSpec_LongName_to_RGBvalue.m: -------------------------------------------------------------------------------- 1 | function RGBvalue = ColorSpec_LongName_to_RGBvalue(LongName) 2 | 3 | % RGBvalue = ColorSpec_LongName_to_RGBvalue(LongName) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | % 5 | % Given the color 'LongName' ('red','green',...) convert to the matrix equivalent 6 | % 7 | % Example: 8 | % val = ColorSpec_LongName_to_RGBvalue('magenta'); 9 | % ------> returns the three-element equivalent to magenta = [1 0 1] 10 | % 11 | % 12 | % Author: Shawn Arseneau 13 | % Created: September 14, 2006 14 | % 15 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 | 17 | switch(lower(LongName)) 18 | case 'yellow' 19 | RGBvalue = [1 1 0]; 20 | case 'magenta' 21 | RGBvalue = [1 0 1]; 22 | case 'cyan' 23 | RGBvalue = [0 1 1]; 24 | case 'red' 25 | RGBvalue = [1 0 0]; 26 | case 'green' 27 | RGBvalue = [0 1 0]; 28 | case 'blue' 29 | RGBvalue = [0 0 1]; 30 | case 'white' 31 | RGBvalue = [1 1 1]; 32 | case 'black' 33 | RGBvalue = [0 0 0]; 34 | otherwise 35 | RGBvalue = []; 36 | msg = sprintf('Unrecognized LongName: %s - See valid list (yellow, magenta, cyan, red, green, blue, white, black)', lower(LongName)); 37 | error(msg); 38 | return; 39 | end 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/utils/arrow3D_pub/ColorSpec_ShortName_to_RGBvalue.m: -------------------------------------------------------------------------------- 1 | function RGBvalue = ColorSpec_ShortName_to_RGBvalue(shortName) 2 | 3 | % RGBvalue = ColorSpec_ShortName_to_RGBvalue(shortName) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4 | % 5 | % Given the single character shortName ('r','g',...) convert to the matrix equivalent 6 | % 7 | % Example: 8 | % val = ColorSpec_ShortName_to_RGBvalue('m'); 9 | % -------> returns the three-element equivalent to 'm' (magenta) = [1 0 1] 10 | % 11 | % Author: Shawn Arseneau 12 | % Created: September 14, 2006 13 | % 14 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | 16 | switch(lower(shortName)) 17 | case 'y' 18 | RGBvalue = [1 1 0]; 19 | case 'm' 20 | RGBvalue = [1 0 1]; 21 | case 'c' 22 | RGBvalue = [0 1 1]; 23 | case 'r' 24 | RGBvalue = [1 0 0]; 25 | case 'g' 26 | RGBvalue = [0 1 0]; 27 | case 'b' 28 | RGBvalue = [0 0 1]; 29 | case 'w' 30 | RGBvalue = [1 1 1]; 31 | case 'k' 32 | RGBvalue = [0 0 0]; 33 | otherwise 34 | RGBvalue = []; 35 | msg = sprintf('Unrecognized ShortName: %s - See valid list (y, m, c, r, g, b, w, k)', lower(ShortName)); 36 | error(msg); 37 | return; 38 | end 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/utils/arrow3D_pub/demoArrow3D.m: -------------------------------------------------------------------------------- 1 | %% arrow3D - creates a single volumized arrow based on a cylinder/cone combination 2 | 3 | %% Basic Setup 4 | arrow3D([0,0,0] ,[1,2,3]); 5 | hold on; axis equal; xlabel('X'); ylabel('Y'); zlabel('Z'); 6 | title('Basic arrow3D call'); 7 | 8 | %% Enhancing Visual Appearance 9 | lighting phong; 10 | camlight right; 11 | title(''); 12 | 13 | 14 | %% Stem Ratio Options 15 | subplot(131); 16 | arrow3D([0,0,0], [0,0,3] , 'r', 0.25); 17 | hold on; axis equal; xlabel('X'); ylabel('Y'); zlabel('Z'); 18 | lighting phong; 19 | camlight right; 20 | title('Stem Ratio = 0.25'); 21 | 22 | subplot(132); 23 | arrow3D([0,0,0], [0,0,3], 'g', 0.5); 24 | hold on; axis equal; xlabel('X'); ylabel('Y'); zlabel('Z'); 25 | lighting phong; 26 | camlight right; 27 | title('Stem Ratio = 0.5'); 28 | 29 | subplot(133); 30 | arrow3D([0,0,0], [0,0,3], 'b', 0.75); 31 | hold on; axis equal; xlabel('X'); ylabel('Y'); zlabel('Z'); 32 | lighting phong; 33 | camlight right; 34 | title('Stem Ratio = 0.75'); 35 | 36 | %% arrow3D handle Options 37 | % The form of the arrowHandle is the same as 'surf'. arrowHandle = [arrowStem, arrowHead] 38 | subplot(131); 39 | hold off; 40 | arrow3D([0,0,0], [0,0,3], 'r'); 41 | hold on; axis equal; xlabel('X'); ylabel('Y'); zlabel('Z'); 42 | lighting phong; 43 | camlight right; 44 | 45 | subplot(132); 46 | hold off; 47 | arrowHandle = arrow3D([0,0,0], [0,0,3], 'r'); 48 | hold on; axis equal; xlabel('X'); ylabel('Y'); zlabel('Z'); 49 | set(arrowHandle(1), 'FaceColor', 'c'); 50 | lighting phong; 51 | camlight right; 52 | 53 | subplot(133); 54 | hold off; 55 | arrowHandle = arrow3D([0,0,0], [0,0,3], 'r'); 56 | hold on; axis equal; xlabel('X'); ylabel('Y'); zlabel('Z'); 57 | set(arrowHandle(1), 'FaceColor', 'c'); 58 | set(arrowHandle(2), 'FaceColor', 'b'); 59 | lighting phong; 60 | camlight right; 61 | 62 | 63 | %% Credits 64 | % Author: Shawn Arseneau 65 | % 66 | % Created: September 14, 2006 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/utils/arrow3D_pub/html/demoArrow3D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/arrow3D_pub/html/demoArrow3D.png -------------------------------------------------------------------------------- /src/utils/arrow3D_pub/html/demoArrow3D_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/arrow3D_pub/html/demoArrow3D_01.png -------------------------------------------------------------------------------- /src/utils/arrow3D_pub/html/demoArrow3D_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/arrow3D_pub/html/demoArrow3D_02.png -------------------------------------------------------------------------------- /src/utils/arrow3D_pub/html/demoArrow3D_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/arrow3D_pub/html/demoArrow3D_03.png -------------------------------------------------------------------------------- /src/utils/arrow3D_pub/html/demoArrow3D_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/arrow3D_pub/html/demoArrow3D_04.png -------------------------------------------------------------------------------- /src/utils/arrow3d/arrow3d.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/arrow3d/arrow3d.gif -------------------------------------------------------------------------------- /src/utils/arrow3d/readme.txt: -------------------------------------------------------------------------------- 1 | Taken from https://www.mathworks.com/matlabcentral/fileexchange/8396-draw-3d-arrows 2 | 3 | Changshun Deng (2020). Draw 3D arrows (https://www.mathworks.com/matlabcentral/fileexchange/8396-draw-3d-arrows), MATLAB Central File Exchange. Retrieved May 12, 2020. 4 | -------------------------------------------------------------------------------- /src/utils/arrow3d/rotatedata.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/arrow3d/rotatedata.m -------------------------------------------------------------------------------- /src/utils/bezier_bspline/computeMatrixForAnyBSpline.m: -------------------------------------------------------------------------------- 1 | function A=computeMatrixForAnyBSpline(deg, index_t_start, knots,interval) 2 | 3 | M=getM(deg, index_t_start, knots,interval); 4 | 5 | %And now change the order of the rows/columns to the convention I use 6 | A=[]; 7 | for i=1:size(M,1) 8 | A=[M(i,:)' A]; 9 | end 10 | 11 | 12 | A=convertCoeffMatrixFromABtoCD(A,[0,1],interval); 13 | 14 | end 15 | 16 | function M=getM(deg, index_t_start, knots,interval) 17 | 18 | %index_t_start is 1-based 19 | 20 | %Everything here is for interval t \in [0,1] 21 | 22 | %Following the notation from 23 | %https://link.springer.com/article/10.1007/s003710050206 24 | %("General matrix representations for B-splines" 25 | % See Theorem 1 of page 180 26 | 27 | 28 | if(deg>0) 29 | Mkm1=getM(deg-1, index_t_start, knots,interval); 30 | 31 | 32 | k=deg+1; 33 | i=index_t_start-1; 34 | 35 | 36 | d0_vector=[]; 37 | for jj=0:(k-2) 38 | j=i-k+2+jj; 39 | d0_vector=[d0_vector getd0(i,j,k,knots)]; 40 | end 41 | 42 | d1_vector=[]; 43 | for jj=0:(k-2) 44 | d1_vector=[d1_vector getd1(i,i-k+2+jj,k,knots)]; 45 | end 46 | 47 | Mk=[Mkm1; zeros(1,size(Mkm1,2))]*[diag([1-d0_vector])+(k>2)*diag([d0_vector(1:end-1)],1) [zeros(k-2,1);d0_vector(end)]]+... 48 | +[zeros(1,size(Mkm1,2)); Mkm1]*[diag([-d1_vector])+(k>2)*diag([d1_vector(1:end-1)],1) [zeros(k-2,1);d1_vector(end)]] ; 49 | 50 | M=Mk; 51 | else 52 | M=1; 53 | end 54 | 55 | 56 | 57 | 58 | end 59 | 60 | function result=getd0(i,j,k,knots) 61 | result=(knots(i+1)-knots(j+1))/(knots(j+k-1+1)-knots(j+1)); %Note that +1 is added due to the Matlab 1-indexing 62 | end 63 | 64 | function result=getd1(i,j,k,knots) 65 | result=(knots(i+1+1)-knots(i+1))/(knots(j+k-1+1)-knots(j+1));%Note that +1 is added due to the Matlab 1-indexing 66 | end 67 | 68 | % Mkm1=[1 0;-1 1]; 69 | % Mkm1=[ 0.5000 0.5000 0; 70 | % -1.0000 1.0000 0; 71 | % 0.5000 -1.0000 0.5000]; 72 | 73 | % clc; clear; 74 | % computeMatrixForAnyBSpline_buena(4,3,[0 0 0 0 1 1 1 1],[0,1]) 75 | % 76 | % deg=3; 77 | % index_t_start=4; 78 | % knots=[0 1 2 3 4 5 6]; 79 | % interval=[0,1]; -------------------------------------------------------------------------------- /src/utils/bezier_bspline/computeMatrixForClampedUniformBSpline.m: -------------------------------------------------------------------------------- 1 | 2 | function Abs=computeMatrixForClampedUniformBSpline(deg,segment_key,interval) 3 | 4 | % *****segment_key= 0 --> Will give the matrix for the segment 0 5 | % *****segment_key= 1 --> Will give the matrix for the segment 1 6 | % *****... 7 | % *****segment_key= deg-2 --> Will give the matrix for the segment deg-2 8 | 9 | % *****segment_key > deg-2 --> Will give the matrix for the segments not 10 | % included in the other options (which is the same matrix for all of them) 11 | 12 | % *****segment_key= "-(deg-2)" --> Will give the matrix for the segment deg-2 13 | 14 | % *****segment_key= -2 --> Will give the matrix for the second to last 15 | % *****segment (antepenultimo); 16 | % *****segment_key= -1 --> Will give the matrix for the last segment 17 | 18 | n_int_knots=15; %should be sufficiently big (TODO: don't hack this) 19 | deltaT=1/(n_int_knots+1); 20 | interm=deltaT*(1:n_int_knots); 21 | knots = [zeros(1,deg+1) interm (max(interm)+deltaT)*ones(1,deg+1)]; 22 | 23 | if(segment_key>=0) 24 | Abs=computeMatrixForAnyBSpline(deg,deg+1+segment_key,knots,interval); 25 | else 26 | Abs=computeMatrixForAnyBSpline(deg,size(knots,2)-deg+segment_key,knots,interval); 27 | end 28 | % 29 | % delta= 30 | % knots=[zeros(1,deg+1), , ones()] 31 | % 32 | % 33 | % if(segment_key==0) 34 | % 35 | % computeMatrixForClampedUniformBSpline 36 | % 37 | % if(deg==1) 38 | % Abs=[-1 1 ; 39 | % 1 0 ]; 40 | % elseif(deg==2) 41 | % Abs=(1/2)*[1 -2 1 ; 42 | % -2 2 1 ; 43 | % 1 0 0 ]; 44 | % elseif(deg==3) 45 | % Abs=(1/6)*[-1 3 -3 1; 46 | % 3 -6 0 4; 47 | % -3 3 3 1; 48 | % 1 0 0 0 ]; 49 | % else 50 | % error("Not implemented yet") 51 | % end 52 | % 53 | % 54 | % 55 | % if(interval=="m11") %[-1,1] 56 | % 57 | % Abs= convertAFrom01toM11(Abs); 58 | % 59 | % elseif(interval=="01")%[0,1] 60 | % %Don't do anything 61 | % else 62 | % error("not implemented yet") 63 | % end 64 | 65 | end -------------------------------------------------------------------------------- /src/utils/bezier_bspline/computeMatrixForNonClampedUniformBSpline.m: -------------------------------------------------------------------------------- 1 | function A=computeMatrixForNonClampedUniformBSpline(deg, interval) 2 | 3 | %Taken from page 182 of 4 | %https://link.springer.com/content/pdf/10.1007/s003710050206.pdf (general matrix representations for B-Splines) 5 | 6 | 7 | Mk=[1]; %this is for k=1 (i.e. deg =2) 8 | 9 | for k=2:(deg+1) 10 | 11 | Mkm1=Mk; 12 | 13 | Atmp=zeros(k-1,k); 14 | Btmp=zeros(k-1,k); 15 | for (i=1:(k-1)) 16 | Atmp(i,i)=i; 17 | Atmp(i,i+1)=k-i-1; 18 | 19 | Btmp(i,i)=-1; 20 | Btmp(i,i+1)=1; 21 | end 22 | 23 | 24 | Mk=(1/(k-1))*( [Mkm1; zeros(1,k-1)]*Atmp + [zeros(1,k-1); Mkm1]*Btmp ); 25 | 26 | end 27 | 28 | %And now change the order of the rows/columns to the convention I use 29 | A=[]; 30 | for i=1:size(Mk,1) 31 | A=[Mk(i,:)' A]; 32 | end 33 | 34 | %A is expressed in t\in[0,1] at this point 35 | 36 | A=convertCoeffMatrixFromABtoCD(A,[0,1],interval); 37 | 38 | % Other way would be to do this 39 | % knots=0:15; 40 | % segment_index=0; %The result is the same for all the segments 41 | % computeMatrixForAnyBSpline(deg,segment_index,knots,interval) %Not 42 | 43 | 44 | end 45 | -------------------------------------------------------------------------------- /src/utils/bezier_bspline/getA_BS.m: -------------------------------------------------------------------------------- 1 | %This function returns the matrix that is valid 2 | %--> for all the segments of a Clamped Uniform BSpline,except for the (deg-1) segments at the beginning and (deg-1) segments at the end 3 | %--> for all the segments of a NonClamped Uniform BSpline (knots=[a a+delta a+2delta a+3delta,....,a+r*delta, a+(r+1)*delta]) 4 | function A=getA_BS(deg, interval) 5 | 6 | A=computeMatrixForNonClampedUniformBSpline(deg,interval); 7 | 8 | %segment_key=deg; 9 | %A=computeMatrixForClampedUniformBSpline(deg,segment_key,interval); 10 | 11 | end -------------------------------------------------------------------------------- /src/utils/bezier_bspline/getA_Be.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | % Returns the A matrix for the Bernstein basis 10 | 11 | function A=getA_Be(deg,interval) 12 | 13 | syms t real 14 | 15 | A=[]; 16 | tmp=bernsteinMatrix(deg, t); 17 | for i=1:length(tmp) 18 | A=[A; double(coeffs(tmp(i),t,'All'))]; 19 | 20 | end 21 | 22 | %A is expressed in t\in[0,1] at this point 23 | 24 | A=convertCoeffMatrixFromABtoCD(A,[0,1],interval); 25 | 26 | end -------------------------------------------------------------------------------- /src/utils/convSym.m: -------------------------------------------------------------------------------- 1 | function result=convSym(a,b) %MATLAB conv() function doesn't work with symbolic variables 2 | 3 | syms t real 4 | nn=numel(a,2)-1; 5 | result=[]; 6 | poly_multiplication=(a(:)'*getT(numel(a)-1,t))*(b(:)'*getT(numel(b)-1,t)); %Note that discrete convolution is the same as polynomial multiplication 7 | coefficients=coeffs(poly_multiplication,t,'All'); 8 | coefficients=[zeros(1,2*nn-numel(coefficients)+1) coefficients]; 9 | result=[result ;coefficients]; 10 | 11 | end -------------------------------------------------------------------------------- /src/utils/convertCoeffMatrixFromABtoCD.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | %P expressed in [a,b] --> P expressed in [c,d] 10 | 11 | %Note that the spatial curve is the same one. I.e., denoting Pt=P*T and P_converted_t=P_converted*T 12 | % fplot(Pt(1,:),Pt(2,:), [a,b]); and 13 | % fplot(P_converted_t(1,:),P_converted_t(2,:), [c,d]); 14 | %generate the same plots 15 | 16 | %In other words, P_converted_t(c) = Pt(a) 17 | % P_converted_t(d) = Pt(b) 18 | % (and they also match in between) 19 | function P_converted=convertCoeffMatrixFromABtoCD(P,ab,cd) 20 | 21 | syms t real 22 | 23 | a=ab(1); 24 | b=ab(2); 25 | c=cd(1); 26 | d=cd(2); 27 | 28 | if(b<=a) 29 | error("Need b>a") 30 | end 31 | 32 | if(d<=c) 33 | error("Need d>c") 34 | end 35 | 36 | %tt=((d-c)/(b-a))*(t-a) + c; 37 | 38 | tt=((b-a)/(d-c))*(t-c)+a; 39 | 40 | T=[]; 41 | deg=size(P,2)-1; 42 | for i=0:(deg) 43 | T=[tt^i T]; 44 | end 45 | 46 | tmp=P*T'; 47 | 48 | P_converted=[]; 49 | 50 | for i=1:size(P,1) 51 | 52 | P_converted=[P_converted ;vpa(coeffs(tmp(i),t,'All'))]; 53 | end 54 | 55 | end -------------------------------------------------------------------------------- /src/utils/convertNumberFromABtoCD.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | %x expressed in [a,b] --> x expressed in [c,d] 10 | function x_converted=convertNumberFromABtoCD(x,ab_interval,cd_interval) 11 | 12 | a=ab_interval(1); 13 | b=ab_interval(2); 14 | c=cd_interval(1); 15 | d=cd_interval(2); 16 | 17 | 18 | if(b<=a) 19 | error("Need b>a") 20 | end 21 | 22 | if(d<=c) 23 | error("Need d>c") 24 | end 25 | 26 | x_converted=((d-c)/(b-a))*(x-a) + c; 27 | 28 | %x_converted=((b-a)/(d-c))*(x-c)+a; 29 | 30 | end -------------------------------------------------------------------------------- /src/utils/exportAsPdf.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | function exportAsPdf(handle, name_figure) 10 | 11 | set(handle,'Units','inches'); 12 | screenposition = get(handle,'Position'); 13 | set(gcf,'PaperPosition',[0 0 screenposition(3:4)],'PaperSize',[screenposition(3:4)]); 14 | print (name_figure, '-dpdf', '-painters') 15 | set(gcf,'renderer','Painters') 16 | system(['pdfcrop ',name_figure,'.pdf ',name_figure,'.pdf']); 17 | 18 | end -------------------------------------------------------------------------------- /src/utils/exportAsSvg.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | function exportAsSvg(handle, name_figure) 11 | 12 | set(handle,'Units','inches'); 13 | screenposition = get(handle,'Position'); 14 | set(gcf,'PaperPosition',[0 0 screenposition(3:4)],'PaperSize',[screenposition(3:4)]); 15 | print (name_figure, '-dsvg', '-painters') 16 | set(gcf,'renderer','Painters') 17 | % system(['pdfcrop ',name_figure,'.svg ',name_figure,'.pdf']); 18 | 19 | end -------------------------------------------------------------------------------- /src/utils/fian/dispObj.m: -------------------------------------------------------------------------------- 1 | function [verts, faces]=dispObj(obj) 2 | % 3 | % function display_obj(obj) 4 | % 5 | % displays a TEXTURELESS obj structure 6 | % 7 | % INPUTS: obj: object data 8 | % - obj.v: vertices 9 | % - obj.vt: texture coordinates 10 | % - obj.f.v: face definition vertices 11 | % - obj.f.vt: face definition texture 12 | % 13 | % Modified by Alutsyah Luthfian (2018) 14 | % Original Author: Bernard Abayowa 15 | % University of Dayton 16 | % 6/16/08 17 | cntr=mean(obj.v,1); 18 | tval=zeros(size(obj.v,1),1); 19 | for i=1:size(obj.v,1) 20 | tval(i,1)=0.0;%*norm(obj.v(i,:)-cntr); 21 | end 22 | % display object 23 | % figure 24 | p=patch('vertices',obj.v,'faces',obj.f.v,'FaceVertexCData', tval); 25 | shading interp 26 | colormap jet; 27 | lighting phong; 28 | camlight('right'); 29 | camproj('perspective'); 30 | view(45,45) 31 | axis square; 32 | axis off; 33 | axis equal 34 | axis tight; 35 | %cameramenu 36 | verts=get(p,'Vertices'); 37 | faces=get(p,'Faces'); 38 | -------------------------------------------------------------------------------- /src/utils/fian/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018, Alutsyah Luthfian 2 | Copyright (c) 2009, Bernard Abayowa 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in 13 | the documentation and/or other materials provided with the distribution 14 | * Neither the name of the Kyushu University nor the names 15 | of its contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /src/utils/fian/objvol.m: -------------------------------------------------------------------------------- 1 | function [vol,surf] = objvol(obj) 2 | % This function uses the "obj" structure created by the function readwObj. 3 | % The calculation of volume and surface area of the 3d follows the 4 | % algorithm presented in "Graphics Gems II" by James Arvo (ed.) page 170 - 5 | % 171. The vector Qj was replaced by every face's centroid position vector. 6 | % The formula for centroid position vector can be found in Wolfram 7 | % Mathworld's "Geometric Centroid" article. 8 | verts = obj.v; %obtain vertices' coordinates 9 | faces = obj.f.v; %obtain face descriptor 10 | area=zeros(size(faces,1),1); 11 | centroid=zeros(size(faces,1),3); 12 | normvec=zeros(size(faces,1),3); 13 | for k=1:size(faces,1) 14 | sz=find(~isnan(faces(k,:)),1,'last'); 15 | vectsid=cell(sz,sz-1); 16 | i=1; 17 | cntr=[0,0,0]; 18 | while i<=sz-1 19 | if i==1; 20 | for j=1:sz 21 | vectsid{j,i}=verts(faces(k,j),:); 22 | cntr=cntr+verts(faces(k,j),:); 23 | end 24 | else 25 | for j=1:sz-i+1 26 | vectsid{j,i}=vectsid{j+1,i-1}-vectsid{1,i-1}; 27 | end 28 | end 29 | i=i+1; 30 | end 31 | a=[0,0,0]; 32 | for j=1:sz 33 | if j==sz 34 | a=a+cross(vectsid{1,1},vectsid{j,1}); 35 | else 36 | a=a+cross(vectsid{j+1,1},vectsid{j,1}); 37 | end 38 | end 39 | normvec(k,:)=cross(vectsid{1,sz-1},vectsid{2,sz-1}); 40 | if all(normvec(k,:)==0); 41 | %some faces' vertex only form line (or zero-area polygons) 42 | normvec(k,:)=normvec(k,:); 43 | else 44 | %we calculate the area of faces that form valid polygons only. 45 | normvec(k,:)=normvec(k,:)./norm(normvec(k,:)); 46 | area(k,1)=0.5*abs(dot(normvec(k,:),a)); 47 | centroid(k,:)=cntr./3; 48 | end 49 | end 50 | volcom=dot(centroid,normvec,2).*area; 51 | vol=sum(volcom)/3; 52 | surf=sum(area); 53 | end -------------------------------------------------------------------------------- /src/utils/findWVgivenA.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | %Assumes that A is expressed in the interval [-1,1] 11 | function [W V]=findWVgivenA(A_solution) 12 | 13 | deg=size(A_solution,1)-1; 14 | 15 | deg_is_even = (rem(deg, 2) == 0); 16 | 17 | if(deg_is_even==1) 18 | d=deg/2; 19 | size_Wi=d+1; 20 | size_Vi=d; 21 | else 22 | d=(deg-1)/2; 23 | size_Wi=d+1; 24 | size_Vi=d+1; 25 | end 26 | 27 | W=[]; V=[]; 28 | for i=1:(deg+1) 29 | W=[W sdpvar(size_Wi,size_Wi)]; 30 | V=[V sdpvar(size_Vi,size_Vi)]; 31 | end 32 | 33 | sdpvar t %This is not optimized, but needed to handle symbolic expressions 34 | constraints=[]; 35 | A=[]; 36 | 37 | for i=1:(deg+1) 38 | Wi=W(:,(i-1)*size_Wi+1:i*size_Wi); 39 | Vi=V(:,(i-1)*size_Vi+1:i*size_Vi); 40 | 41 | %Wi and Vi are psd matrices 42 | constraints=[constraints, Wi>=0, Vi>=0]; 43 | 44 | Tvi=[]; 45 | for i=0:(size(Vi,1)-1) 46 | Tvi=[Tvi; t^i]; 47 | end 48 | 49 | Twi=[]; 50 | for i=0:(size(Wi,1)-1) 51 | Twi=[Twi; t^i]; 52 | end 53 | 54 | if(deg_is_even==1) 55 | lambdai=Twi'*Wi*Twi + (t+1)*(1-t)*Tvi'*Vi*Tvi; %Assumming here that A is expressed in the interval [-1,1] 56 | else 57 | lambdai=(t+1)*Twi'*Wi*Twi + (1-t)*Tvi'*Vi*Tvi; %Assumming here that A is expressed in the interval [-1,1] 58 | end 59 | coeffs_lambdai=flip(coefficients(lambdai,t))'; 60 | A=[A; coeffs_lambdai]; 61 | 62 | end 63 | 64 | constraints=[constraints, A_solution==A]; 65 | 66 | obj=0; %Feasibility problem 67 | 68 | disp('Starting optimization') %'solver','bmibnb' ,'solver','sdpt3' 69 | result=optimize(constraints,obj,sdpsettings('usex0',0,'solver','mosek','showprogress',0,'verbose',0,'debug',0 )) 70 | 71 | W=value(W); 72 | 73 | V=value(V); 74 | 75 | end -------------------------------------------------------------------------------- /src/utils/generateRandPol.m: -------------------------------------------------------------------------------- 1 | function P=generateRandPol(deg,interv) 2 | 3 | a = -1; b = 1; 4 | tt=linspace(min(interv),max(interv),deg+1); 5 | P= [polyfit(tt,(b-a).*rand(size(tt)) + a,deg); 6 | polyfit(tt,(b-a).*rand(size(tt)) + a,deg)]; 7 | 8 | end -------------------------------------------------------------------------------- /src/utils/generateRandPol1D.m: -------------------------------------------------------------------------------- 1 | function P=generateRandPol(deg,interv) 2 | 3 | a = -1; b = 1; 4 | tt=linspace(min(interv),max(interv),deg+1); 5 | P= [polyfit(tt,(b-a).*rand(size(tt)) + a,deg)]; 6 | 7 | end -------------------------------------------------------------------------------- /src/utils/generateRandSmoothPol.m: -------------------------------------------------------------------------------- 1 | function P=generateRandSmoothPol(deg,interv) 2 | 3 | a = -1; b = 1; 4 | tt=linspace(min(interv),max(interv),deg+1); 5 | 6 | 7 | all_xy=zeros(2,1); 8 | 9 | amplitude=1.0;%(b-a).*rand(2,1) + a; 10 | for i=1:(numel(tt)-1) 11 | xy_new=all_xy(:,end)+rand(2,1)-0.15; 12 | all_xy=[all_xy xy_new]; 13 | end 14 | 15 | x=all_xy(1,:); 16 | y=all_xy(2,:); 17 | 18 | P= [polyfit(tt,x,deg); 19 | polyfit(tt,y,deg)]; 20 | 21 | 22 | end -------------------------------------------------------------------------------- /src/utils/getT.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | function result=getT(degree,variable) 10 | result=(variable.^[degree:-1:0])'; 11 | result(end)=1.0; %This is needed due to a bug in Casadi 12 | end -------------------------------------------------------------------------------- /src/utils/isEven.m: -------------------------------------------------------------------------------- 1 | function result=isEven(x) 2 | result=~mod(x,2); 3 | end 4 | -------------------------------------------------------------------------------- /src/utils/isOdd.m: -------------------------------------------------------------------------------- 1 | function result=isOdd(x) 2 | result=~isEven(x); 3 | end -------------------------------------------------------------------------------- /src/utils/lagrangeMinima/getAllMinima_La.m: -------------------------------------------------------------------------------- 1 | %Get the minima of the Lagrange basis functions in interv 2 | %min(interv) and max(interv) are also added to the returned value 3 | function [all_minima, all_indexes]=getAllMinima_La(n, interv) 4 | 5 | dist=linspace(min(interv),max(interv),n+1); 6 | P=double(lagrangePoly(dist)); 7 | 8 | all_minima=[]; 9 | all_indexes=[]; 10 | for i=1:size(P,2) 11 | p=P(i,:); 12 | dp=polyder(p); 13 | rdp=roots(dp); 14 | 15 | ddp=polyder(dp); 16 | ddp_eval=polyval(ddp,rdp); 17 | 18 | minim=rdp(ddp_eval>0); 19 | 20 | all_minima=[all_minima minim'] 21 | all_indexes=[all_indexes i*ones(1,numel(minim))] 22 | 23 | end 24 | 25 | % all_minima=[all_minima min(interv) max(interv)]; 26 | [all_minima, order]=sort(all_minima); 27 | all_indexes = all_indexes(:,order); 28 | end -------------------------------------------------------------------------------- /src/utils/lagrangeMinima/getMinimaLa.m: -------------------------------------------------------------------------------- 1 | function minim=getMinimaLa(i,n,interv) 2 | 3 | dist=linspace(min(interv),max(interv),n+1); 4 | P=double(lagrangePoly(dist)); 5 | 6 | p=P(i,:); 7 | dp=polyder(p); 8 | rdp=roots(dp); 9 | 10 | ddp=polyder(dp); 11 | ddp_eval=polyval(ddp,rdp); 12 | 13 | minim=rdp(ddp_eval>0); 14 | 15 | % minim=[min(interv); minim; max(interv)]; 16 | 17 | end -------------------------------------------------------------------------------- /src/utils/lagrangePoly/lagrangePoly.m: -------------------------------------------------------------------------------- 1 | function output=lagrangePoly(xp,yp,xx) 2 | %Example (the most important): 3 | %xp=[1 2 3]; lagrangePoly(xp) 4 | %outputs the matrix of polynomial coefficients [0.5 -2.5 3.0; -1.0 4.0 -3.0; 0.5 -1.5 1.0] providing 5 | %Lagrange subpolynomials L1(x)=0.5*x^2-2.5*x+3, L2(x)=-x^2+4*x-3, L3(x)=0.5*x^2-1.5*x+1 corresponding to nodes xp 6 | % 7 | %Other examples (provided only for demonstration, covered equivalently by default Matlab functions such as polyfit etc.): 8 | %xp=[1 2 3]; yp=[3 5 6]; lagrangePoly(xp,yp) 9 | %outputs the coefficients [-0.5 3.5 0] of the Lagrange interpolation polynomial L(x)=-0.5*x^2+3.5*x+0 10 | %passing through interpolation points (xp,yp), this choice provides the same result as polyfit(xp,yp,numel(xp)-1) 11 | % 12 | %xp=[1 2 3]; yp=[3 5 6]; xx=[1 1.2 1.3 1.5]; lagrangePoly(xp,yp,xx) 13 | %outputs values [3.00 3.48 3.705 4.125] of the Lagrange interpolation polynomial L(x) (passing through interpolation points (xp,yp)) 14 | %in nodes xx (different from xp) 15 | % 16 | %xp=[1 2 3]; yp=[3 5 6]; xx=linspace(0,4); plot(xx,lagrangePoly(xp,yp,xx),xp,yp,'o') 17 | %displays the Lagrange interpolation polynomial L(x) and the interpolation points (xp,yp) 18 | % 19 | %xp=linspace(-1,1,9); a=5; fp=1./(1+a*xp.^2); xx=linspace(-1,1); ff=1./(1+a*xx.^2); plot(xx,lagrangePoly(xp,fp,xx),xp,fp,'o',xx,ff) 20 | %displays the famous Runge function and its Lagrange interpolation polynomial L(x) passing through interpolation points (xp,fp) 21 | 22 | coeffs=zeros(numel(xp),numel(xp)); 23 | for i=1:numel(xp) 24 | polynom=1; 25 | denominator=1; 26 | for j=1:numel(xp) 27 | if j~=i 28 | polynom=conv(polynom,[1 -xp(j)]); 29 | denominator=denominator*(xp(i)-xp(j)); 30 | end 31 | end 32 | coeffs(i,:)=polynom/denominator; 33 | end 34 | 35 | if nargin==1 36 | output=coeffs; 37 | elseif nargin==2 38 | output=yp*coeffs; 39 | else 40 | output=polyval(yp*coeffs,xx); 41 | end 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/utils/lagrangePoly/lagrangePoly_example.m: -------------------------------------------------------------------------------- 1 | clc; close all;clear; 2 | set(0,'DefaultFigureWindowStyle','docked'); 3 | % xp=[1 2 4 5]; 4 | xp=linspace(-1,1,4) 5 | % xp=[-1 -0.77 -0.77 1] 6 | coeffs=lagrangePoly(xp) 7 | 8 | xx=linspace(xp(1),xp(end),1000); 9 | for i=1:numel(xp) 10 | plot(xx,polyval(coeffs(i,:),xx)) 11 | if i==1 12 | hold on 13 | end 14 | end 15 | plot(xp,ones(size(xp)),'o'); plot(xp,zeros(size(xp)),'o') 16 | legend 17 | hold off -------------------------------------------------------------------------------- /src/utils/lagrangePoly/licenseLagrangePoly.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017, Jan Valdman 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the distribution 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /src/utils/minBoundingBox/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, julien diener 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the distribution 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /src/utils/minBoundingBox/minBoundingBox.m: -------------------------------------------------------------------------------- 1 | function bb = minBoundingBox(X) 2 | % compute the minimum bounding box of a set of 2D points 3 | % Use: boundingBox = minBoundingBox(point_matrix) 4 | % 5 | % Input: 2xn matrix containing the [x,y] coordinates of n points 6 | % *** there must be at least 3 points which are not collinear 7 | % output: 2x4 matrix containing the coordinates of the bounding box corners 8 | % 9 | % Example : generate a random set of point in a randomly rotated rectangle 10 | % n = 50000; 11 | % t = pi*rand(1); 12 | % X = [cos(t) -sin(t) ; sin(t) cos(t)]*[7 0; 0 2]*rand(2,n); 13 | % X = [X 20*(rand(2,1)-0.5)]; % add an outlier 14 | % 15 | % tic 16 | % c = minBoundingBox(X); 17 | % toc 18 | % 19 | % figure(42); 20 | % hold off, plot(X(1,:),X(2,:),'.') 21 | % hold on, plot(c(1,[1:end 1]),c(2,[1:end 1]),'r') 22 | % axis equal 23 | 24 | % compute the convex hull (CH is a 2*k matrix subset of X) 25 | k = convhull(X(1,:),X(2,:)); 26 | CH = X(:,k); 27 | 28 | % compute the angle to test, which are the angle of the CH edges as: 29 | % "one side of the bounding box contains an edge of the convex hull" 30 | E = diff(CH,1,2); % CH edges 31 | T = atan2(E(2,:),E(1,:)); % angle of CH edges (used for rotation) 32 | T = unique(mod(T,pi/2)); % reduced to the unique set of first quadrant angles 33 | 34 | % create rotation matrix which contains 35 | % the 2x2 rotation matrices for *all* angles in T 36 | % R is a 2n*2 matrix 37 | R = cos( reshape(repmat(T,2,2),2*length(T),2) ... % duplicate angles in T 38 | + repmat([0 -pi ; pi 0]/2,length(T),1)); % shift angle to convert sine in cosine 39 | 40 | % rotate CH by all angles 41 | RCH = R*CH; 42 | 43 | % compute border size [w1;h1;w2;h2;....;wn;hn] 44 | % and area of bounding box for all possible edges 45 | bsize = max(RCH,[],2) - min(RCH,[],2); 46 | area = prod(reshape(bsize,2,length(bsize)/2)); 47 | 48 | % find minimal area, thus the index of the angle in T 49 | [a,i] = min(area); 50 | 51 | % compute the bound (min and max) on the rotated frame 52 | Rf = R(2*i+[-1 0],:); % rotated frame 53 | bound = Rf * CH; % project CH on the rotated frame 54 | bmin = min(bound,[],2); 55 | bmax = max(bound,[],2); 56 | 57 | % compute the corner of the bounding box 58 | Rf = Rf'; 59 | bb(:,4) = bmax(1)*Rf(:,1) + bmin(2)*Rf(:,2); 60 | bb(:,1) = bmin(1)*Rf(:,1) + bmin(2)*Rf(:,2); 61 | bb(:,2) = bmin(1)*Rf(:,1) + bmax(2)*Rf(:,2); 62 | bb(:,3) = bmax(1)*Rf(:,1) + bmax(2)*Rf(:,2); 63 | 64 | -------------------------------------------------------------------------------- /src/utils/plotAxesArrows.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | function plotAxesArrows(length) 10 | arrow3d([0 0 0],[0 0 length],20,'cylinder',[0.2,0.1]); 11 | arrow3d([0 0 0],[0 length 0],20,'cylinder',[0.2,0.1]); 12 | arrow3d([0 0 0],[length 0 0],20,'cylinder',[0.2,0.1]); 13 | end -------------------------------------------------------------------------------- /src/utils/plotAxesArrowsT.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | %T is the 4x4 pose matrix: [R t; 0 1] 11 | function plotAxesArrowsT(length, w_T_b) 12 | 13 | w_t_b=w_T_b(1:3,4); 14 | 15 | %Let D be a point along x_body, E along y_body,... 16 | 17 | b_D=[length 0 0 1]'; 18 | b_E=[0 length 0 1]'; 19 | b_F=[0 0 length 1]'; 20 | 21 | w_D=w_T_b*b_D; 22 | w_E=w_T_b*b_E; 23 | w_F=w_T_b*b_F; 24 | 25 | 26 | 27 | arrow3dWithColor(w_t_b',w_D(1:3)',20,'cylinder',[0.2,0.1],'r'); 28 | arrow3dWithColor(w_t_b',w_E(1:3)',20,'cylinder',[0.2,0.1],'g'); 29 | arrow3dWithColor(w_t_b',w_F(1:3)',20,'cylinder',[0.2,0.1],'b'); 30 | end -------------------------------------------------------------------------------- /src/utils/plotAxesArrowsTnoColor.m: -------------------------------------------------------------------------------- 1 | %T is the 4x4 pose matrix: [R t; 0 1] 2 | function plotAxesArrowsTnoColor(length, w_T_b) 3 | 4 | w_t_b=w_T_b(1:3,4); 5 | 6 | %Let D be a point along x_body, E along y_body,... 7 | 8 | b_D=[length 0 0 1]'; 9 | b_E=[0 length 0 1]'; 10 | b_F=[0 0 length 1]'; 11 | 12 | w_D=w_T_b*b_D; 13 | w_E=w_T_b*b_E; 14 | w_F=w_T_b*b_F; 15 | 16 | 17 | 18 | arrow3d(w_t_b',w_D(1:3)',20,'cylinder',[0.2,0.1]); 19 | arrow3d(w_t_b',w_E(1:3)',20,'cylinder',[0.2,0.1]); 20 | arrow3d(w_t_b',w_F(1:3)',20,'cylinder',[0.2,0.1]); 21 | end -------------------------------------------------------------------------------- /src/utils/plotSphere.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | function handle=plotSphere(position, radius, color) 10 | 11 | position=double(position); 12 | 13 | [x,y,z] = sphere(50); 14 | 15 | handle = surf(x*radius+position(1),y*radius+position(2),z*radius+position(3),'FaceColor',color,'LineStyle','none' ); 16 | % s2 = surf(x*radius+v2(1),y*radius+v2(2),z*radius+v2(3),'FaceColor',color_vertex,'LineStyle','none'); 17 | % s3 = surf(x*radius+v3(1),y*radius+v3(2),z*radius+v3(3),'FaceColor',color_vertex,'LineStyle','none'); 18 | % s4 = surf(x*radius+v4(1),y*radius+v4(2),z*radius+v4(3),'FaceColor',color_vertex,'LineStyle','none'); 19 | 20 | end -------------------------------------------------------------------------------- /src/utils/plotStandardSimplex2D.m: -------------------------------------------------------------------------------- 1 | function plotStandardSimplex2D(color) 2 | hold on; 3 | patch([0 0 1],[0 1 0],color,'FaceAlpha',.3); 4 | 5 | end -------------------------------------------------------------------------------- /src/utils/plotStandardSimplex3D.m: -------------------------------------------------------------------------------- 1 | function plotStandardSimplex3D(color,radius_sphere) 2 | hold on; 3 | V=[zeros(3,1) eye(3)]; %Standard simplex 4 | v1=V(:,1); 5 | v2=V(:,2); 6 | v3=V(:,3); 7 | v4=V(:,4); 8 | 9 | vx=V(1,:)'; 10 | vy=V(2,:)'; 11 | vz=V(3,:)'; 12 | 13 | 14 | color_vertex=[.98 .45 .02]; 15 | radius=radius_sphere; 16 | s1=plotSphere(v1,radius, color_vertex); 17 | s2=plotSphere(v2,radius, color_vertex); 18 | s3=plotSphere(v3,radius, color_vertex); 19 | s4=plotSphere(v4,radius, color_vertex); 20 | 21 | alpha(s1,1.0) 22 | alpha(s2,1.0) 23 | alpha(s3,1.0) 24 | alpha(s4,1.0) 25 | 26 | % shading faceted 27 | % hold on 28 | axis equal 29 | tmp=gca; 30 | if (size(findobj(tmp.Children,'Type','Light'))<1) %If still no light in the subplot 31 | camlight %create light 32 | end 33 | lighting phong 34 | % 35 | [k1,volume] = convhull(vx,vy,vz); 36 | 37 | s2=trisurf(k1,vx,vy,vz,'LineWidth',1,'FaceColor',color); 38 | 39 | alpha(s2,0.1) 40 | 41 | end -------------------------------------------------------------------------------- /src/utils/plot_convex_hull.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | 11 | function volume=plot_convex_hull(pol_x,pol_y,pol_z,A,color,radius_sphere) 12 | 13 | hold on; 14 | P=[pol_x'; pol_y'; pol_z']; 15 | V=P*inv(A); 16 | 17 | V=double(V); 18 | 19 | v1=V(:,1); 20 | v2=V(:,2); 21 | v3=V(:,3); 22 | v4=V(:,4); 23 | 24 | vx=V(1,:)'; 25 | vy=V(2,:)'; 26 | vz=V(3,:)'; 27 | 28 | 29 | color_vertex=[.98 .45 .02]; 30 | radius=radius_sphere; 31 | s1=plotSphere(v1,radius, color_vertex); 32 | s2=plotSphere(v2,radius, color_vertex); 33 | s3=plotSphere(v3,radius, color_vertex); 34 | s4=plotSphere(v4,radius, color_vertex); 35 | 36 | % 37 | % 38 | % set(s1,'facecolor',color_vertex); 39 | % set(s2,'facecolor',color_vertex); 40 | % set(s3,'facecolor',color_vertex); 41 | % set(s4,'facecolor',color_vertex); 42 | 43 | alpha(s1,1.0) 44 | alpha(s2,1.0) 45 | alpha(s3,1.0) 46 | alpha(s4,1.0) 47 | 48 | % shading faceted 49 | % hold on 50 | axis equal 51 | tmp=gca; 52 | if (size(findobj(tmp.Children,'Type','Light'))<1) %If still no light in the subplot 53 | camlight %create light 54 | end 55 | lighting phong 56 | % 57 | [k1,volume] = convhull(vx,vy,vz); 58 | 59 | s2=trisurf(k1,vx,vy,vz,'LineWidth',1,'FaceColor',color); 60 | 61 | % xlabel('$x$') 62 | % ylabel('y') 63 | % zlabel('z') 64 | alpha(s2,0.1) 65 | 66 | end 67 | -------------------------------------------------------------------------------- /src/utils/plot_line_convex_hull.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | function longitude=plot_line_convex_hull(pol_x,pol_y,pol_z,A,color,radius_sphere) 10 | 11 | 12 | P=[pol_x'; pol_y'; pol_z'] 13 | V=P*inv(A) 14 | 15 | V=double(V); 16 | 17 | vx=V(1,:); 18 | vy=V(2,:); 19 | vz=V(3,:); 20 | 21 | v1=V(:,1); 22 | v2=V(:,2); 23 | 24 | 25 | 26 | 27 | color_vertex=[.98 .45 .02]; 28 | radius=radius_sphere; 29 | s1=plotSphere(v1,radius, color_vertex); 30 | s2=plotSphere(v2,radius, color_vertex); 31 | 32 | alpha(s1,1.0) 33 | alpha(s2,1.0) 34 | 35 | plot3(vx,vy,vz,color,'LineWidth',.3); 36 | 37 | longitude=norm(v1-v2); 38 | 39 | axis equal 40 | tmp=gca; 41 | if (size(findobj(tmp.Children,'Type','Light'))<1) %If still no light in the subplot 42 | camlight %create light 43 | end 44 | lighting phong 45 | 46 | end 47 | -------------------------------------------------------------------------------- /src/utils/plot_plane_convex_hull.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | 10 | 11 | function area=plot_plane_convex_hull(pol_x,pol_y,pol_z,A,color,radius_sphere) 12 | 13 | 14 | P=[pol_x'; pol_y'; pol_z']; 15 | V=P*inv(A); 16 | 17 | V=double(V); 18 | 19 | vx=V(1,:); 20 | vy=V(2,:); 21 | vz=V(3,:); 22 | 23 | 24 | v1=V(:,1); 25 | v2=V(:,2); 26 | v3=V(:,3); 27 | 28 | 29 | 30 | color_vertex=[.98 .45 .02]; 31 | radius=radius_sphere; 32 | s1=plotSphere(v1,radius, color_vertex); 33 | s2=plotSphere(v2,radius, color_vertex); 34 | s3=plotSphere(v3,radius, color_vertex); 35 | 36 | 37 | 38 | alpha(s1,1.0) 39 | alpha(s2,1.0) 40 | alpha(s3,1.0) 41 | 42 | 43 | patch(vx,vy,vz,color,'FaceAlpha',.3) 44 | 45 | area=norm(cross(V(:,2)-V(:,1),V(:,3)-V(:,1)))/2.0; 46 | 47 | axis equal 48 | tmp=gca; 49 | if (size(findobj(tmp.Children,'Type','Light'))<1) %If still no light in the subplot 50 | camlight %create light 51 | end 52 | lighting phong 53 | 54 | end 55 | -------------------------------------------------------------------------------- /src/utils/plot_splitted_convex_hulls.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | %A needs to be expressed in t \in interv 10 | function [volume, num_vertexes]=plot_splitted_convex_hulls(P,A,interv,num_of_intervals,color,radius_sphere); 11 | 12 | samples=[]; 13 | samples_t=linspace(min(interv),max(interv),num_of_intervals+1); 14 | all_vertexes=[];%Its columns are the vertexes 15 | for i=1:(length(samples_t)-1) 16 | a=samples_t(i); 17 | b=samples_t(i+1); 18 | P_converted=convertCoeffMatrixFromABtoCD(P,[a,b],interv); 19 | V=P_converted*inv(A); 20 | all_vertexes=[all_vertexes V]; 21 | %plot_convex_hull(P_converted(1,:)',P_converted(2,:)',P_converted(3,:)',A,'b',0.0017); 22 | end 23 | 24 | all_vertexes=double(all_vertexes); 25 | 26 | color_vertex=[.98 .45 .02]; 27 | 28 | for i=1:size(all_vertexes,2) 29 | s1=plotSphere(all_vertexes(:,i),radius_sphere, color_vertex); 30 | end 31 | 32 | axis equal 33 | tmp=gca; 34 | if (size(findobj(tmp.Children,'Type','Light'))<1) %If still no light in the subplot 35 | camlight %create light 36 | end 37 | lighting phong 38 | 39 | 40 | x=all_vertexes(1,:); y=all_vertexes(2,:); z=all_vertexes(3,:); 41 | [k1,volume] = convhull(x,y,z); 42 | s2=trisurf(k1,x,y,z,'LineWidth',1,'FaceColor',color); 43 | alpha(s2,0.1) 44 | 45 | k_all=k1(:); 46 | k_all_unique=unique(k1); 47 | num_vertexes=length(k_all_unique); %points that are in the frotier of the convex hull 48 | 49 | end -------------------------------------------------------------------------------- /src/utils/plotsegment.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | function plotsegment(a,b,color,linewidth) 10 | AB=[a b]; 11 | plot3(AB(1,:),AB(2,:),AB(3,:),color,'LineWidth',linewidth) 12 | end -------------------------------------------------------------------------------- /src/utils/polytopes_2017_10_04_v1.9/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017, Matt Jacobson 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution 13 | 14 | * Neither the name of nor the names of its 15 | contributors may be used to endorse or promote products derived from this 16 | software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /src/utils/polytopes_2017_10_04_v1.9/qlcon2vert.m: -------------------------------------------------------------------------------- 1 | function [varargout]=qlcon2vert(x0,varargin) 2 | %A quicker version of lcon2vert that will skip some intensive steps when a 3 | %point x0 in the relative interior of the polyhedron is known a priori. 4 | % 5 | % [V,nr,nre]=qlcon2vert(x0, A,b,Aeq,beq,TOL) 6 | % 7 | %Here x0 is the known relative interior point. The rest of the input/output 8 | %arguments are as in LCON2VERT. 9 | % 10 | %In the interest of speed, QLCON2VERT will perform minimal error checking, 11 | %shifting the burden to the user of verifying that the input data has 12 | %appropriate properties. In particular, it will not try to verify that x0 13 | %is in fact in the relative interior. By default also, qlcon2vert will skip the 14 | %boundedness test, and presume the user knows the polyhedron to be bounded already. 15 | %However, you can re-activate the boundedness test by calling with the syntax, 16 | % 17 | % [V,nr,nre]=qlcon2vert(x0, A,b,Aeq,beq,TOL,1) 18 | 19 | 20 | if nargin<=3 21 | 22 | varargin(3:6)={[],[],[],0}; 23 | 24 | end 25 | 26 | x0=x0(:); 27 | 28 | [A,b,Aeq,beq]=deal(varargin{1:4}); 29 | 30 | b=b-A*x0; 31 | if ~isempty(beq) 32 | beq(:)=0; 33 | end 34 | 35 | varargin{2}=b; 36 | varargin{4}=beq; 37 | 38 | [varargout{1:max(nargout,1)}] = lcon2vert(varargin{:}); 39 | 40 | V=varargout{1}; 41 | 42 | V=bsxfun(@plus,x0.',V); %undo coordinate translation 43 | 44 | varargout{1}=V; 45 | -------------------------------------------------------------------------------- /src/utils/polytopes_2017_10_04_v1.9/readme.txt: -------------------------------------------------------------------------------- 1 | Taken from https://www.mathworks.com/matlabcentral/fileexchange/30892-analyze-n-dimensional-convex-polyhedra 2 | 3 | Matt J (2021). Analyze N-dimensional Convex Polyhedra (https://www.mathworks.com/matlabcentral/fileexchange/30892-analyze-n-dimensional-convex-polyhedra), MATLAB Central File Exchange. Retrieved June 18, 2021. 4 | -------------------------------------------------------------------------------- /src/utils/projectOntoPlaneXEquals0.m: -------------------------------------------------------------------------------- 1 | function result=projectOntoPlaneXEquals0(p,m) 2 | proj=simplify(p(2:end)/(1-p(1))); %Here we are projecting onto the plane x=0, using as viewpoint the vertex [1 0 0 ..... 0] 3 | if(numel(p)>(m+1)) 4 | numel(proj) 5 | result=projectOntoPlaneXEquals0(proj,m); 6 | else 7 | result=proj; 8 | end 9 | end -------------------------------------------------------------------------------- /src/utils/projectPoint.m: -------------------------------------------------------------------------------- 1 | % /* ---------------------------------------------------------------------------- 2 | % * Copyright 2020, Jesus Tordesillas Torres, Aerospace Controls Laboratory 3 | % * Massachusetts Institute of Technology 4 | % * All Rights Reserved 5 | % * Authors: Jesus Tordesillas, et al. 6 | % * See LICENSE file for the license information 7 | % * -------------------------------------------------------------------------- */ 8 | 9 | function projected=projectPoint(p, v, q1,q2,q3,frame) 10 | % Performs a perspective projection of the point p (expressed in the world coordinates), 11 | % doing raycasting from the viewpoint v, using the plane formed by 12 | %the points q1,q2,q3 and using the direction of cross(q2-q1,q3-q1) as the 13 | %direction of projection. 14 | 15 | %If frame is 'w'(world) --> Returns the coordinates of the point in world 16 | %frame (3x1 vector) 17 | 18 | %If frame is 'c'(camera) --> Returns the coordinates of the point in the 19 | %camera plane (2x1 vector) 20 | 21 | %Math: see Lecture 11 from VNAV (Image Formation), Luca Carlone 22 | 23 | n=cross(q1-q3,q2-q3); 24 | n=n/norm(n); 25 | 26 | if((q1-v)'*n<0) 27 | n=-n; %Ensure n is pointing in the direction v --> plane 28 | end 29 | 30 | z_c=n; 31 | x_c=(q1-q3);x_c=x_c/norm(x_c); 32 | y_c=cross(z_c,x_c); 33 | 34 | f=abs((q1-v)'*z_c) %focal length; 35 | 36 | 37 | w_R_c=[x_c y_c z_c]; 38 | w_t_c=v; 39 | 40 | w_T_c=[w_R_c w_t_c; 0 0 0 1]; 41 | c_T_w=inv(w_T_c); 42 | 43 | c_projected=[f 0 0; 0 f 0; 0 0 1]*[eye(3) zeros(3,1)]*c_T_w*[p ; 1]; 44 | 45 | u=c_projected(1)/c_projected(3); %u and v are the coordinates in the image plane 46 | v=c_projected(2)/c_projected(3); 47 | 48 | if(frame=='w') 49 | projected=w_T_c*[u v f 1]'; 50 | else if(frame=='c') 51 | projected=[u v]'; 52 | end 53 | 54 | end -------------------------------------------------------------------------------- /src/utils/shadedErrorBar/exampleImages/basic_with_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/shadedErrorBar/exampleImages/basic_with_overlay.png -------------------------------------------------------------------------------- /src/utils/shadedErrorBar/exampleImages/mod-handles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/shadedErrorBar/exampleImages/mod-handles.png -------------------------------------------------------------------------------- /src/utils/shadedErrorBar/exampleImages/multiple_lines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/shadedErrorBar/exampleImages/multiple_lines.png -------------------------------------------------------------------------------- /src/utils/simplex_coordinates1.m: -------------------------------------------------------------------------------- 1 | %File is from https://people.sc.fsu.edu/~jburkardt/m_src/simplex_coordinates/simplex_coordinates.html 2 | 3 | function x = simplex_coordinates1 ( n ) 4 | 5 | %*****************************************************************************80 6 | % 7 | %% SIMPLEX_COORDINATES1 computes the Cartesian coordinates of simplex vertices. 8 | % 9 | % Discussion: 10 | % 11 | % The simplex will have its centroid at 0; 12 | % 13 | % The sum of the vertices will be zero. 14 | % 15 | % The distance of each vertex from the origin will be 1. 16 | % 17 | % The length of each edge will be constant. 18 | % 19 | % The dot product of the vectors defining any two vertices will be - 1 / N. 20 | % This also means the angle subtended by the vectors from the origin 21 | % to any two distinct vertices will be arccos ( - 1 / N ). 22 | % 23 | % Licensing: 24 | % 25 | % This code is distributed under the GNU LGPL license. 26 | % 27 | % Modified: 28 | % 29 | % 19 September 2010 30 | % 31 | % Author: 32 | % 33 | % John Burkardt 34 | % 35 | % Input: 36 | % 37 | % integer N, the spatial dimension. 38 | % 39 | % Output: 40 | % 41 | % real X(N,N+1), the coordinates of the vertices 42 | % of a simplex in N dimensions. 43 | % 44 | x(1:n,1:n+1) = 0.0; 45 | 46 | for i = 1 : n 47 | % 48 | % Set X(I,I) so that sum ( X(1:I,I)^2 ) = 1. 49 | % 50 | x(i,i) = sqrt ( 1.0 - sum ( x(1:i-1,i).^2 ) ); 51 | % 52 | % Set X(I,J) for J = I+1 to N+1 by using the fact that XI dot XJ = - 1 / N 53 | % 54 | for j = i + 1 : n + 1 55 | x(i,j) = ( - 1.0 / n - ( x(1:i-1,i)' * x(1:i-1,j) ) ) / x(i,i); 56 | end 57 | 58 | end 59 | 60 | return 61 | end 62 | -------------------------------------------------------------------------------- /src/utils/slefes/computeSlefe.m: -------------------------------------------------------------------------------- 1 | %Author: Jesus Tordesillas, jtorde@mit.edu, September 2021 2 | 3 | %%[see check.m] This function (and hence "computeSlefeScalar" as well) has been tested (to check for correctness) against the result 4 | %produced by the "uniexample.c" function of http://www.cise.ufl.edu/research/SurfLab/download/SubLiME.tar.gz 5 | 6 | function [breakpoints,comp_time]=computeSlefe(P, num_seg, interv) 7 | 8 | deg=size(P,2)-1; %degree 9 | dim=size(P,1); %number of coordinates 10 | 11 | num_of_breakpts=(num_seg+1); 12 | 13 | p_down=[]; p_up=[]; 14 | 15 | comp_time=0; 16 | 17 | for i=1:dim %For each of the coordinates 18 | [t_break_points, p_down_i, p_up_i,comp_time_i]=computeSlefeScalar(P(i,:), deg, num_seg, interv); 19 | p_down=[p_down; p_down_i]; 20 | p_up=[p_up; p_up_i]; 21 | 22 | comp_time=comp_time+comp_time_i; 23 | end 24 | 25 | %Now, p_down is a dim x num_of_breakpoints matrix 26 | % p_up is a dim x num_of_breakpoints matrix 27 | 28 | for j=1:num_of_breakpts 29 | 30 | %Now let's create a grid with all the combinations 31 | for i=1:dim %For each of the coordinates 32 | seg_j_coord{i}= [p_down(i,j); %all the coordinates for the breakpoint j 33 | p_up(i,j) ]; 34 | end 35 | grid = cell(1,dim); 36 | [grid{:}] = ndgrid(seg_j_coord{:}); 37 | 38 | %Let's save them as a dim x num_of_vertices matrix 39 | vertices=[]; 40 | for i=1:dim 41 | vertices=[vertices; grid{i}(:)']; 42 | end 43 | %Now vertices is a dim x num_of_vertices matrix 44 | 45 | %Let's store it 46 | breakpoints{j}.vertices=vertices; 47 | breakpoints{j}.t=t_break_points(j); 48 | end 49 | 50 | %%%%%%%%%%%%%%%%%%%%%%%%%%% 51 | %Note: In 2D, the code of this function would simply be 52 | 53 | % [t_break_points, p_down_x, p_up_x]=computeSleveScalar(P(1,:), deg, num_seg, interv); 54 | % [t_break_points, p_down_y, p_up_y]=computeSleveScalar(P(2,:), deg, num_seg, interv); 55 | % 56 | % for i=1:(seg+1) 57 | % breakpoints{i}.vertices=[p_down_x(i) p_up_x(i) p_up_x(i) p_down_x(i); 58 | % p_down_y(i) p_up_y(i) p_down_y(i) p_up_y(i)]; 59 | % 60 | % breakpoints{i}.t=t_break_points(i); 61 | % end 62 | %%%%%%%%%%%%%%%%%%%%%%%%%%% 63 | end -------------------------------------------------------------------------------- /src/utils/slefes/computeSlefeScalarSpeedOptimized.m: -------------------------------------------------------------------------------- 1 | %Author: Jesus Tordesillas, jtorde@mit.edu, December 2021 2 | % This function is the same as computeSlefeScalar, but it is optimized for speed by avoiding the use of for/if statements and using Matlab's matrix operations 3 | 4 | function [t_break_points, p_down, p_up, comp_time]= computeSlefeScalarSpeedOptimized(P, deg, num_seg, interv) 5 | 6 | %SECTION COMPUTED OFFLINE (i.e., NOT taken into account for comp time) 7 | %%%%%%%%%%%%%%%%%%%%% 8 | currentFile = mfilename( 'fullpath' ); 9 | [pathstr,~,~] = fileparts( currentFile ); 10 | filename=[pathstr,'/thirdparty/SubLiME/range/unirange-',num2str(deg),'_',num2str(num_seg),'.asc']; 11 | if ~isfile(filename) 12 | error("These values haven't been tabulated yet. Change the deg or # of segments") 13 | end 14 | data = readmatrix(filename,detectImportOptions(filename, 'FileType', 'text')); 15 | num_break_points=num_seg+1; 16 | t_break_points=linspace(min(interv),max(interv),num_break_points); 17 | assert(size(P,1)==1); 18 | %Compute the Bezier control points 19 | A_Be=getA_Be(deg,interv); 20 | V=P*inv(A_Be); 21 | all_ajdm=[]; 22 | for j=1:(deg-1) 23 | tmp=(j-1)*2*(num_break_points)+1; 24 | a_jdm_up= data( tmp:(tmp+num_break_points-1) )'; 25 | a_jdm_down= data( (tmp+num_break_points):(tmp+2*num_break_points-1) )'; 26 | a_jdm=[data( tmp:(tmp+num_break_points-1) ) data( (tmp+num_break_points):(tmp+2*num_break_points-1) )]; 27 | all_ajdm=[all_ajdm, a_jdm]; 28 | 29 | end 30 | k=numel(t_break_points); 31 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 32 | 33 | 34 | tic; 35 | %%%%%%%%%%%%%%%%%% COMPUTATION TIME Starts 36 | all_second_diff=V -2 *V* diag(ones(numel(V)-1,1),-1) + V* diag(ones(numel(V)-2,1),-2); 37 | maxmin=[max(all_second_diff(1:deg-1),0.0);min(all_second_diff(1:deg-1),0.0)]; 38 | l=((V(end)-V(1))/(t_break_points(end)-t_break_points(1)))*(t_break_points'-t_break_points(1)*ones(k,1)) + V(1)*ones(k,1); 39 | p=[l l] + [all_ajdm*maxmin(:) all_ajdm*reshape(flip(maxmin),[],1)]; 40 | %%%%%%%%%%%%%%%%%% COMPUTATION TIME Ends 41 | comp_time=toc; 42 | 43 | p_down=p(:,2)'; 44 | p_up=p(:,1)'; 45 | 46 | end -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | SubLiME -- Subdividable Linear Max-norm Enclosure 2 | Copyright (C) 2002 SurfLab, University of Florida. 3 | 4 | This program is free for educational/research purpose. 5 | You will need to gain permissions from authors before you 6 | can use this program for any commercial usage. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY. 10 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/Makefile: -------------------------------------------------------------------------------- 1 | # -- makefile 2 | # 3 | # Use "make" to create the library 4 | # "make example" to create the examples 5 | # "make clean" to clear all the binary output 6 | # 7 | # if you encounter the message: "Missing separator..." 8 | # make sure that all indented lines are indented by using a TAB 9 | # rather than blanks 10 | # 11 | # Tested under Linux/Solaris (June 2003) 12 | # Author: Xiaobin Wu (xwu@cise.ufl.edu) 13 | 14 | CC = gcc 15 | CFLAGS = -g -c -Wall 16 | LDLIB = -lm 17 | 18 | # Library linking 19 | LDLIB = -lpthread -L/usr/X11R6/lib -lglut -lGL -lGLU \ 20 | -lXi -lXmu -lXext -lX11 -lm 21 | 22 | # ---- Files --- 23 | output : SubLiME 24 | 25 | SUBLIME = uniSlefe.o tpSlefe.o bspSlefe.o 26 | 27 | SubLiME: $(SUBLIME) 28 | ld -r -o libSubLiME.a $(SUBLIME) 29 | 30 | example: uniexample.c SubLiME bspexample.c 31 | $(CC) -o uniexample -g $(SUBLIME) uniexample.c $(LDLIB) -LSubLiME 32 | $(CC) -o bspexample -g $(SUBLIME) bspexample.c $(LDLIB) -LSubLiME 33 | 34 | .c.o: 35 | $(CC) $(CFLAGS) $*.c 36 | 37 | clean: 38 | rm -f *.o libSubLiME.a uniexample bspexample 39 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/bspexample: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/slefes/thirdparty/SubLiME/bspexample -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/libSubLiME.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mit-acl/minvo/884c9fd8e16da9879e80d7683012a21fa9f18f85/src/utils/slefes/thirdparty/SubLiME/libSubLiME.a -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/README: -------------------------------------------------------------------------------- 1 | unirange%d_%d.asc: 2 | first integer is degree and second integer is seg 3 | 4 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-2_1.asc: -------------------------------------------------------------------------------- 1 | 0.1250 0 2 | 0 0 3 | 4 | // bounds for uniform quadratic spline (degree = 2) 5 | // base: coeffs [ 1/8 0 0] on [0 1/2] and [0 0 0] on [1/2 1] 6 | // number of pieces = 2 7 | 8 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-2_2.asc: -------------------------------------------------------------------------------- 1 | 0.1250 0 0 2 | 0.0938 -0.0312 0 3 | 4 | // bounds for uniform quadratic spline (degree = 2) 5 | // base: coeffs [ 1/8 0 0] on [0 1/2] and [0 0 0] on [1/2 1] 6 | // number of pieces = 2 7 | 8 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-2_3.asc: -------------------------------------------------------------------------------- 1 | 0.1250 0.0139 0 0 2 | 0.1110 0 0 0 3 | 4 | // bounds for uniform quadratic spline (degree = 2) 5 | // base: coeffs [ 1/8 0 0] on [0 1/2] and [0 0 0] on [1/2 1] 6 | // number of pieces = 3 7 | 8 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-2_4.asc: -------------------------------------------------------------------------------- 1 | 0.125 0.0312 0 0 0 2 | 0.1172 0.0234 -0.0078 0 0 3 | 4 | // bounds for uniform quadratic spline (degree = 2) 5 | // base: coeffs [ 1/8 0 0] on [0 1/2] and [0 0 0] on [1/2 1] 6 | // number of pieces = 4 7 | 8 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-3_1.asc: -------------------------------------------------------------------------------- 1 | .1666666667 2 | 0.0000000000 3 | 4 | .1025166368 5 | -.0641500300 6 | 7 | // bspline bound for degree 3 8 | // base: coeffs [ 1/6 0 0 0] on [0 1] 9 | // number of pieces = 1 10 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-3_2.asc: -------------------------------------------------------------------------------- 1 | .1666666667 2 | .0208333333 3 | 0.0000000000 4 | 5 | .1431572691 6 | -.0026760642 7 | 0.0000000000 8 | 9 | // bspline bound for degree 3 10 | // base: coeffs [ 1/6 0 0 0] on [0 1] 11 | // number of pieces = 2 12 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-3_3.asc: -------------------------------------------------------------------------------- 1 | .1666666667 2 | .0493827161 3 | .0061728395 4 | 0.0000000000 5 | 6 | .1550797610 7 | .0377958103 8 | .0029969566 9 | -.0014554536 10 | 11 | // bspline bound for degree 3 12 | // base: coeffs [ 1/6 0 0 0] on [0 1] 13 | // number of pieces = 3 14 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-3_4.asc: -------------------------------------------------------------------------------- 1 | .1666666667 2 | .0703125000 3 | .0208333333 4 | .0026041667 5 | 0.0000000000 6 | 7 | .1598268583 8 | .0634726916 9 | .0176706184 10 | -.0000939743 11 | 0.0000000000 12 | 13 | // bspline bound for degree 3 14 | // base: coeffs [ 1/6 0 0 0] on [0 1] 15 | // number of pieces = 4 16 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-3_5.asc: -------------------------------------------------------------------------------- 1 | .1666666667 2 | .0853333333 3 | .0360000000 4 | .0106666667 5 | .0013333333 6 | 0.0000000000 7 | 8 | .1621651245 9 | .0808317911 10 | .0334118889 11 | .0082535251 12 | .0005930212 13 | -.0002648635 14 | 15 | // bspline bound for degree 3 16 | // base: coeffs [ 1/6 0 0 0] on [0 1] 17 | // number of pieces = 5 18 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-3_6.asc: -------------------------------------------------------------------------------- 1 | .1666666667 2 | .0964506173 3 | .0493827161 4 | .0208333333 5 | .0061728395 6 | .0007716049 7 | 0.0000000000 8 | 9 | .1634830660 10 | .0932670166 11 | .0473167969 12 | .0188475422 13 | .0052056357 14 | .0000026935 15 | -.0000000634 16 | 17 | // bspline bound for degree 3 18 | // base: coeffs [ 1/6 0 0 0] on [0 1] 19 | // number of pieces = 6 20 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-3_7.asc: -------------------------------------------------------------------------------- 1 | .1666666667 2 | .1049562682 3 | .0607385812 4 | .0310981536 5 | .0131195335 6 | .0038872692 7 | .0004859086 8 | 0.0000000000 9 | 10 | .1642974728 11 | .1025870743 12 | .0590775177 13 | .0294788495 14 | .0121593459 15 | .0030252247 16 | .0002051250 17 | -.0000873285 18 | 19 | // bspline bound for degree 3 20 | // base: coeffs [ 1/6 0 0 0] on [0 1] 21 | // number of pieces = 7 22 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-3_8.asc: -------------------------------------------------------------------------------- 1 | .1666666667 2 | .1116536458 3 | .0703125000 4 | .0406901042 5 | .0208333333 6 | .0087890625 7 | .0026041667 8 | .0003255208 9 | 0.0000000000 10 | 11 | .1648353859 12 | .1098223650 13 | .0689576405 14 | .0393591089 15 | .0199516152 16 | .0079616893 17 | .0021883101 18 | .0000088472 19 | -.0000006216 20 | 21 | // bspline bound for degree 3 22 | // base: coeffs [ 1/6 0 0 0] on [0 1] 23 | // number of pieces = 8 24 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/bsprange-3_9.asc: -------------------------------------------------------------------------------- 1 | .1666666667 2 | .1170553269 3 | .0784179241 4 | .0493827161 5 | .0285779607 6 | .0146319159 7 | .0061728395 8 | .0018289895 9 | .0002286237 10 | 0.0000000000 11 | 12 | .1652090506 13 | .1155977108 14 | .0772959750 15 | .0482753813 16 | .0277900160 17 | .0138765528 18 | .0057157594 19 | .0014287307 20 | .0000930528 21 | -.0000383389 22 | 23 | // bspline bound for degree 3 24 | // base: coeffs [ 1/6 0 0 0] on [0 1] 25 | // number of pieces = 9 26 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-2_1.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | 0.0000000000 3 | -.2500000000 4 | -.2500000000 5 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-2_2.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.2500000000 3 | 0.0000000000 4 | -.0625000000 5 | -.3125000000 6 | -.0625000000 7 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-2_3.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.2222222222 3 | -.2222222222 4 | 0.0000000000 5 | -.0277777778 6 | -.2500000000 7 | -.2500000000 8 | -.0277777777 9 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-2_4.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.1875000000 3 | -.2500000000 4 | -.1875000000 5 | 0.0000000000 6 | -.0156250000 7 | -.2031250000 8 | -.2656250000 9 | -.2031250000 10 | -.0156250000 11 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-2_5.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.1600000000 3 | -.2400000000 4 | -.2400000000 5 | -.1600000000 6 | 0.0000000000 7 | -.0100000000 8 | -.1700000000 9 | -.2500000000 10 | -.2500000000 11 | -.1700000000 12 | -.0100000000 13 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-2_6.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.1388888889 3 | -.2222222222 4 | -.2500000000 5 | -.2222222222 6 | -.1388888889 7 | 0.0000000000 8 | -.0069444445 9 | -.1458333334 10 | -.2291666667 11 | -.2569444445 12 | -.2291666667 13 | -.1458333334 14 | -.0069444444 15 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-2_7.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.1224489796 3 | -.2040816327 4 | -.2448979592 5 | -.2448979592 6 | -.2040816327 7 | -.1224489796 8 | 0.0000000000 9 | -.0051020408 10 | -.1275510204 11 | -.2091836735 12 | -.2500000000 13 | -.2500000000 14 | -.2091836734 15 | -.1275510205 16 | -.0051020408 17 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-2_8.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.1093750000 3 | -.1875000000 4 | -.2343750000 5 | -.2500000000 6 | -.2343750000 7 | -.1875000000 8 | -.1093750000 9 | 0.0000000000 10 | -.0039062500 11 | -.1132812500 12 | -.1914062500 13 | -.2382812500 14 | -.2539062500 15 | -.2382812500 16 | -.1914062500 17 | -.1132812500 18 | -.0039062500 19 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-2_9.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.0987654321 3 | -.1728395062 4 | -.2222222222 5 | -.2469135802 6 | -.2469135802 7 | -.2222222222 8 | -.1728395062 9 | -.0987654321 10 | 0.0000000000 11 | -.0030864198 12 | -.1018518519 13 | -.1759259260 14 | -.2253086420 15 | -.2500000000 16 | -.2500000000 17 | -.2253086420 18 | -.1759259259 19 | -.1018518519 20 | -.0030864197 21 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-3_1.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | 0.0000000000 3 | -.3849001794 4 | -.3849001794 5 | 0.0000000000 6 | 0.0000000000 7 | -.3849001794 8 | -.3849001794 9 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-3_2.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3750000000 3 | 0.0000000000 4 | -.1410563851 5 | -.5160563851 6 | 0.0000000000 7 | 0.0000000000 8 | -.3750000000 9 | 0.0000000000 10 | 0.0000000000 11 | -.5160563852 12 | -.1410563852 13 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-3_3.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3703703704 3 | -.2962962963 4 | 0.0000000000 5 | -.0695214343 6 | -.4398918047 7 | -.3153515940 8 | -.0087327217 9 | 0.0000000000 10 | -.2962962963 11 | -.3703703704 12 | 0.0000000000 13 | -.0087327217 14 | -.3153515940 15 | -.4398918047 16 | -.0695214343 17 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-3_4.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3281250000 3 | -.3750000000 4 | -.2343750000 5 | 0.0000000000 6 | -.0410388502 7 | -.3691638502 8 | -.3939762896 9 | -.2505638459 10 | 0.0000000000 11 | 0.0000000000 12 | -.2343750000 13 | -.3750000000 14 | -.3281250000 15 | 0.0000000000 16 | 0.0000000000 17 | -.2505638459 18 | -.3939762896 19 | -.3691638502 20 | -.0410388502 21 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-3_5.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.2880000000 3 | -.3840000000 4 | -.3360000000 5 | -.1920000000 6 | 0.0000000000 7 | -.0270092530 8 | -.3150092530 9 | -.3995286667 10 | -.3504788491 11 | -.1964418727 12 | -.0015891812 13 | 0.0000000000 14 | -.1920000000 15 | -.3360000000 16 | -.3840000000 17 | -.2880000000 18 | 0.0000000000 19 | -.0015891812 20 | -.1964418727 21 | -.3504788491 22 | -.3995286667 23 | -.3150092530 24 | -.0270092530 25 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-3_6.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.2546296296 3 | -.3703703704 4 | -.3750000000 5 | -.2962962963 6 | -.1620370370 7 | 0.0000000000 8 | -.0191016043 9 | -.2737312339 10 | -.3827658850 11 | -.3869147470 12 | -.3020995193 13 | -.1666505058 14 | -.0000003806 15 | 0.0000000000 16 | -.1620370370 17 | -.2962962963 18 | -.3750000000 19 | -.3703703704 20 | -.2546296296 21 | 0.0000000000 22 | -.0000003806 23 | -.1666505058 24 | -.3020995193 25 | -.3869147470 26 | -.3827658850 27 | -.2737312339 28 | -.0191016043 29 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-3_7.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.2274052478 3 | -.3498542274 4 | -.3848396501 5 | -.3498542274 6 | -.2623906706 7 | -.1399416910 8 | 0.0000000000 9 | -.0142151634 10 | -.2416204112 11 | -.3598206082 12 | -.3945554747 13 | -.3556153529 14 | -.2675629377 15 | -.1416263928 16 | -.0005239711 17 | 0.0000000000 18 | -.1399416910 19 | -.2623906706 20 | -.3498542274 21 | -.3848396501 22 | -.3498542274 23 | -.2274052478 24 | 0.0000000000 25 | -.0005239711 26 | -.1416263928 27 | -.2675629377 28 | -.3556153529 29 | -.3945554747 30 | -.3598206082 31 | -.2416204112 32 | -.0142151634 33 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-3_8.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.2050781250 3 | -.3281250000 4 | -.3808593750 5 | -.3750000000 6 | -.3222656250 7 | -.2343750000 8 | -.1230468750 9 | 0.0000000000 10 | -.0109876841 11 | -.2160658091 12 | -.3362541578 13 | -.3888453456 14 | -.3802903092 15 | -.3272298633 16 | -.2368701398 17 | -.1249469164 18 | -.0000037295 19 | 0.0000000000 20 | -.1230468750 21 | -.2343750000 22 | -.3222656250 23 | -.3750000000 24 | -.3808593750 25 | -.3281250000 26 | -.2050781250 27 | 0.0000000000 28 | -.0000037296 29 | -.1249469164 30 | -.2368701398 31 | -.3272298633 32 | -.3802903092 33 | -.3888453456 34 | -.3362541578 35 | -.2160658091 36 | -.0109876841 37 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-3_9.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.1865569273 3 | -.3072702332 4 | -.3703703704 5 | -.3840877915 6 | -.3566529492 7 | -.2962962963 8 | -.2112482853 9 | -.1097393690 10 | 0.0000000000 11 | -.0087456964 12 | -.1953026237 13 | -.3140019280 14 | -.3770143787 15 | -.3888154597 16 | -.3611851271 17 | -.2990387770 18 | -.2136498378 19 | -.1105527942 20 | -.0002300333 21 | 0.0000000000 22 | -.1097393690 23 | -.2112482853 24 | -.2962962963 25 | -.3566529492 26 | -.3840877915 27 | -.3703703704 28 | -.3072702332 29 | -.1865569273 30 | 0.0000000000 31 | -.0002300333 32 | -.1105527942 33 | -.2136498378 34 | -.2990387770 35 | -.3611851271 36 | -.3888154597 37 | -.3770143787 38 | -.3140019280 39 | -.1953026237 40 | -.0087456964 41 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-4_1.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | 0.0000000000 3 | -.4724703936 4 | -.4724703936 5 | 0.0000000000 6 | 0.0000000000 7 | -.6250000000 8 | -.6250000000 9 | 0.0000000000 10 | 0.0000000000 11 | -.4724703936 12 | -.4724703936 13 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-4_2.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4375000000 3 | 0.0000000000 4 | -.2173864279 5 | -.6548864279 6 | 0.0000000000 7 | 0.0000000000 8 | -.6250000000 9 | 0.0000000000 10 | -.1345090003 11 | -.7595090003 12 | -.1345090003 13 | 0.0000000000 14 | -.4375000000 15 | 0.0000000000 16 | 0.0000000000 17 | -.6548864279 18 | -.2173864279 19 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-4_3.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4691358025 3 | -.3209876543 4 | 0.0000000000 5 | -.1170222511 6 | -.5861580536 7 | -.3268206221 8 | -.0058329678 9 | 0.0000000000 10 | -.5432098765 11 | -.5432098765 12 | 0.0000000000 13 | -.0455493875 14 | -.6250000000 15 | -.6250000000 16 | -.0455493874 17 | 0.0000000000 18 | -.3209876543 19 | -.4691358025 20 | 0.0000000000 21 | -.0058329678 22 | -.3268206221 23 | -.5861580535 24 | -.1170222510 25 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-4_4.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4335937500 3 | -.4375000000 4 | -.2460937500 5 | 0.0000000000 6 | -.0721835129 7 | -.5057772629 8 | -.4510866518 9 | -.2596804016 10 | 0.0000000000 11 | 0.0000000000 12 | -.4453125000 13 | -.6250000000 14 | -.4453125000 15 | 0.0000000000 16 | -.0025206899 17 | -.4887912114 18 | -.6684787114 19 | -.4887912114 20 | -.0025206899 21 | 0.0000000000 22 | -.2460937500 23 | -.4375000000 24 | -.4335937500 25 | 0.0000000000 26 | 0.0000000000 27 | -.2596804016 28 | -.4510866518 29 | -.5057772629 30 | -.0721835129 31 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-4_5.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3904000000 3 | -.4704000000 4 | -.3744000000 5 | -.1984000000 6 | 0.0000000000 7 | -.0487664847 8 | -.4391664847 9 | -.4855660839 10 | -.3895660835 11 | -.1991559526 12 | -.0007559527 13 | 0.0000000000 14 | -.3712000000 15 | -.5952000000 16 | -.5952000000 17 | -.3712000000 18 | 0.0000000000 19 | -.0006375681 20 | -.3962253461 21 | -.6250000000 22 | -.6250000000 23 | -.3962253461 24 | -.0006375681 25 | 0.0000000000 26 | -.1984000000 27 | -.3744000000 28 | -.4704000000 29 | -.3904000000 30 | 0.0000000000 31 | -.0007559527 32 | -.1991559526 33 | -.3895660835 34 | -.4855660839 35 | -.4391664847 36 | -.0487664847 37 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-4_6.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3510802469 3 | -.4691358025 4 | -.4375000000 5 | -.3209876543 6 | -.1658950617 7 | 0.0000000000 8 | -.0350918908 9 | -.3861721377 10 | -.4833942743 11 | -.4517584715 12 | -.3236714374 13 | -.1685788448 14 | 0.0000000000 15 | 0.0000000000 16 | -.3163580247 17 | -.5432098765 18 | -.6250000000 19 | -.5432098765 20 | -.3163580247 21 | 0.0000000000 22 | -.0019232241 23 | -.3276060826 24 | -.5633698923 25 | -.6451600158 26 | -.5633698922 27 | -.3276060825 28 | -.0019232242 29 | 0.0000000000 30 | -.1658950617 31 | -.3209876543 32 | -.4375000000 33 | -.4691358025 34 | -.3510802469 35 | 0.0000000000 36 | 0.0000000000 37 | -.1685788446 38 | -.3236714375 39 | -.4517584715 40 | -.4833942743 41 | -.3861721378 42 | -.0350918909 43 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-4_7.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3173677634 3 | -.4539775094 4 | -.4648063307 5 | -.3948354852 6 | -.2790503957 7 | -.1424406497 8 | 0.0000000000 9 | -.0264386140 10 | -.3438063774 11 | -.4666718255 12 | -.4775006467 13 | -.3987833413 14 | -.2829982516 15 | -.1426374304 16 | -.0001967807 17 | 0.0000000000 18 | -.2748854644 19 | -.4914618909 20 | -.6097459392 21 | -.6097459392 22 | -.4914618909 23 | -.2748854644 24 | 0.0000000000 25 | -.0014298308 26 | -.2817569619 27 | -.5054695559 28 | -.6250000000 29 | -.6250000000 30 | -.5054695559 31 | -.2817569619 32 | -.0014298308 33 | 0.0000000000 34 | -.1424406497 35 | -.2790503957 36 | -.3948354852 37 | -.4648063307 38 | -.4539775094 39 | -.3173677634 40 | 0.0000000000 41 | -.0001967807 42 | -.1426374304 43 | -.2829982516 44 | -.3987833413 45 | -.4775006466 46 | -.4666718256 47 | -.3438063775 48 | -.0264386141 49 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-4_8.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.2888183594 3 | -.4335937500 4 | -.4724121094 5 | -.4375000000 6 | -.3552246094 7 | -.2460937500 8 | -.1247558594 9 | 0.0000000000 10 | -.0206247865 11 | -.3094431459 12 | -.4446970434 13 | -.4835154031 14 | -.4420114694 15 | -.3597360791 16 | -.2469429158 17 | -.1256050250 18 | 0.0000000000 19 | 0.0000000000 20 | -.2426757813 21 | -.4453125000 22 | -.5786132813 23 | -.6250000000 24 | -.5786132813 25 | -.4453125000 26 | -.2426757813 27 | 0.0000000000 28 | -.0004245076 29 | -.2483198241 30 | -.4539446184 31 | -.5901187310 32 | -.6365054498 33 | -.5901187311 34 | -.4539446182 35 | -.2483198244 36 | -.0004245074 37 | 0.0000000000 38 | -.1247558594 39 | -.2460937500 40 | -.3552246094 41 | -.4375000000 42 | -.4724121094 43 | -.4335937500 44 | -.2888183594 45 | 0.0000000000 46 | 0.0000000000 47 | -.1256050249 48 | -.2469429159 49 | -.3597360791 50 | -.4420114694 51 | -.4835154031 52 | -.4446970434 53 | -.3094431459 54 | -.0206247865 55 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-4_9.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.2645938119 3 | -.4118274653 4 | -.4691358025 5 | -.4602956866 6 | -.4054260021 7 | -.3209876543 8 | -.2197835696 9 | -.1109586953 10 | 0.0000000000 11 | -.0165339330 12 | -.2811277449 13 | -.4215026845 14 | -.4788110212 15 | -.4649411756 16 | -.4100714911 17 | -.3224323734 18 | -.2212282888 19 | -.1110307073 20 | -.0000720119 21 | 0.0000000000 22 | -.2170400854 23 | -.4054260021 24 | -.5432098765 25 | -.6157597927 26 | -.6157597927 27 | -.5432098765 28 | -.4054260021 29 | -.2170400854 30 | 0.0000000000 31 | -.0002307830 32 | -.2212053456 33 | -.4115366445 34 | -.5519934963 35 | -.6250000000 36 | -.6250000000 37 | -.5519934962 38 | -.4115366445 39 | -.2212053456 40 | -.0002307830 41 | 0.0000000000 42 | -.1109586953 43 | -.2197835696 44 | -.3209876543 45 | -.4054260021 46 | -.4602956866 47 | -.4691358025 48 | -.4118274653 49 | -.2645938119 50 | 0.0000000000 51 | -.0000720119 52 | -.1110307073 53 | -.2212282888 54 | -.3224323734 55 | -.4100714912 56 | -.4649411755 57 | -.4788110214 58 | -.4215026844 59 | -.2811277449 60 | -.0165339330 61 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-5_1.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | 0.0000000000 3 | -.5349922439 4 | -.5349922439 5 | 0.0000000000 6 | 0.0000000000 7 | -.7935782275 8 | -.7935782275 9 | 0.0000000000 10 | 0.0000000000 11 | -.7935782275 12 | -.7935782275 13 | 0.0000000000 14 | 0.0000000000 15 | -.5349922439 16 | -.5349922439 17 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-5_2.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4687500000 3 | 0.0000000000 4 | -.2854244413 5 | -.7541744413 6 | 0.0000000000 7 | 0.0000000000 8 | -.7812500000 9 | 0.0000000000 10 | -.2854244413 11 | -1.0214862520 12 | -.0980873400 13 | 0.0000000000 14 | -.7812500000 15 | 0.0000000000 16 | -.0980873400 17 | -1.0214862520 18 | -.2402362521 19 | 0.0000000000 20 | -.4687500000 21 | 0.0000000000 22 | 0.0000000000 23 | -.7541744413 24 | -.2854244413 25 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-5_3.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5349794239 3 | -.3292181070 4 | 0.0000000000 5 | -.1655550032 6 | -.7005344271 7 | -.3314197212 8 | -.0022016142 9 | 0.0000000000 10 | -.7407407407 11 | -.6172839506 12 | 0.0000000000 13 | -.0916480222 14 | -.8432770675 15 | -.7198202774 16 | 0.0000000000 17 | 0.0000000000 18 | -.6172839506 19 | -.7407407407 20 | 0.0000000000 21 | 0.0000000000 22 | -.7198202773 23 | -.8432770674 24 | -.0916480222 25 | 0.0000000000 26 | -.3292181070 27 | -.5349794239 28 | 0.0000000000 29 | -.0022016142 30 | -.3314197212 31 | -.7005344270 32 | -.1655550031 33 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-5_4.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5126953125 3 | -.4687500000 4 | -.2490234375 5 | 0.0000000000 6 | -.1062742609 7 | -.6189695734 8 | -.4776695138 9 | -.2579429513 10 | 0.0000000000 11 | 0.0000000000 12 | -.6298828125 13 | -.7812500000 14 | -.4833984375 15 | 0.0000000000 16 | -.0435068837 17 | -.6974867369 18 | -.8488539244 19 | -.5246839290 20 | 0.0000000000 21 | 0.0000000000 22 | -.4833984375 23 | -.7812500000 24 | -.6298828125 25 | 0.0000000000 26 | 0.0000000000 27 | -.5246839290 28 | -.8488539244 29 | -.6974867369 30 | -.0435068837 31 | 0.0000000000 32 | -.2490234375 33 | -.4687500000 34 | -.5126953125 35 | 0.0000000000 36 | 0.0000000000 37 | -.2579429513 38 | -.4776695138 39 | -.6189695734 40 | -.1062742609 41 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-5_5.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4723200000 3 | -.5222400000 4 | -.3897600000 5 | -.1996800000 6 | 0.0000000000 7 | -.0735741768 8 | -.5458941768 9 | -.5351135572 10 | -.4026335569 11 | -.1998511975 12 | -.0001711976 13 | 0.0000000000 14 | -.5350400000 15 | -.7852800000 16 | -.7027200000 17 | -.3929600000 18 | 0.0000000000 19 | -.0238494750 20 | -.5785930206 21 | -.8288330206 22 | -.7400105841 23 | -.3981752081 24 | -.0009288263 25 | 0.0000000000 26 | -.3929600000 27 | -.7027200000 28 | -.7852800000 29 | -.5350400000 30 | 0.0000000000 31 | -.0009288263 32 | -.3981752081 33 | -.7400105841 34 | -.8288330206 35 | -.5785930206 36 | -.0238494751 37 | 0.0000000000 38 | -.1996800000 39 | -.3897600000 40 | -.5222400000 41 | -.4723200000 42 | 0.0000000000 43 | -.0001711974 44 | -.1998511976 45 | -.4026335569 46 | -.5351135572 47 | -.5458941766 48 | -.0735741766 49 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-5_6.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4314557613 3 | -.5349794239 4 | -.4687500000 5 | -.3292181070 6 | -.1665380658 7 | 0.0000000000 8 | -.0538211821 9 | -.4852769434 10 | -.5489743883 11 | -.4827449643 12 | -.3303926932 13 | -.1677126520 14 | 0.0000000000 15 | 0.0000000000 16 | -.4610339506 17 | -.7407407407 18 | -.7812500000 19 | -.6172839506 20 | -.3298611111 21 | 0.0000000000 22 | -.0025778201 23 | -.4900396818 24 | -.7701037523 25 | -.8106130116 26 | -.6308859551 27 | -.3360965939 28 | 0.0000000000 29 | 0.0000000000 30 | -.3298611111 31 | -.6172839506 32 | -.7812500000 33 | -.7407407407 34 | -.4610339506 35 | 0.0000000000 36 | 0.0000000000 37 | -.3360965937 38 | -.6308859552 39 | -.8106130115 40 | -.7701037522 41 | -.4900396817 42 | -.0025778200 43 | 0.0000000000 44 | -.1665380658 45 | -.3292181070 46 | -.4687500000 47 | -.5349794239 48 | -.4314557613 49 | 0.0000000000 50 | 0.0000000000 51 | -.1677126518 52 | -.3303926933 53 | -.4827449643 54 | -.5489743883 55 | -.4852769435 56 | -.0538211822 57 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-5_7.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3944784911 3 | -.5283512822 4 | -.5105015767 5 | -.4141131671 6 | -.2838103171 7 | -.1427976438 8 | 0.0000000000 9 | -.0410309742 10 | -.4355094653 11 | -.5420312550 12 | -.5241815495 13 | -.4165068048 14 | -.2862039545 15 | -.1428294754 16 | -.0000318314 17 | 0.0000000000 18 | -.4034033438 19 | -.6848337002 20 | -.7925269233 21 | -.7318379247 22 | -.5438210270 23 | -.2838103171 24 | 0.0000000000 25 | -.0011244226 26 | -.4234880026 27 | -.7073041658 28 | -.8149973889 29 | -.7509162026 30 | -.5507827503 31 | -.2879962060 32 | 0.0000000000 33 | 0.0000000000 34 | -.2838103171 35 | -.5438210270 36 | -.7318379247 37 | -.7925269233 38 | -.6848337002 39 | -.4034033438 40 | 0.0000000000 41 | 0.0000000000 42 | -.2879962060 43 | -.5507827503 44 | -.7509162026 45 | -.8149973889 46 | -.7073041658 47 | -.4234880025 48 | -.0011244225 49 | 0.0000000000 50 | -.1427976438 51 | -.2838103171 52 | -.4141131671 53 | -.5105015767 54 | -.5283512822 55 | -.3944784911 56 | 0.0000000000 57 | -.0000318316 58 | -.1428294753 59 | -.2862039545 60 | -.4165068048 61 | -.5241815493 62 | -.5420312551 63 | -.4355094654 64 | -.0410309743 65 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-5_8.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3620910645 3 | -.5126953125 4 | -.5296325684 5 | -.4687500000 6 | -.3675842285 7 | -.2490234375 8 | -.1249694824 9 | 0.0000000000 10 | -.0322937491 11 | -.3943848136 12 | -.5254673313 13 | -.5424045872 14 | -.4720710706 15 | -.3709052992 16 | -.2493021722 17 | -.1252482174 18 | 0.0000000000 19 | 0.0000000000 20 | -.3578186035 21 | -.6298828125 22 | -.7731628418 23 | -.7812500000 24 | -.6733703613 25 | -.4833984375 26 | -.2488708496 27 | 0.0000000000 28 | -.0005309646 29 | -.3722273604 30 | -.6471111069 31 | -.7903911362 32 | -.7974223474 33 | -.6826757155 34 | -.4898622249 35 | -.2498611256 36 | -.0000474556 37 | 0.0000000000 38 | -.2488708496 39 | -.4833984375 40 | -.6733703613 41 | -.7812500000 42 | -.7731628418 43 | -.6298828125 44 | -.3578186035 45 | 0.0000000000 46 | -.0000474553 47 | -.2498611258 48 | -.4898622246 49 | -.6826757155 50 | -.7974223474 51 | -.7903911362 52 | -.6471111069 53 | -.3722273604 54 | -.0005309648 55 | 0.0000000000 56 | -.1249694824 57 | -.2490234375 58 | -.3675842285 59 | -.4687500000 60 | -.5296325684 61 | -.5126953125 62 | -.3620910645 63 | 0.0000000000 64 | 0.0000000000 65 | -.1252482171 66 | -.2493021724 67 | -.3709052992 68 | -.4720710706 69 | -.5424045872 70 | -.5254673313 71 | -.3943848136 72 | -.0322937491 73 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-5_9.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3339599316 3 | -.4931497570 4 | -.5349794239 5 | -.5026334062 6 | -.4271029145 7 | -.3292181070 8 | -.2216802994 9 | -.1110941760 10 | 0.0000000000 11 | -.0260681045 12 | -.3600280361 13 | -.5048283219 14 | -.5466579888 15 | -.5065271098 16 | -.4309966180 17 | -.3298994033 18 | -.2223615957 19 | -.1111032362 20 | -.0000090601 21 | 0.0000000000 22 | -.3210892648 23 | -.5796880557 24 | -.7407407407 25 | -.7935782147 26 | -.7458212671 27 | -.6172839506 28 | -.4338769497 29 | -.2215109485 30 | 0.0000000000 31 | -.0013758278 32 | -.3291907530 33 | -.5930490582 34 | -.7541491239 35 | -.8069865979 36 | -.7555969669 37 | -.6246328587 38 | -.4370895089 39 | -.2227129287 40 | 0.0000000000 41 | 0.0000000000 42 | -.2215109485 43 | -.4338769497 44 | -.6172839506 45 | -.7458212671 46 | -.7935782147 47 | -.7407407407 48 | -.5796880557 49 | -.3210892648 50 | 0.0000000000 51 | 0.0000000000 52 | -.2227129286 53 | -.4370895090 54 | -.6246328587 55 | -.7555969670 56 | -.8069865979 57 | -.7541491239 58 | -.5930490583 59 | -.3291907529 60 | -.0013758279 61 | 0.0000000000 62 | -.1110941760 63 | -.2216802994 64 | -.3292181070 65 | -.4271029145 66 | -.5026334062 67 | -.5349794239 68 | -.4931497570 69 | -.3339599316 70 | 0.0000000000 71 | -.0000090600 72 | -.1111032362 73 | -.2223615959 74 | -.3298994032 75 | -.4309966179 76 | -.5065271099 77 | -.5466579890 78 | -.5048283218 79 | -.3600280361 80 | -.0260681045 81 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-6_1.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | 0.0000000000 3 | -.5823559323 4 | -.5823559323 5 | 0.0000000000 6 | 0.0000000000 7 | -.9200868747 8 | -.9200868747 9 | 0.0000000000 10 | 0.0000000000 11 | -1.0312500000 12 | -1.0312500000 13 | 0.0000000000 14 | 0.0000000000 15 | -1.0312500000 16 | -.9200868746 17 | 0.0000000000 18 | 0.0000000000 19 | -.5823559324 20 | -.5823559324 21 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-6_2.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4843750000 3 | 0.0000000000 4 | -.3441062901 5 | -.8284812901 6 | 0.0000000000 7 | 0.0000000000 8 | -.8750000000 9 | 0.0000000000 10 | -.3506727450 11 | -1.2256727450 12 | -.0642091995 13 | 0.0000000000 14 | -1.0312500000 15 | 0.0000000000 16 | -.1992224867 17 | -1.2304724870 18 | -.1992224867 19 | 0.0000000000 20 | -.8750000000 21 | 0.0000000000 22 | -.0642091995 23 | -1.2256727450 24 | -.3506727451 25 | 0.0000000000 26 | -.4843750000 27 | 0.0000000000 28 | 0.0000000000 29 | -.8284812901 30 | -.3441062901 31 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-6_3.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5788751715 3 | -.3319615912 4 | 0.0000000000 5 | -.2125320601 6 | -.7914072316 7 | -.3327604333 8 | -.0007988423 9 | 0.0000000000 10 | -.8943758573 11 | -.6474622771 12 | 0.0000000000 13 | -.2125320601 14 | -1.0430129970 15 | -.7527176787 16 | 0.0000000000 17 | 0.0000000000 18 | -.8806584362 19 | -.8806584362 20 | 0.0000000000 21 | -.0529928445 22 | -1.0312500000 23 | -1.0312500000 24 | -.0529928444 25 | 0.0000000000 26 | -.6474622771 27 | -.8943758573 28 | 0.0000000000 29 | 0.0000000000 30 | -.7527176786 31 | -1.0430129970 32 | -.1486371401 33 | 0.0000000000 34 | -.3319615912 35 | -.5788751715 36 | 0.0000000000 37 | -.0007988423 38 | -.3327604333 39 | -.7914072315 40 | -.2125320600 41 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-6_4.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5720214844 3 | -.4843750000 4 | -.2497558594 5 | 0.0000000000 6 | -.1414330388 7 | -.7134545232 8 | -.4897516607 9 | -.2551325202 10 | 0.0000000000 11 | 0.0000000000 12 | -.7880859375 13 | -.8750000000 14 | -.4951171875 15 | 0.0000000000 16 | -.0744278539 17 | -.8729139218 18 | -.9598279843 19 | -.4976868307 20 | -.0025696432 21 | 0.0000000000 22 | -.7075195313 23 | -1.0312500000 24 | -.7075195313 25 | 0.0000000000 26 | 0.0000000000 27 | -.7834482955 28 | -1.1071787640 29 | -.7834482955 30 | 0.0000000000 31 | 0.0000000000 32 | -.4951171875 33 | -.8750000000 34 | -.7880859375 35 | 0.0000000000 36 | -.0025696432 37 | -.4976868307 38 | -.9598279843 39 | -.8729139218 40 | -.0744278538 41 | 0.0000000000 42 | -.2497558594 43 | -.4843750000 44 | -.5720214844 45 | 0.0000000000 46 | 0.0000000000 47 | -.2551325202 48 | -.4897516607 49 | -.7134545232 50 | -.1414330388 51 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-6_5.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5378560000 3 | -.5533440000 4 | -.3959040000 5 | -.1999360000 6 | 0.0000000000 7 | -.1001691243 8 | -.6380251243 9 | -.5632598958 10 | -.4058198958 11 | -.1999732707 12 | -.0000372710 13 | 0.0000000000 14 | -.6824960000 15 | -.9200640000 16 | -.7549440000 17 | -.3983360000 18 | 0.0000000000 19 | -.0421205241 20 | -.7434058820 21 | -.9809738820 22 | -.7926012890 23 | -.3992150144 24 | -.0008790142 25 | 0.0000000000 26 | -.5813760000 27 | -.9757440000 28 | -.9757440000 29 | -.5813760000 30 | 0.0000000000 31 | 0.0000000000 32 | -.6208362532 33 | -1.0312500000 34 | -1.0312500000 35 | -.6208362532 36 | 0.0000000000 37 | 0.0000000000 38 | -.3983360000 39 | -.7549440000 40 | -.9200640000 41 | -.6824960000 42 | 0.0000000000 43 | -.0008790146 44 | -.3992150144 45 | -.7926012890 46 | -.9809738820 47 | -.7434058820 48 | -.0421205241 49 | 0.0000000000 50 | -.1999360000 51 | -.3959040000 52 | -.5533440000 53 | -.5378560000 54 | 0.0000000000 55 | -.0000372710 56 | -.1999732707 57 | -.4058198958 58 | -.5632598958 59 | -.6380251243 60 | -.1001691243 61 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-6_6.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4984353567 3 | -.5788751715 4 | -.4843750000 5 | -.3319615912 6 | -.1666452332 7 | 0.0000000000 8 | -.0744263113 9 | -.5728616680 10 | -.5912917894 11 | -.4967916180 12 | -.3324336162 13 | -.1671172584 14 | 0.0000000000 15 | 0.0000000000 16 | -.5949931413 17 | -.8943758573 18 | -.8750000000 19 | -.6474622771 20 | -.3326474623 21 | 0.0000000000 22 | -.0260282745 23 | -.6383945928 24 | -.9377773088 25 | -.9093676606 26 | -.6527131614 27 | -.3377001006 28 | 0.0000000000 29 | 0.0000000000 30 | -.4906121399 31 | -.8806584362 32 | -1.0312500000 33 | -.8806584362 34 | -.4906121399 35 | 0.0000000000 36 | 0.0000000000 37 | -.5002605173 38 | -.9172645563 39 | -1.0678561200 40 | -.9172645563 41 | -.5002605171 42 | 0.0000000000 43 | 0.0000000000 44 | -.3326474623 45 | -.6474622771 46 | -.8750000000 47 | -.8943758573 48 | -.5949931413 49 | 0.0000000000 50 | 0.0000000000 51 | -.3377001005 52 | -.6527131615 53 | -.9093676605 54 | -.9377773088 55 | -.6383945928 56 | -.0260282747 57 | 0.0000000000 58 | -.1666452332 59 | -.3319615912 60 | -.4843750000 61 | -.5788751715 62 | -.4984353567 63 | 0.0000000000 64 | 0.0000000000 65 | -.1671172583 66 | -.3324336163 67 | -.4967916180 68 | -.5912917894 69 | -.5728616681 70 | -.0744263114 71 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-6_7.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4605734005 3 | -.5814754057 4 | -.5366131459 5 | -.4223750308 6 | -.2851702947 7 | -.1428486430 8 | 0.0000000000 9 | -.0573841158 10 | -.5179575163 11 | -.5947788978 12 | -.5499166383 13 | -.4236919640 14 | -.2864872278 15 | -.1428535930 16 | -.0000049498 17 | 0.0000000000 18 | -.5245773445 19 | -.8442060706 20 | -.9165568768 21 | -.7951788795 22 | -.5621807240 23 | -.2853912910 24 | 0.0000000000 25 | -.0171677676 26 | -.5560483795 27 | -.8756771056 28 | -.9454724680 29 | -.8059344328 30 | -.5695164724 31 | -.2855625962 32 | -.0001713048 33 | 0.0000000000 34 | -.4233440148 35 | -.7881919948 36 | -1.0027454550 37 | -1.0027454550 38 | -.7881919948 39 | -.4233440148 40 | 0.0000000000 41 | -.0003190133 42 | -.4277315233 43 | -.8122709819 44 | -1.0312500000 45 | -1.0312500000 46 | -.8122709816 47 | -.4277315236 48 | -.0003190133 49 | 0.0000000000 50 | -.2853912910 51 | -.5621807240 52 | -.7951788795 53 | -.9165568768 54 | -.8442060706 55 | -.5245773445 56 | 0.0000000000 57 | -.0001713051 58 | -.2855625960 59 | -.5695164725 60 | -.8059344328 61 | -.9454724680 62 | -.8756771055 63 | -.5560483794 64 | -.0171677677 65 | 0.0000000000 66 | -.1428486430 67 | -.2851702947 68 | -.4223750308 69 | -.5366131459 70 | -.5814754057 71 | -.4605734005 72 | 0.0000000000 73 | -.0000049498 74 | -.1428535930 75 | -.2864872278 76 | -.4236919640 77 | -.5499166384 78 | -.5947788978 79 | -.5179575164 80 | -.0573841159 81 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-6_8.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4262046814 3 | -.5720214844 4 | -.5653953552 5 | -.4843750000 6 | -.3722190857 7 | -.2497558594 8 | -.1249961853 9 | 0.0000000000 10 | -.0455527957 11 | -.4717574771 12 | -.5852677687 13 | -.5786416398 14 | -.4865848912 15 | -.3744289770 16 | -.2498398697 17 | -.1250801956 18 | 0.0000000000 19 | 0.0000000000 20 | -.4677276611 21 | -.7880859375 22 | -.9162139893 23 | -.8750000000 24 | -.7166290283 25 | -.4951171875 26 | -.2498321533 27 | 0.0000000000 28 | -.0024296053 29 | -.4910733227 30 | -.8117711921 31 | -.9398992439 32 | -.8882101254 33 | -.7255904079 34 | -.4969078815 35 | -.2506622749 36 | 0.0000000000 37 | 0.0000000000 38 | -.3718643188 39 | -.7075195313 40 | -.9451675415 41 | -1.0312500000 42 | -.9451675415 43 | -.7075195313 44 | -.3718643188 45 | 0.0000000000 46 | 0.0000000000 47 | -.3768927189 48 | -.7190700929 49 | -.9663525588 50 | -1.0524350170 51 | -.9663525588 52 | -.7190700929 53 | -.3768927190 54 | 0.0000000000 55 | 0.0000000000 56 | -.2498321533 57 | -.4951171875 58 | -.7166290283 59 | -.8750000000 60 | -.9162139893 61 | -.7880859375 62 | -.4677276611 63 | 0.0000000000 64 | 0.0000000000 65 | -.2506622747 66 | -.4969078815 67 | -.7255904079 68 | -.8882101254 69 | -.9398992438 70 | -.8117711920 71 | -.4910733227 72 | -.0024296053 73 | 0.0000000000 74 | -.1249961853 75 | -.2497558594 76 | -.3722190857 77 | -.4843750000 78 | -.5653953552 79 | -.5720214844 80 | -.4262046814 81 | 0.0000000000 82 | 0.0000000000 83 | -.1250801955 84 | -.2498398698 85 | -.3744289770 86 | -.4865848912 87 | -.5786416398 88 | -.5852677687 89 | -.4717574771 90 | -.0455527957 91 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-6_9.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.3956187046 3 | -.5564004283 4 | -.5788751715 5 | -.5261543614 6 | -.4367370978 7 | -.3319615912 8 | -.2221017949 9 | -.1111092294 10 | 0.0000000000 11 | -.0370183307 12 | -.4326370353 13 | -.5691039717 14 | -.5915787150 15 | -.5290994534 16 | -.4396821896 17 | -.3322531305 18 | -.2223933340 19 | -.1111103252 20 | -.0000010959 21 | 0.0000000000 22 | -.4212847710 23 | -.7332968288 24 | -.8943758573 25 | -.9111829912 26 | -.8156690959 27 | -.6474622771 28 | -.4416746167 29 | -.2221281384 30 | 0.0000000000 31 | -.0013290221 32 | -.4389960892 33 | -.7525837858 34 | -.9136628143 35 | -.9275875137 36 | -.8230046928 37 | -.6534881662 38 | -.4424373724 39 | -.2228908942 40 | 0.0000000000 41 | 0.0000000000 42 | -.3313406380 43 | -.6391189238 44 | -.8806584362 45 | -1.0139601570 46 | -1.0139601570 47 | -.8806584362 48 | -.6391189238 49 | -.3313406380 50 | 0.0000000000 51 | 0.0000000000 52 | -.3349992290 53 | -.6462868782 54 | -.8962911881 55 | -1.0312500000 56 | -1.0312500000 57 | -.8962911885 58 | -.6462868779 59 | -.3349992292 60 | 0.0000000000 61 | 0.0000000000 62 | -.2221281384 63 | -.4416746167 64 | -.6474622771 65 | -.8156690959 66 | -.9111829912 67 | -.8943758573 68 | -.7332968288 69 | -.4212847710 70 | 0.0000000000 71 | 0.0000000000 72 | -.2228908943 73 | -.4424373723 74 | -.6534881660 75 | -.8230046929 76 | -.9275875136 77 | -.9136628144 78 | -.7525837859 79 | -.4389960891 80 | -.0013290221 81 | 0.0000000000 82 | -.1111092294 83 | -.2221017949 84 | -.3319615912 85 | -.4367370978 86 | -.5261543614 87 | -.5788751715 88 | -.5564004283 89 | -.3956187046 90 | 0.0000000000 91 | -.0000010959 92 | -.1111103252 93 | -.2223933341 94 | -.3322531304 95 | -.4396821897 96 | -.5290994533 97 | -.5915787150 98 | -.5691039717 99 | -.4326370352 100 | -.0370183306 101 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-7_1.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | 0.0000000000 3 | -.6197314513 4 | -.6197314513 5 | 0.0000000000 6 | 0.0000000000 7 | -1.0193009690 8 | -1.0193009690 9 | 0.0000000000 10 | 0.0000000000 11 | -1.2162080700 12 | -1.2162080700 13 | 0.0000000000 14 | 0.0000000000 15 | -1.2162080700 16 | -1.2162080700 17 | 0.0000000000 18 | 0.0000000000 19 | -1.2162080700 20 | -1.0193009700 21 | 0.0000000000 22 | 0.0000000000 23 | -.6197314514 24 | -.6197314514 25 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-7_2.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4921875000 3 | 0.0000000000 4 | -.3942026772 5 | -.8863901772 6 | 0.0000000000 7 | 0.0000000000 8 | -.9296875000 9 | 0.0000000000 10 | -.4571714030 11 | -1.3868589030 12 | -.0396290396 13 | 0.0000000000 14 | -1.2031250000 15 | 0.0000000000 16 | -.4571714030 17 | -1.5239106710 18 | -.1461921471 19 | 0.0000000000 20 | -1.2031250000 21 | 0.0000000000 22 | -.1461921472 23 | -1.5239106720 24 | -.3207856721 25 | 0.0000000000 26 | -.9296875000 27 | 0.0000000000 28 | -.0396290395 29 | -1.3868589030 30 | -.4571714030 31 | 0.0000000000 32 | -.4921875000 33 | 0.0000000000 34 | 0.0000000000 35 | -.8863901772 36 | -.3942026772 37 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-7_3.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6081390032 3 | -.3328760860 4 | 0.0000000000 5 | -.2566552414 6 | -.8647942446 7 | -.3331594565 8 | -.0002833707 9 | 0.0000000000 10 | -1.0114311840 11 | -.6593507087 12 | 0.0000000000 13 | -.2566552414 14 | -1.2239525850 15 | -.7559457754 16 | 0.0000000000 17 | 0.0000000000 18 | -1.1074531320 19 | -.9474165524 20 | 0.0000000000 21 | -.0971404186 22 | -1.2836325010 23 | -1.1235959210 24 | -.0268247183 25 | 0.0000000000 26 | -.9474165524 27 | -1.1074531320 28 | 0.0000000000 29 | -.0268247184 30 | -1.1235959200 31 | -1.2836325000 32 | -.0971404186 33 | 0.0000000000 34 | -.6593507087 35 | -1.0114311840 36 | 0.0000000000 37 | 0.0000000000 38 | -.7559457751 39 | -1.2239525850 40 | -.2125214007 41 | 0.0000000000 42 | -.3328760860 43 | -.6081390032 44 | 0.0000000000 45 | -.0002833702 46 | -.3331594567 47 | -.8647942446 48 | -.2566552414 49 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-7_4.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6165161133 3 | -.4921875000 4 | -.2499389648 5 | 0.0000000000 6 | -.1764230603 7 | -.7929391736 8 | -.4952672085 9 | -.2530186731 10 | 0.0000000000 11 | 0.0000000000 12 | -.9215698242 13 | -.9296875000 14 | -.4985961914 15 | 0.0000000000 16 | -.1764230603 17 | -1.0334021810 18 | -1.0236179740 19 | -.4994031618 20 | -.0008069703 21 | 0.0000000000 22 | -.9151611328 23 | -1.2031250000 24 | -.7357177734 25 | 0.0000000000 26 | -.0375127818 27 | -1.0247175520 28 | -1.3126814190 29 | -.8036293401 30 | 0.0000000000 31 | 0.0000000000 32 | -.7357177734 33 | -1.2031250000 34 | -.9151611328 35 | 0.0000000000 36 | 0.0000000000 37 | -.8036293401 38 | -1.3126814180 39 | -1.0247175510 40 | -.0375127818 41 | 0.0000000000 42 | -.4985961914 43 | -.9296875000 44 | -.9215698242 45 | 0.0000000000 46 | -.0008069703 47 | -.4994031618 48 | -1.0236179750 49 | -1.0334021810 50 | -.1118323572 51 | 0.0000000000 52 | -.2499389648 53 | -.4921875000 54 | -.6165161133 55 | 0.0000000000 56 | 0.0000000000 57 | -.2530186728 58 | -.4952672087 59 | -.7929391735 60 | -.1764230602 61 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-7_5.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5902848000 3 | -.5720064000 4 | -.3983616000 5 | -.1999872000 6 | 0.0000000000 7 | -.1276215182 8 | -.7179063182 9 | -.5791911042 10 | -.4055463042 11 | -.1999951326 12 | -.0000079325 13 | 0.0000000000 14 | -.8135680000 15 | -1.0133760000 16 | -.7795200000 17 | -.3996160000 18 | 0.0000000000 19 | -.0652381899 20 | -.8884346576 21 | -1.0882426580 22 | -.7861661598 23 | -.4062621594 24 | 0.0000000000 25 | 0.0000000000 26 | -.7616000000 27 | -1.1934720000 28 | -1.0832640000 29 | -.5949440000 30 | 0.0000000000 31 | 0.0000000000 32 | -.8253222540 33 | -1.2582983420 34 | -1.1480903420 35 | -.5982874056 36 | -.0014706978 37 | 0.0000000000 38 | -.5949440000 39 | -1.0832640000 40 | -1.1934720000 41 | -.7616000000 42 | 0.0000000000 43 | -.0014706978 44 | -.5982874054 45 | -1.1480903420 46 | -1.2582983420 47 | -.8253222550 48 | 0.0000000000 49 | 0.0000000000 50 | -.3996160000 51 | -.7795200000 52 | -1.0133760000 53 | -.8135680000 54 | 0.0000000000 55 | 0.0000000000 56 | -.4062621591 57 | -.7861661599 58 | -1.0882426580 59 | -.8884346576 60 | -.0652381898 61 | 0.0000000000 62 | -.1999872000 63 | -.3983616000 64 | -.5720064000 65 | -.5902848000 66 | 0.0000000000 67 | -.0000079325 68 | -.1999951326 69 | -.4055463042 70 | -.5791911041 71 | -.7179063184 72 | -.1276215184 73 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-7_6.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5542516861 3 | -.6081390032 4 | -.4921875000 5 | -.3328760860 6 | -.1666630944 7 | 0.0000000000 8 | -.0962305485 9 | -.6504822346 10 | -.6184646326 11 | -.5025131296 12 | -.3330563341 13 | -.1668433426 14 | 0.0000000000 15 | 0.0000000000 16 | -.7177890661 17 | -1.0114311840 18 | -.9296875000 19 | -.6593507087 20 | -.3332011603 21 | 0.0000000000 22 | -.0411426297 23 | -.7747665328 24 | -1.0684086510 25 | -.9650408486 26 | -.6617560333 27 | -.3356064848 28 | 0.0000000000 29 | 0.0000000000 30 | -.6468978624 31 | -1.1074531320 32 | -1.2031250000 33 | -.9474165524 34 | -.4978637974 35 | 0.0000000000 36 | 0.0000000000 37 | -.6849985580 38 | -1.1571260700 39 | -1.2527979380 40 | -.9832236034 41 | -.4989831399 42 | -.0011193421 43 | 0.0000000000 44 | -.4978637974 45 | -.9474165524 46 | -1.2031250000 47 | -1.1074531320 48 | -.6468978624 49 | 0.0000000000 50 | -.0011193428 51 | -.4989831396 52 | -.9832236034 53 | -1.2527979380 54 | -1.1571260700 55 | -.6849985580 56 | 0.0000000000 57 | 0.0000000000 58 | -.3332011603 59 | -.6593507087 60 | -.9296875000 61 | -1.0114311840 62 | -.7177890661 63 | 0.0000000000 64 | 0.0000000000 65 | -.3356064846 66 | -.6617560333 67 | -.9650408483 68 | -1.0684086510 69 | -.7747665331 70 | -.0411426299 71 | 0.0000000000 72 | -.1666630944 73 | -.3328760860 74 | -.4921875000 75 | -.6081390032 76 | -.5542516861 77 | 0.0000000000 78 | 0.0000000000 79 | -.1668433426 80 | -.3330563341 81 | -.5025131297 82 | -.6184646325 83 | -.6504822349 84 | -.0962305488 85 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-7_7.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5172261801 3 | -.6194212081 4 | -.5515340425 5 | -.4259158295 6 | -.2855588597 7 | -.1428559286 8 | 0.0000000000 9 | -.0750012447 10 | -.5922274248 11 | -.6315279604 12 | -.5636407949 13 | -.4265974030 14 | -.2862404330 15 | -.1428566812 16 | -.0000007523 17 | 0.0000000000 18 | -.6378829035 19 | -.9732217990 20 | -.9986218085 21 | -.8270460680 22 | -.5683977643 23 | -.2856608580 24 | 0.0000000000 25 | -.0275351604 26 | -.6811094451 27 | -1.0164483410 28 | -1.0312682120 29 | -.8328617080 30 | -.5742134039 31 | -.2856917607 32 | -.0000309024 33 | 0.0000000000 34 | -.5602548987 35 | -1.0082776490 36 | -1.2107054520 37 | -1.1290339420 38 | -.8308370055 39 | -.4275478026 40 | 0.0000000000 41 | 0.0000000000 42 | -.5840396554 43 | -1.0442507500 44 | -1.2466785530 45 | -1.1623077450 46 | -.8401797231 47 | -.4316239931 48 | 0.0000000000 49 | 0.0000000000 50 | -.4275478026 51 | -.8308370055 52 | -1.1290339420 53 | -1.2107054520 54 | -1.0082776490 55 | -.5602548987 56 | 0.0000000000 57 | 0.0000000000 58 | -.4316239937 59 | -.8401797226 60 | -1.1623077460 61 | -1.2466785540 62 | -1.0442507510 63 | -.5840396554 64 | 0.0000000000 65 | 0.0000000000 66 | -.2856608580 67 | -.5683977643 68 | -.8270460680 69 | -.9986218085 70 | -.9732217990 71 | -.6378829035 72 | 0.0000000000 73 | -.0000309031 74 | -.2856917604 75 | -.5742134040 76 | -.8328617079 77 | -1.0312682120 78 | -1.0164483410 79 | -.6811094450 80 | -.0275351607 81 | 0.0000000000 82 | -.1428559286 83 | -.2855588597 84 | -.4259158295 85 | -.5515340425 86 | -.6194212081 87 | -.5172261801 88 | 0.0000000000 89 | -.0000007523 90 | -.1428566812 91 | -.2862404333 92 | -.4265974028 93 | -.5636407949 94 | -.6315279604 95 | -.5922274247 96 | -.0750012446 97 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-7_8.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4823040962 3 | -.6165161133 4 | -.5877470970 5 | -.4921875000 6 | -.3739571571 7 | -.2499389648 8 | -.1249995232 9 | 0.0000000000 10 | -.0600303839 11 | -.5423344801 12 | -.6293613411 13 | -.6005923245 14 | -.4935658053 15 | -.3753354621 16 | -.2499630251 17 | -.1250235833 18 | 0.0000000000 19 | 0.0000000000 20 | -.5719122887 21 | -.9215698242 22 | -1.0190320010 23 | -.9296875000 24 | -.7357478142 25 | -.4985961914 26 | -.2499756813 27 | 0.0000000000 28 | -.0193022368 29 | -.6050525536 30 | -.9547100891 31 | -1.0475758160 32 | -.9388982696 33 | -.7436305612 34 | -.4990642543 35 | -.2504437443 36 | 0.0000000000 37 | 0.0000000000 38 | -.4932222366 39 | -.9151611328 40 | -1.1686849590 41 | -1.2031250000 42 | -1.0367059710 43 | -.7357177734 44 | -.3744611740 45 | 0.0000000000 46 | -.0000013760 47 | -.4999800464 48 | -.9410131468 49 | -1.1964562550 50 | -1.2308962960 51 | -1.0583878290 52 | -.7399838096 53 | -.3775787811 54 | 0.0000000000 55 | 0.0000000000 56 | -.3744611740 57 | -.7357177734 58 | -1.0367059710 59 | -1.2031250000 60 | -1.1686849590 61 | -.9151611328 62 | -.4932222366 63 | 0.0000000000 64 | 0.0000000000 65 | -.3775787806 66 | -.7399838102 67 | -1.0583878280 68 | -1.2308962950 69 | -1.1964562540 70 | -.9410131478 71 | -.4999800459 72 | -.0000013760 73 | 0.0000000000 74 | -.2499756813 75 | -.4985961914 76 | -.7357478142 77 | -.9296875000 78 | -1.0190320010 79 | -.9215698242 80 | -.5719122887 81 | 0.0000000000 82 | 0.0000000000 83 | -.2504437442 84 | -.4990642543 85 | -.7436305620 86 | -.9388982688 87 | -1.0475758170 88 | -.9547100891 89 | -.6050525536 90 | -.0193022368 91 | 0.0000000000 92 | -.1249995232 93 | -.2499389648 94 | -.3739571571 95 | -.4921875000 96 | -.5877470970 97 | -.6165161133 98 | -.4823040962 99 | 0.0000000000 100 | 0.0000000000 101 | -.1250235836 102 | -.2499630249 103 | -.3753354621 104 | -.4935658053 105 | -.6005923245 106 | -.6293613411 107 | -.5423344802 108 | -.0600303840 109 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-7_9.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4504265029 3 | -.6055953948 4 | -.6081390032 5 | -.5392215588 6 | -.4410189571 7 | -.3328760860 8 | -.2221954606 9 | -.1111109020 10 | 0.0000000000 11 | -.0491010935 12 | -.4995275964 13 | -.6185092878 14 | -.6210528962 15 | -.5413061283 16 | -.4431035265 17 | -.3329934409 18 | -.2223128155 19 | -.1111110316 20 | -.0000001296 21 | 0.0000000000 22 | -.5171984180 23 | -.8668260238 24 | -1.0114311840 25 | -.9869727360 26 | -.8520648994 27 | -.6593507087 28 | -.4437352615 29 | -.2222100959 30 | 0.0000000000 31 | -.0140407269 32 | -.5429787049 33 | -.8926063107 34 | -1.0358240770 35 | -.9984837829 36 | -.8608935817 37 | -.6608054662 38 | -.4451900191 39 | -.2222171213 40 | -.0000070253 41 | 0.0000000000 42 | -.4400998627 43 | -.8328868533 44 | -1.1074531320 45 | -1.2151949970 46 | -1.1507120370 47 | -.9474165524 48 | -.6583906356 49 | -.3330282927 50 | 0.0000000000 51 | -.0001819967 52 | -.4438957290 53 | -.8516338768 54 | -1.1297027020 55 | -1.2374445670 56 | -1.1708903600 57 | -.9563739021 58 | -.6640301624 59 | -.3331893329 60 | -.0001610403 61 | 0.0000000000 62 | -.3330282927 63 | -.6583906356 64 | -.9474165524 65 | -1.1507120370 66 | -1.2151949970 67 | -1.1074531320 68 | -.8328868533 69 | -.4400998627 70 | 0.0000000000 71 | -.0001610402 72 | -.3331893330 73 | -.6640301614 74 | -.9563739033 75 | -1.1708903580 76 | -1.2374445670 77 | -1.1297027020 78 | -.8516338768 79 | -.4438957290 80 | -.0001819966 81 | 0.0000000000 82 | -.2222100959 83 | -.4437352615 84 | -.6593507087 85 | -.8520648994 86 | -.9869727360 87 | -1.0114311840 88 | -.8668260238 89 | -.5171984180 90 | 0.0000000000 91 | -.0000070253 92 | -.2222171213 93 | -.4451900192 94 | -.6608054662 95 | -.8608935817 96 | -.9984837828 97 | -1.0358240770 98 | -.8926063107 99 | -.5429787049 100 | -.0140407268 101 | 0.0000000000 102 | -.1111109020 103 | -.2221954606 104 | -.3328760860 105 | -.4410189571 106 | -.5392215588 107 | -.6081390032 108 | -.6055953948 109 | -.4504265029 110 | 0.0000000000 111 | -.0000001295 112 | -.1111110316 113 | -.2223128154 114 | -.3329934410 115 | -.4431035268 116 | -.5413061281 117 | -.6210528962 118 | -.6185092878 119 | -.4995275964 120 | -.0491010935 121 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-8_1.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | 0.0000000000 3 | -.6501225015 4 | -.6501225015 5 | 0.0000000000 6 | 0.0000000000 7 | -1.0996151080 8 | -1.0996151080 9 | 0.0000000000 10 | 0.0000000000 11 | -1.3651844220 12 | -1.3651844220 13 | 0.0000000000 14 | 0.0000000000 15 | -1.4531250000 16 | -1.4531250000 17 | 0.0000000000 18 | 0.0000000000 19 | -1.4531250000 20 | -1.3651844210 21 | 0.0000000000 22 | 0.0000000000 23 | -1.4531250000 24 | -1.0996151080 25 | 0.0000000000 26 | 0.0000000000 27 | -.6501225015 28 | -.6501225015 29 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-8_2.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4960937500 3 | 0.0000000000 4 | -.4369922931 5 | -.9330860431 6 | 0.0000000000 7 | 0.0000000000 8 | -.9609375000 9 | 0.0000000000 10 | -.5555804015 11 | -1.5165179020 12 | -.0235634183 13 | 0.0000000000 14 | -1.3164062500 15 | 0.0000000000 16 | -.5555804015 17 | -1.7676326260 18 | -.0999934670 19 | 0.0000000000 20 | -1.4531250000 21 | 0.0000000000 22 | -.2578559524 23 | -1.7109809520 24 | -.2578559524 25 | 0.0000000000 26 | -1.3164062500 27 | 0.0000000000 28 | -.0999934670 29 | -1.7676326260 30 | -.4512263758 31 | 0.0000000000 32 | -.9609375000 33 | 0.0000000000 34 | -.0235634183 35 | -1.5165179020 36 | -.5555804015 37 | 0.0000000000 38 | -.4960937500 39 | 0.0000000000 40 | 0.0000000000 41 | -.9330860432 42 | -.4369922932 43 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-8_3.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6276482244 3 | -.3331809175 4 | 0.0000000000 5 | -.2973862120 6 | -.9250344364 7 | -.3332800065 8 | -.0000990889 9 | 0.0000000000 10 | -1.0992226790 11 | -.6639231824 12 | 0.0000000000 13 | -.2973862120 14 | -1.3791149240 15 | -.7465733531 16 | 0.0000000000 17 | 0.0000000000 18 | -1.2976680380 19 | -.9775948788 20 | 0.0000000000 21 | -.1536117296 22 | -1.4783678400 23 | -1.1582946810 24 | 0.0000000000 25 | 0.0000000000 26 | -1.2229843010 27 | -1.2229843010 28 | 0.0000000000 29 | -.0549136686 30 | -1.4531250000 31 | -1.4531250000 32 | -.0549136686 33 | 0.0000000000 34 | -.9775948788 35 | -1.2976680380 36 | 0.0000000000 37 | 0.0000000000 38 | -1.1582946810 39 | -1.4783678400 40 | -.1536117299 41 | 0.0000000000 42 | -.6639231824 43 | -1.0992226790 44 | 0.0000000000 45 | 0.0000000000 46 | -.7465733526 47 | -1.3791149250 48 | -.2798922456 49 | 0.0000000000 50 | -.3331809175 51 | -.6276482244 52 | 0.0000000000 53 | -.0000990891 54 | -.3332800064 55 | -.9250344363 56 | -.2973862119 57 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-8_4.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6498870850 3 | -.4960937500 4 | -.2499847412 5 | 0.0000000000 6 | -.2104574159 7 | -.8603445009 8 | -.4978007510 9 | -.2516917426 10 | 0.0000000000 11 | 0.0000000000 12 | -1.0328063960 13 | -.9609375000 14 | -.4996032715 15 | 0.0000000000 16 | -.2104574159 17 | -1.1870223650 18 | -1.0568182540 19 | -.4998465558 20 | -.0002432845 21 | 0.0000000000 22 | -1.1042633060 23 | -1.3164062500 24 | -.7453765869 25 | 0.0000000000 26 | -.0629838490 27 | -1.2409267520 28 | -1.4530696960 29 | -.7985923459 30 | 0.0000000000 31 | 0.0000000000 32 | -.9680786133 33 | -1.4531250000 34 | -.9680786133 35 | 0.0000000000 36 | 0.0000000000 37 | -1.0785097980 38 | -1.5635561850 39 | -1.0785097980 40 | 0.0000000000 41 | 0.0000000000 42 | -.7453765869 43 | -1.3164062500 44 | -1.1042633060 45 | 0.0000000000 46 | 0.0000000000 47 | -.7985923449 48 | -1.4530696970 49 | -1.2409267530 50 | -.0629838486 51 | 0.0000000000 52 | -.4996032715 53 | -.9609375000 54 | -1.0328063960 55 | 0.0000000000 56 | -.0002432844 57 | -.4998465559 58 | -1.0568182530 59 | -1.1870223660 60 | -.1542159698 61 | 0.0000000000 62 | -.2499847412 63 | -.4960937500 64 | -.6498870850 65 | 0.0000000000 66 | 0.0000000000 67 | -.2516917423 68 | -.4978007512 69 | -.8603445008 70 | -.2104574158 71 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-8_5.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6322278400 3 | -.5832038400 4 | -.3993446400 5 | -.1999974400 6 | 0.0000000000 7 | -.1552564284 8 | -.7874842684 9 | -.5881987863 10 | -.4043395865 11 | -.1999991043 12 | -.0000016644 13 | 0.0000000000 14 | -.9289113600 15 | -1.0768281600 16 | -.7908249600 17 | -.3999129600 18 | 0.0000000000 19 | -.1552564284 20 | -1.0215050150 21 | -1.1613303350 22 | -.7942778252 23 | -.4033658254 24 | 0.0000000000 25 | 0.0000000000 26 | -.9319936000 27 | -1.3614336000 28 | -1.1410176000 29 | -.5986816000 30 | 0.0000000000 31 | -.0299986823 32 | -1.0205835760 33 | -1.4500235760 34 | -1.2064738570 35 | -.5994340590 36 | -.0007524590 37 | 0.0000000000 38 | -.7882752000 39 | -1.3673472000 40 | -1.3673472000 41 | -.7882752000 42 | 0.0000000000 43 | 0.0000000000 44 | -.8402881250 45 | -1.4531250000 46 | -1.4531250000 47 | -.8402881250 48 | 0.0000000000 49 | 0.0000000000 50 | -.5986816000 51 | -1.1410176000 52 | -1.3614336000 53 | -.9319936000 54 | 0.0000000000 55 | -.0007524587 56 | -.5994340591 57 | -1.2064738570 58 | -1.4500235760 59 | -1.0205835760 60 | -.0299986822 61 | 0.0000000000 62 | -.3999129600 63 | -.7908249600 64 | -1.0768281600 65 | -.9289113600 66 | 0.0000000000 67 | 0.0000000000 68 | -.4033658254 69 | -.7942778252 70 | -1.1613303350 71 | -1.0215050150 72 | -.0925936547 73 | 0.0000000000 74 | -.1999974400 75 | -.3993446400 76 | -.5832038400 77 | -.6322278400 78 | 0.0000000000 79 | -.0000016644 80 | -.1999991043 81 | -.4043395865 82 | -.5881987863 83 | -.7874842684 84 | -.1552564284 85 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-8_6.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6007652940 3 | -.6276482244 4 | -.4960937500 5 | -.3331809175 6 | -.1666660713 7 | 0.0000000000 8 | -.1187072939 9 | -.7194725879 10 | -.6358599448 11 | -.5043054707 12 | -.3332475221 13 | -.1667326758 14 | 0.0000000000 15 | 0.0000000000 16 | -.8294217250 17 | -1.0992226790 18 | -.9609375000 19 | -.6639231824 20 | -.3333083276 21 | 0.0000000000 22 | -.0595494583 23 | -.8979937020 24 | -1.1677946560 25 | -.9700190694 26 | -.6730047519 27 | -.3333237233 28 | -.0000153953 29 | 0.0000000000 30 | -.7976019519 31 | -1.2976680380 32 | -1.3164062500 33 | -.9775948788 34 | -.4995338220 35 | 0.0000000000 36 | 0.0000000000 37 | -.8543079549 38 | -1.3557014570 39 | -1.3744396690 40 | -.9864652493 41 | -.5042963376 42 | 0.0000000000 43 | 0.0000000000 44 | -.6615916971 45 | -1.2229843010 46 | -1.4531250000 47 | -1.2229843010 48 | -.6615916971 49 | 0.0000000000 50 | -.0001450091 51 | -.6663018518 52 | -1.2781693780 53 | -1.5083100770 54 | -1.2781693780 55 | -.6663018520 56 | -.0001450092 57 | 0.0000000000 58 | -.4995338220 59 | -.9775948788 60 | -1.3164062500 61 | -1.2976680380 62 | -.7976019519 63 | 0.0000000000 64 | 0.0000000000 65 | -.5042963383 66 | -.9864652488 67 | -1.3744396700 68 | -1.3557014580 69 | -.8543079549 70 | 0.0000000000 71 | 0.0000000000 72 | -.3333083276 73 | -.6639231824 74 | -.9609375000 75 | -1.0992226790 76 | -.8294217250 77 | 0.0000000000 78 | -.0000153955 79 | -.3333237232 80 | -.6730047517 81 | -.9700190695 82 | -1.1677946560 83 | -.8979937024 84 | -.0595494581 85 | 0.0000000000 86 | -.1666660713 87 | -.3331809175 88 | -.4960937500 89 | -.6276482244 90 | -.6007652940 91 | 0.0000000000 92 | 0.0000000000 93 | -.1667326758 94 | -.3332475221 95 | -.5043054704 96 | -.6358599450 97 | -.7194725878 98 | -.1187072938 99 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-8_7.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5657857054 3 | -.6465253527 4 | -.5600602692 5 | -.4274333147 6 | -.2856698783 7 | -.1428569694 8 | 0.0000000000 9 | -.0934784083 10 | -.6592641137 11 | -.6570455843 12 | -.5705805011 13 | -.4277717743 14 | -.2860083374 15 | -.1428570822 16 | -.0000001127 17 | 0.0000000000 18 | -.7430952083 19 | -1.0762175490 20 | -1.0519107250 21 | -.8427267481 22 | -.5704516080 23 | -.2857056124 24 | 0.0000000000 25 | -.0404213455 26 | -.7974770906 27 | -1.1305994310 28 | -1.0857004070 29 | -.8461513651 30 | -.5738762242 31 | -.2857109580 32 | -.0000053456 33 | 0.0000000000 34 | -.6937935932 35 | -1.2023433250 36 | -1.3647104210 37 | -1.2013674020 38 | -.8474620373 39 | -.4283794011 40 | 0.0000000000 41 | 0.0000000000 42 | -.7308855595 43 | -1.2485333790 44 | -1.4109004750 45 | -1.2348084960 46 | -.8505485660 47 | -.4314659301 48 | 0.0000000000 49 | 0.0000000000 50 | -.5689549388 51 | -1.0856159650 52 | -1.4089339770 53 | -1.4089339770 54 | -1.0856159650 55 | -.5689549388 56 | 0.0000000000 57 | -.0012888635 58 | -.5702438025 59 | -1.1200150210 60 | -1.4531250000 61 | -1.4531250000 62 | -1.1200150210 63 | -.5702438025 64 | -.0012888633 65 | 0.0000000000 66 | -.4283794011 67 | -.8474620373 68 | -1.2013674020 69 | -1.3647104210 70 | -1.2023433250 71 | -.6937935932 72 | 0.0000000000 73 | 0.0000000000 74 | -.4314659296 75 | -.8505485662 76 | -1.2348084970 77 | -1.4109004760 78 | -1.2485333800 79 | -.7308855589 80 | 0.0000000000 81 | 0.0000000000 82 | -.2857056124 83 | -.5704516080 84 | -.8427267481 85 | -1.0519107250 86 | -1.0762175490 87 | -.7430952083 88 | 0.0000000000 89 | -.0000053453 90 | -.2857109580 91 | -.5738762243 92 | -.8461513650 93 | -1.0857004070 94 | -1.1305994310 95 | -.7974770899 96 | -.0404213459 97 | 0.0000000000 98 | -.1428569694 99 | -.2856698783 100 | -.4274333147 101 | -.5600602692 102 | -.6465253527 103 | -.5657857054 104 | 0.0000000000 105 | -.0000001127 106 | -.1428570822 107 | -.2860083377 108 | -.4277717740 109 | -.5705805010 110 | -.6570455844 111 | -.6592641138 112 | -.0934784084 113 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-8_8.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.5313910842 3 | -.6498870850 4 | -.6017169356 5 | -.4960937500 6 | -.3746089339 7 | -.2499847412 8 | -.1249999404 9 | 0.0000000000 10 | -.0754150331 11 | -.6068061173 12 | -.6617712182 13 | -.6136010688 14 | -.4969158493 15 | -.3754310332 16 | -.2499914092 17 | -.1250066083 18 | 0.0000000000 19 | 0.0000000000 20 | -.6700862646 21 | -1.0328063960 22 | -1.0916751620 23 | -.9609375000 24 | -.7440036535 25 | -.4996032715 26 | -.2499965429 27 | 0.0000000000 28 | -.0286392105 29 | -.7131536956 30 | -1.0758738270 31 | -1.1231826200 32 | -.9670357605 33 | -.7501019139 34 | -.4997558296 35 | -.2501491016 36 | 0.0000000000 37 | 0.0000000000 38 | -.6124334931 39 | -1.1042633060 40 | -1.3469401000 41 | -1.3164062500 42 | -1.0829821230 43 | -.7453765869 44 | -.3749113679 45 | 0.0000000000 46 | 0.0000000000 47 | -.6374170289 48 | -1.1397265920 49 | -1.3824033860 50 | -1.3476956320 51 | -1.0919503970 52 | -.7514504785 53 | -.3749623757 54 | -.0000510078 55 | 0.0000000000 56 | -.4986813068 57 | -.9680786133 58 | -1.3205730920 59 | -1.4531250000 60 | -1.3205730920 61 | -.9680786133 62 | -.4986813068 63 | 0.0000000000 64 | 0.0000000000 65 | -.5025217689 66 | -.9803548637 67 | -1.3529427800 68 | -1.4854946880 69 | -1.3529427800 70 | -.9803548637 71 | -.5025217691 72 | 0.0000000000 73 | 0.0000000000 74 | -.3749113679 75 | -.7453765869 76 | -1.0829821230 77 | -1.3164062500 78 | -1.3469401000 79 | -1.1042633060 80 | -.6124334931 81 | 0.0000000000 82 | -.0000510078 83 | -.3749623757 84 | -.7514504786 85 | -1.0919503970 86 | -1.3476956320 87 | -1.3824033860 88 | -1.1397265920 89 | -.6374170286 90 | 0.0000000000 91 | 0.0000000000 92 | -.2499965429 93 | -.4996032715 94 | -.7440036535 95 | -.9609375000 96 | -1.0916751620 97 | -1.0328063960 98 | -.6700862646 99 | 0.0000000000 100 | 0.0000000000 101 | -.2501491013 102 | -.4997558298 103 | -.7501019137 104 | -.9670357605 105 | -1.1231826200 106 | -1.0758738280 107 | -.7131536961 108 | -.0286392105 109 | 0.0000000000 110 | -.1249999404 111 | -.2499847412 112 | -.3746089339 113 | -.4960937500 114 | -.6017169356 115 | -.6498870850 116 | -.5313910842 117 | 0.0000000000 118 | 0.0000000000 119 | -.1250066083 120 | -.2499914092 121 | -.3754310332 122 | -.4969158493 123 | -.6136010687 124 | -.6617712183 125 | -.6068061172 126 | -.0754150330 127 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-9_1.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | 0.0000000000 3 | -.6754094982 4 | -.6754094982 5 | 0.0000000000 6 | 0.0000000000 7 | -1.1662116720 8 | -1.1662116720 9 | 0.0000000000 10 | 0.0000000000 11 | -1.4882778260 12 | -1.4882778260 13 | 0.0000000000 14 | 0.0000000000 15 | -1.6480332440 16 | -1.6480332440 17 | 0.0000000000 18 | 0.0000000000 19 | -1.6480332440 20 | -1.6480332440 21 | 0.0000000000 22 | 0.0000000000 23 | -1.6480332440 24 | -1.4882778260 25 | 0.0000000000 26 | 0.0000000000 27 | -1.6480332440 28 | -1.1662116720 29 | 0.0000000000 30 | 0.0000000000 31 | -.6754094982 32 | -.6754094982 33 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-9_2.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.4980468750 3 | 0.0000000000 4 | -.4737484619 5 | -.9717953369 6 | 0.0000000000 7 | 0.0000000000 8 | -.9785156250 9 | 0.0000000000 10 | -.6445012353 11 | -1.6230168600 12 | -.0136535659 13 | 0.0000000000 14 | -1.3886718750 15 | 0.0000000000 16 | -.6445012353 17 | -1.9706424200 18 | -.0652765951 19 | 0.0000000000 20 | -1.6347656250 21 | 0.0000000000 22 | -.6445012353 23 | -2.0250674590 24 | -.1919752930 25 | 0.0000000000 26 | -1.6347656250 27 | 0.0000000000 28 | -.1919752940 29 | -2.0250674590 30 | -.3903018344 31 | 0.0000000000 32 | -1.3886718750 33 | 0.0000000000 34 | -.0652765941 35 | -1.9706424210 36 | -.5819705461 37 | 0.0000000000 38 | -.9785156250 39 | 0.0000000000 40 | -.0136535659 41 | -1.6230168600 42 | -.6445012353 43 | 0.0000000000 44 | -.4980468750 45 | 0.0000000000 46 | 0.0000000000 47 | -.9717953370 48 | -.4737484620 49 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-9_3.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6406543718 3 | -.3332825281 4 | 0.0000000000 5 | -.3346194816 6 | -.9752738534 7 | -.3333168423 8 | -.0000343148 9 | 0.0000000000 10 | -1.1642534170 11 | -.6656505614 12 | 0.0000000000 13 | -.3481200978 14 | -1.5123735150 15 | -.7331262413 16 | 0.0000000000 17 | 0.0000000000 18 | -1.4537418080 19 | -.9907026368 20 | 0.0000000000 21 | -.3481200978 22 | -1.6737861270 23 | -1.1610296450 24 | 0.0000000000 25 | 0.0000000000 26 | -1.4701011020 27 | -1.2816135750 28 | 0.0000000000 29 | -.0953638421 30 | -1.7296971490 31 | -1.5412096220 32 | -.0284322135 33 | 0.0000000000 34 | -1.2816135750 35 | -1.4701011020 36 | 0.0000000000 37 | -.0284322133 38 | -1.5412096220 39 | -1.7296971490 40 | -.0953638424 41 | 0.0000000000 42 | -.9907026368 43 | -1.4537418080 44 | 0.0000000000 45 | 0.0000000000 46 | -1.1610296450 47 | -1.6737861250 48 | -.2200443171 49 | 0.0000000000 50 | -.6656505614 51 | -1.1642534170 52 | 0.0000000000 53 | 0.0000000000 54 | -.7331262425 55 | -1.5123735140 56 | -.3481200974 57 | 0.0000000000 58 | -.3332825281 59 | -.6406543718 60 | 0.0000000000 61 | -.0000343145 62 | -.3333168424 63 | -.9752738533 64 | -.3346194815 65 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-9_4.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6749153137 3 | -.4980468750 4 | -.2499961853 5 | 0.0000000000 6 | -.2430616558 7 | -.9179769695 8 | -.4989721651 9 | -.2509214751 10 | 0.0000000000 11 | 0.0000000000 12 | -1.1245765690 13 | -.9785156250 14 | -.4998893738 15 | 0.0000000000 16 | -.2430616558 17 | -1.3247039010 18 | -1.0709993220 19 | -.4999606662 20 | -.0000712924 21 | 0.0000000000 22 | -1.2738990780 23 | -1.3886718750 24 | -.7485466003 25 | 0.0000000000 26 | -.0954781438 27 | -1.4286281850 28 | -1.5434009820 29 | -.7868337803 30 | 0.0000000000 31 | 0.0000000000 32 | -1.1896247860 33 | -1.6347656250 34 | -.9885520935 35 | 0.0000000000 36 | -.0301739699 37 | -1.3424297030 38 | -1.7875705420 39 | -1.0846206160 40 | 0.0000000000 41 | 0.0000000000 42 | -.9885520935 43 | -1.6347656250 44 | -1.1896247860 45 | 0.0000000000 46 | 0.0000000000 47 | -1.0846206150 48 | -1.7875705420 49 | -1.3424297030 50 | -.0301739702 51 | 0.0000000000 52 | -.7485466003 53 | -1.3886718750 54 | -1.2738990780 55 | 0.0000000000 56 | 0.0000000000 57 | -.7868337803 58 | -1.5434009830 59 | -1.4286281860 60 | -.0954781442 61 | 0.0000000000 62 | -.4998893738 63 | -.9785156250 64 | -1.1245765690 65 | 0.0000000000 66 | -.0000712922 67 | -.4999606662 68 | -1.0709993230 69 | -1.3247039010 70 | -.2001273315 71 | 0.0000000000 72 | -.2499961853 73 | -.4980468750 74 | -.6749153137 75 | 0.0000000000 76 | 0.0000000000 77 | -.2509214751 78 | -.4989721651 79 | -.9179769694 80 | -.2430616557 81 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-9_5.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6657822720 3 | -.5899223040 4 | -.3997378560 5 | -.1999994880 6 | 0.0000000000 7 | -.1825928521 8 | -.8483751241 9 | -.5932944974 10 | -.4031100494 11 | -.1999998338 12 | -.0000003458 13 | 0.0000000000 14 | -1.0295746560 15 | -1.1193784320 16 | -.7959367680 17 | -.3999805440 18 | 0.0000000000 19 | -.1825928521 20 | -1.1530622050 21 | -1.2091795070 22 | -.7976468111 23 | -.4016905869 24 | 0.0000000000 25 | 0.0000000000 26 | -1.0913771520 27 | -1.4875914240 28 | -1.1709020160 29 | -.5996666880 30 | 0.0000000000 31 | -.0470712537 32 | -1.2027098460 33 | -1.5989241180 34 | -1.2308838100 35 | -.5998699034 36 | -.0002032148 37 | 0.0000000000 38 | -.9770188800 39 | -1.6049817600 40 | -1.4715494400 41 | -.7966003200 42 | 0.0000000000 43 | 0.0000000000 44 | -1.0575602080 45 | -1.7015833550 46 | -1.5681510350 47 | -.8332212330 48 | 0.0000000000 49 | 0.0000000000 50 | -.7966003200 51 | -1.4715494400 52 | -1.6049817600 53 | -.9770188800 54 | 0.0000000000 55 | 0.0000000000 56 | -.8332212330 57 | -1.5681510350 58 | -1.7015833550 59 | -1.0575602080 60 | 0.0000000000 61 | 0.0000000000 62 | -.5996666880 63 | -1.1709020160 64 | -1.4875914240 65 | -1.0913771520 66 | 0.0000000000 67 | -.0002032150 68 | -.5998699034 69 | -1.2308838100 70 | -1.5989241180 71 | -1.2027098460 72 | -.0470712536 73 | 0.0000000000 74 | -.3999805440 75 | -.7959367680 76 | -1.1193784320 77 | -1.0295746560 78 | 0.0000000000 79 | 0.0000000000 80 | -.4016905869 81 | -.7976468111 82 | -1.2091795060 83 | -1.1530622050 84 | -.1234875493 85 | 0.0000000000 86 | -.1999994880 87 | -.3997378560 88 | -.5899223040 89 | -.6657822720 90 | 0.0000000000 91 | -.0000003462 92 | -.1999998337 93 | -.4031100494 94 | -.5932944974 95 | -.8483751240 96 | -.1825928520 97 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-9_6.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6395266339 3 | -.6406543718 4 | -.4980468750 5 | -.3332825281 6 | -.1666665674 7 | 0.0000000000 8 | -.1414505050 9 | -.7809771389 10 | -.6469769634 11 | -.5043694663 12 | -.3333065969 13 | -.1666906365 14 | 0.0000000000 15 | 0.0000000000 16 | -.9302012087 17 | -1.1642534170 18 | -.9785156250 19 | -.6656505614 20 | -.3333286696 21 | 0.0000000000 22 | -.1414505050 23 | -1.0111284100 24 | -1.2418269350 25 | -.9844022438 26 | -.6715371796 27 | -.3333316852 28 | -.0000030155 29 | 0.0000000000 30 | -.9417941363 31 | -1.4537418080 32 | -1.3886718750 33 | -.9907026368 34 | -.4999014656 35 | 0.0000000000 36 | -.0256364817 37 | -1.0179528520 38 | -1.5299005240 39 | -1.4499626650 40 | -.9941066270 41 | -.5033054560 42 | 0.0000000000 43 | 0.0000000000 44 | -.8231489618 45 | -1.4701011020 46 | -1.6347656250 47 | -1.2816135750 48 | -.6654323568 49 | 0.0000000000 50 | 0.0000000000 51 | -.8664972468 52 | -1.5421829770 53 | -1.7068475000 54 | -1.3337921440 55 | -.6661336222 56 | -.0007012647 57 | 0.0000000000 58 | -.6654323568 59 | -1.2816135750 60 | -1.6347656250 61 | -1.4701011020 62 | -.8231489618 63 | 0.0000000000 64 | -.0007012651 65 | -.6661336221 66 | -1.3337921440 67 | -1.7068475000 68 | -1.5421829770 69 | -.8664972468 70 | 0.0000000000 71 | 0.0000000000 72 | -.4999014656 73 | -.9907026368 74 | -1.3886718750 75 | -1.4537418080 76 | -.9417941363 77 | 0.0000000000 78 | 0.0000000000 79 | -.5033054555 80 | -.9941066272 81 | -1.4499626650 82 | -1.5299005240 83 | -1.0179528520 84 | -.0256364819 85 | 0.0000000000 86 | -.3333286696 87 | -.6656505614 88 | -.9785156250 89 | -1.1642534170 90 | -.9302012087 91 | 0.0000000000 92 | -.0000030159 93 | -.3333316851 94 | -.6715371801 95 | -.9844022436 96 | -1.2418269330 97 | -1.0111284110 98 | -.0809272018 99 | 0.0000000000 100 | -.1666665674 101 | -.3332825281 102 | -.4980468750 103 | -.6406543718 104 | -.6395266339 105 | 0.0000000000 106 | 0.0000000000 107 | -.1666906361 108 | -.3333065971 109 | -.5043694663 110 | -.6469769634 111 | -.7809771389 112 | -.1414505050 113 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/range/unirange-9_7.asc: -------------------------------------------------------------------------------- 1 | 0.0000000000 2 | -.6074081556 3 | -.6658854560 4 | -.5649323987 5 | -.4280836655 6 | -.2857015979 7 | -.1428571181 8 | 0.0000000000 9 | -.1124889360 10 | -.7198970916 11 | -.6747229971 12 | -.5737699401 13 | -.4282468805 14 | -.2858648129 15 | -.1428571348 16 | -.0000000168 17 | 0.0000000000 18 | -.8402142589 19 | -1.1575299820 20 | -1.0860156320 21 | -.8503141739 22 | -.5711177194 23 | -.2857128980 24 | 0.0000000000 25 | -.0556896788 26 | -.9044693713 27 | -1.2217850940 28 | -1.0965065090 29 | -.8608050500 30 | -.5712503748 31 | -.2858455534 32 | 0.0000000000 33 | 0.0000000000 34 | -.8232856607 35 | -1.3703890210 36 | -1.4755513680 37 | -1.2413278450 38 | -.8536790776 39 | -.4285365618 40 | 0.0000000000 41 | 0.0000000000 42 | -.8754378617 43 | -1.4239111610 44 | -1.5290735080 45 | -1.2530590670 46 | -.8610556310 47 | -.4285579313 48 | -.0000213690 49 | 0.0000000000 50 | -.7092380119 51 | -1.3230482720 52 | -1.6348789840 53 | -1.5352224650 54 | -1.1195876490 55 | -.5709106004 56 | 0.0000000000 57 | 0.0000000000 58 | -.7146779181 59 | -1.3724979490 60 | -1.6846212990 61 | -1.5849647800 62 | -1.1299831280 63 | -.5744665004 64 | 0.0000000000 65 | 0.0000000000 66 | -.5709106004 67 | -1.1195876490 68 | -1.5352224650 69 | -1.6348789840 70 | -1.3230482720 71 | -.7092380119 72 | 0.0000000000 73 | 0.0000000000 74 | -.5744665004 75 | -1.1299831280 76 | -1.5849647800 77 | -1.6846212990 78 | -1.3724979480 79 | -.7146779187 80 | 0.0000000000 81 | 0.0000000000 82 | -.4285365618 83 | -.8536790776 84 | -1.2413278450 85 | -1.4755513680 86 | -1.3703890210 87 | -.8232856607 88 | 0.0000000000 89 | -.0000213695 90 | -.4285579312 91 | -.8610556306 92 | -1.2530590670 93 | -1.5290735090 94 | -1.4239111620 95 | -.8754378607 96 | 0.0000000000 97 | 0.0000000000 98 | -.2857128980 99 | -.5711177194 100 | -.8503141739 101 | -1.0860156320 102 | -1.1575299820 103 | -.8402142589 104 | 0.0000000000 105 | 0.0000000000 106 | -.2858455527 107 | -.5712503750 108 | -.8608050499 109 | -1.0965065090 110 | -1.2217850940 111 | -.9044693705 112 | -.0556896787 113 | 0.0000000000 114 | -.1428571181 115 | -.2857015979 116 | -.4280836655 117 | -.5649323987 118 | -.6658854560 119 | -.6074081556 120 | 0.0000000000 121 | -.0000000165 122 | -.1428571349 123 | -.2858648129 124 | -.4282468805 125 | -.5737699401 126 | -.6747229971 127 | -.7198970918 128 | -.1124889362 129 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/tpSlefe.c: -------------------------------------------------------------------------------- 1 | /* ====================================================================== 2 | * File : tpSlefe.c 3 | * Purpose : To compute the upper/lower bounds for any given 4 | * tensor-product bi-variate function 5 | * 6 | * Author(s): Xiaobin Wu (xwu@cise.ufl.edu) 7 | * Date : 03/04/2003 8 | * ====================================================================== 9 | */ 10 | 11 | #include 12 | #include 13 | #include "type.h" 14 | #include "SubLiME.h" 15 | 16 | REAL ubuffer[(MAXDEG+1)*(MAXPCS+1)]; 17 | REAL lbuffer[(MAXDEG+1)*(MAXPCS+1)]; 18 | 19 | /* -------------------------------------------------------- 20 | * compute the slefe for a tensor-product bi-variate function 21 | * 22 | * Input: 23 | * coeff: Bezier coefficient array 24 | * strideu: 25 | * stridev: strides between two coefficients in the input arrays 26 | * degu, degv: degrees of the Bezier function 27 | * pcsu, pcsv: number of linear pieces in the slefe 28 | * stride_slefeu: 29 | * stride_slefev: stride: between two results in the output arrays 30 | * 31 | * Output: 32 | * upper: the upper slefe for the function 33 | * lower: the lower slefe for the function 34 | */ 35 | int tpSlefe ( REAL *coeff, int strideu, int stridev, 36 | int degu, int degv, int pcsu, int pcsv, 37 | REAL* upper, REAL* lower, 38 | int stride_slefeu, int stride_slefev) 39 | { 40 | int i; 41 | 42 | // The enclosure is computed by tensoring two uni-variate bounds. 43 | // We divide the process into two steps, 44 | // first, v direction. then, u direction 45 | 46 | // step 1. compute bounds for each row of the control points 47 | // bounds needed for degree = degv 48 | // 49 | for(i=0;i<=degu;i++) { 50 | uniSlefe(&coeff[i*strideu], stridev, degv, pcsv, 51 | &ubuffer[i*(MAXPCS+1)], &lbuffer[i*(MAXPCS+1)], 1); 52 | } 53 | // step 2. compute the bounds for the result from step 1, 54 | // but for each column, use bound for degree = dg1 55 | for(i=0;i<=pcsv;i++) { 56 | uniSlefe(&ubuffer[i], (MAXPCS+1), degu, pcsu, 57 | &upper[i*stride_slefev], NULL, stride_slefeu); 58 | uniSlefe(&lbuffer[i], (MAXPCS+1), degu, pcsu, 59 | NULL, &lower[i*stride_slefev], stride_slefeu); 60 | } 61 | 62 | return 0; // success 63 | } 64 | -------------------------------------------------------------------------------- /src/utils/slefes/thirdparty/SubLiME/type.h: -------------------------------------------------------------------------------- 1 | #ifndef TYPE_H_2002_11_2 2 | #define TYPE_H_2002_11_2 3 | 4 | #ifndef MAXDEG 5 | #define MAXDEG 20 /* maximum degree for the input patch */ 6 | #endif 7 | #define MAXPCS 20 /* maximum number of pieces for the resulting bounds */ 8 | 9 | #ifndef REAL 10 | #define REAL double /* floating point data type */ 11 | #endif 12 | 13 | #ifndef max 14 | #define max(x, y) ((x>y)?x:y) 15 | #define min(x, y) ((x