@automovie/engine 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/IAutoMovieFormationPlacement.d.ts +4 -3
- package/lib/anthropometry/AutoMovieHandAnthropometry.d.ts +47 -0
- package/lib/anthropometry/AutoMovieHandAnthropometry.js +53 -0
- package/lib/anthropometry/AutoMovieHandAnthropometry.js.map +1 -0
- package/lib/anthropometry/index.d.ts +1 -0
- package/lib/anthropometry/index.js +18 -0
- package/lib/anthropometry/index.js.map +1 -0
- package/lib/composition/AutoMovieComposition.d.ts +25 -6
- package/lib/composition/AutoMovieComposition.js +4 -3
- package/lib/composition/AutoMovieComposition.js.map +1 -1
- package/lib/composition/AutoMovieScheduleCut.d.ts +53 -0
- package/lib/composition/AutoMovieScheduleCut.js +99 -0
- package/lib/composition/AutoMovieScheduleCut.js.map +1 -0
- package/lib/composition/AutoMovieScheduleError.d.ts +79 -0
- package/lib/composition/AutoMovieScheduleError.js +51 -0
- package/lib/composition/AutoMovieScheduleError.js.map +1 -0
- package/lib/composition/AutoMovieSchedulePlace.d.ts +56 -0
- package/lib/composition/AutoMovieSchedulePlace.js +185 -0
- package/lib/composition/AutoMovieSchedulePlace.js.map +1 -0
- package/lib/composition/AutoMovieScheduleWalk.d.ts +121 -0
- package/lib/composition/AutoMovieScheduleWalk.js +161 -0
- package/lib/composition/AutoMovieScheduleWalk.js.map +1 -0
- package/lib/composition/IAutoMovieIntent.d.ts +9 -6
- package/lib/composition/index.d.ts +5 -0
- package/lib/composition/index.js +5 -0
- package/lib/composition/index.js.map +1 -1
- package/lib/composition/markAutoMovieContacts.d.ts +29 -0
- package/lib/composition/markAutoMovieContacts.js +69 -0
- package/lib/composition/markAutoMovieContacts.js.map +1 -0
- package/lib/composition/resolveAutoMovieContactEvents.d.ts +56 -7
- package/lib/composition/resolveAutoMovieContactEvents.js +89 -18
- package/lib/composition/resolveAutoMovieContactEvents.js.map +1 -1
- package/lib/composition/resolveAutoMovieMutualGoal.d.ts +45 -29
- package/lib/composition/resolveAutoMovieMutualGoal.js +123 -60
- package/lib/composition/resolveAutoMovieMutualGoal.js.map +1 -1
- package/lib/composition/resolveAutoMovieSchedule.d.ts +69 -11
- package/lib/composition/resolveAutoMovieSchedule.js +32 -103
- package/lib/composition/resolveAutoMovieSchedule.js.map +1 -1
- package/lib/createAutoMovieGeometryActorReader.js +2 -1
- package/lib/createAutoMovieGeometryActorReader.js.map +1 -1
- package/lib/describeAutoMovieInstanceSetSubject.js +2 -5
- package/lib/describeAutoMovieInstanceSetSubject.js.map +1 -1
- package/lib/film/compileAttach.js +2 -5
- package/lib/film/compileAttach.js.map +1 -1
- package/lib/film/compileLaunch.d.ts +2 -2
- package/lib/film/compileLaunch.js +4 -3
- package/lib/film/compileLaunch.js.map +1 -1
- package/lib/film/propAnchorFrame.js +6 -9
- package/lib/film/propAnchorFrame.js.map +1 -1
- package/lib/film/stageScene.js +3 -10
- package/lib/film/stageScene.js.map +1 -1
- package/lib/film/staging/lowerLightPlacement.js +4 -7
- package/lib/film/staging/lowerLightPlacement.js.map +1 -1
- package/lib/formationSlotPosition.d.ts +6 -1
- package/lib/formationSlotPosition.js +38 -3
- package/lib/formationSlotPosition.js.map +1 -1
- package/lib/geometry/IAutoMovieMark.d.ts +99 -0
- package/lib/geometry/IAutoMovieMark.js +3 -0
- package/lib/geometry/IAutoMovieMark.js.map +1 -0
- package/lib/geometry/IAutoMovieMeshDefect.d.ts +33 -0
- package/lib/geometry/IAutoMovieMeshDefect.js +3 -0
- package/lib/geometry/IAutoMovieMeshDefect.js.map +1 -0
- package/lib/geometry/construction/AutoMovieConstructionAdmission.js +72 -10
- package/lib/geometry/construction/AutoMovieConstructionAdmission.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionBridgeRealize.d.ts +35 -0
- package/lib/geometry/construction/AutoMovieConstructionBridgeRealize.js +155 -0
- package/lib/geometry/construction/AutoMovieConstructionBridgeRealize.js.map +1 -0
- package/lib/geometry/construction/AutoMovieConstructionContinuationRealize.js +4 -0
- package/lib/geometry/construction/AutoMovieConstructionContinuationRealize.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionPortRealize.d.ts +1 -1
- package/lib/geometry/construction/AutoMovieConstructionPortRealize.js +38 -14
- package/lib/geometry/construction/AutoMovieConstructionPortRealize.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionSeeds.d.ts +6 -6
- package/lib/geometry/construction/AutoMovieConstructionSeeds.js +34 -11
- package/lib/geometry/construction/AutoMovieConstructionSeeds.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionSplitBand.d.ts +107 -2
- package/lib/geometry/construction/AutoMovieConstructionSplitBand.js +452 -16
- package/lib/geometry/construction/AutoMovieConstructionSplitBand.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionSplitRealize.js +262 -0
- package/lib/geometry/construction/AutoMovieConstructionSplitRealize.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionSplitSeam.d.ts +28 -2
- package/lib/geometry/construction/AutoMovieConstructionSplitSeam.js +51 -12
- package/lib/geometry/construction/AutoMovieConstructionSplitSeam.js.map +1 -1
- package/lib/geometry/construction/AutoMovieConstructionState.d.ts +11 -0
- package/lib/geometry/construction/AutoMovieConstructionState.js +5 -0
- package/lib/geometry/construction/AutoMovieConstructionState.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftCapRead.js +3 -2
- package/lib/geometry/construction/AutoMovieLoftCapRead.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftCapSource.js +21 -1
- package/lib/geometry/construction/AutoMovieLoftCapSource.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftJet.js +7 -5
- package/lib/geometry/construction/AutoMovieLoftJet.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftPoint.js +7 -4
- package/lib/geometry/construction/AutoMovieLoftPoint.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftRelief.d.ts +25 -0
- package/lib/geometry/construction/AutoMovieLoftRelief.js +37 -0
- package/lib/geometry/construction/AutoMovieLoftRelief.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftViewRead.js +29 -7
- package/lib/geometry/construction/AutoMovieLoftViewRead.js.map +1 -1
- package/lib/geometry/construction/AutoMovieLoftViewSource.js +4 -2
- package/lib/geometry/construction/AutoMovieLoftViewSource.js.map +1 -1
- package/lib/geometry/construction/AutoMovieNaturalSpline.d.ts +20 -0
- package/lib/geometry/construction/AutoMovieNaturalSpline.js +37 -0
- package/lib/geometry/construction/AutoMovieNaturalSpline.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidBlendChain.d.ts +9 -1
- package/lib/geometry/construction/AutoMovieSolidBlendChain.js +13 -8
- package/lib/geometry/construction/AutoMovieSolidBlendChain.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidBodyMerge.js +2 -0
- package/lib/geometry/construction/AutoMovieSolidBodyMerge.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidClip.d.ts +15 -1
- package/lib/geometry/construction/AutoMovieSolidClip.js +306 -38
- package/lib/geometry/construction/AutoMovieSolidClip.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidCycle.d.ts +20 -5
- package/lib/geometry/construction/AutoMovieSolidCycle.js +68 -16
- package/lib/geometry/construction/AutoMovieSolidCycle.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidIntersectionWalk.js +89 -41
- package/lib/geometry/construction/AutoMovieSolidIntersectionWalk.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidJoin.d.ts +13 -0
- package/lib/geometry/construction/AutoMovieSolidJoin.js +23 -2
- package/lib/geometry/construction/AutoMovieSolidJoin.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidMeshConstraints.d.ts +1 -1
- package/lib/geometry/construction/AutoMovieSolidMeshConstraints.js +28 -3
- package/lib/geometry/construction/AutoMovieSolidMeshConstraints.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidMeshLoop.d.ts +4 -4
- package/lib/geometry/construction/AutoMovieSolidMeshLoop.js +42 -4
- package/lib/geometry/construction/AutoMovieSolidMeshLoop.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidMeshPlan.d.ts +2 -1
- package/lib/geometry/construction/AutoMovieSolidMeshPlan.js +57 -25
- package/lib/geometry/construction/AutoMovieSolidMeshPlan.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidRail.d.ts +40 -0
- package/lib/geometry/construction/AutoMovieSolidRail.js +101 -31
- package/lib/geometry/construction/AutoMovieSolidRail.js.map +1 -1
- package/lib/geometry/construction/AutoMovieSolidRailSolve.d.ts +7 -3
- package/lib/geometry/construction/AutoMovieSolidRailSolve.js +115 -18
- package/lib/geometry/construction/AutoMovieSolidRailSolve.js.map +1 -1
- package/lib/geometry/construction/AutoMovieViewLoft.js +9 -0
- package/lib/geometry/construction/AutoMovieViewLoft.js.map +1 -1
- package/lib/geometry/construction/IAutoMovieConstructionCurve.d.ts +37 -0
- package/lib/geometry/construction/IAutoMovieConstructionCurve.js +3 -0
- package/lib/geometry/construction/IAutoMovieConstructionCurve.js.map +1 -0
- package/lib/geometry/construction/IAutoMovieLoftChain.d.ts +6 -0
- package/lib/geometry/construction/IAutoMovieLoftRelief.d.ts +10 -0
- package/lib/geometry/construction/IAutoMovieViewPart.d.ts +9 -1
- package/lib/geometry/construction/faceAutoMovieSolidMesh.d.ts +3 -3
- package/lib/geometry/construction/faceAutoMovieSolidMesh.js +65 -16
- package/lib/geometry/construction/faceAutoMovieSolidMesh.js.map +1 -1
- package/lib/geometry/construction/fairAutoMovieSolidMesh.d.ts +45 -0
- package/lib/geometry/construction/fairAutoMovieSolidMesh.js +270 -0
- package/lib/geometry/construction/fairAutoMovieSolidMesh.js.map +1 -0
- package/lib/geometry/construction/gridAutoMovieSolidMesh.d.ts +18 -1
- package/lib/geometry/construction/gridAutoMovieSolidMesh.js +139 -7
- package/lib/geometry/construction/gridAutoMovieSolidMesh.js.map +1 -1
- package/lib/geometry/construction/index.d.ts +5 -0
- package/lib/geometry/construction/index.js +5 -0
- package/lib/geometry/construction/index.js.map +1 -1
- package/lib/geometry/construction/legalizeAutoMovieSolidMesh.d.ts +14 -1
- package/lib/geometry/construction/legalizeAutoMovieSolidMesh.js +26 -4
- package/lib/geometry/construction/legalizeAutoMovieSolidMesh.js.map +1 -1
- package/lib/geometry/construction/markAutoMovieConstructionCurves.d.ts +33 -0
- package/lib/geometry/construction/markAutoMovieConstructionCurves.js +51 -0
- package/lib/geometry/construction/markAutoMovieConstructionCurves.js.map +1 -0
- package/lib/geometry/construction/orientAutoMovieSolidChart.d.ts +1 -1
- package/lib/geometry/construction/orientAutoMovieSolidChart.js +28 -4
- package/lib/geometry/construction/orientAutoMovieSolidChart.js.map +1 -1
- package/lib/geometry/construction/probeAutoMovieSolidMesh.d.ts +11 -5
- package/lib/geometry/construction/probeAutoMovieSolidMesh.js +41 -28
- package/lib/geometry/construction/probeAutoMovieSolidMesh.js.map +1 -1
- package/lib/geometry/construction/realizeAutoMovieConstruction.js +45 -1
- package/lib/geometry/construction/realizeAutoMovieConstruction.js.map +1 -1
- package/lib/geometry/construction/sampleAutoMovieConstructionCurves.d.ts +31 -0
- package/lib/geometry/construction/sampleAutoMovieConstructionCurves.js +234 -0
- package/lib/geometry/construction/sampleAutoMovieConstructionCurves.js.map +1 -0
- package/lib/geometry/index.d.ts +4 -0
- package/lib/geometry/index.js +4 -0
- package/lib/geometry/index.js.map +1 -1
- package/lib/geometry/markAutoMovieMeshClearance.d.ts +32 -0
- package/lib/geometry/markAutoMovieMeshClearance.js +53 -0
- package/lib/geometry/markAutoMovieMeshClearance.js.map +1 -0
- package/lib/geometry/measureAutoMovieMeshDefects.d.ts +31 -0
- package/lib/geometry/measureAutoMovieMeshDefects.js +244 -0
- package/lib/geometry/measureAutoMovieMeshDefects.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/kinematics/AutoMovieHumanoidDigitSurfaces.d.ts +36 -0
- package/lib/kinematics/AutoMovieHumanoidDigitSurfaces.js +67 -0
- package/lib/kinematics/AutoMovieHumanoidDigitSurfaces.js.map +1 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceExtents.d.ts +28 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceExtents.js +52 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceExtents.js.map +1 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRays.d.ts +55 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRays.js +191 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRays.js.map +1 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRegions.d.ts +49 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRegions.js +147 -0
- package/lib/kinematics/AutoMovieHumanoidSurfaceRegions.js.map +1 -0
- package/lib/kinematics/IAutoMovieHingedArticulation.d.ts +17 -3
- package/lib/kinematics/IAutoMoviePoseRig.d.ts +31 -0
- package/lib/kinematics/IAutoMoviePoseRig.js +3 -0
- package/lib/kinematics/IAutoMoviePoseRig.js.map +1 -0
- package/lib/kinematics/IAutoMovieSwivelNear.d.ts +25 -0
- package/lib/kinematics/IAutoMovieSwivelNear.js +3 -0
- package/lib/kinematics/IAutoMovieSwivelNear.js.map +1 -0
- package/lib/kinematics/IAutoMovieSwivelSeed.d.ts +18 -0
- package/lib/kinematics/IAutoMovieSwivelSeed.js +3 -0
- package/lib/kinematics/IAutoMovieSwivelSeed.js.map +1 -0
- package/lib/kinematics/alternateRigJointAngles.d.ts +27 -0
- package/lib/kinematics/alternateRigJointAngles.js +34 -0
- package/lib/kinematics/alternateRigJointAngles.js.map +1 -0
- package/lib/kinematics/boxExcludedSwivels.d.ts +64 -0
- package/lib/kinematics/boxExcludedSwivels.js +187 -0
- package/lib/kinematics/boxExcludedSwivels.js.map +1 -0
- package/lib/kinematics/constants/HUMANOID_JOINT_AXES.d.ts +16 -2
- package/lib/kinematics/constants/HUMANOID_JOINT_AXES.js +19 -4
- package/lib/kinematics/constants/HUMANOID_JOINT_AXES.js.map +1 -1
- package/lib/kinematics/curlChainUntilContact.d.ts +16 -0
- package/lib/kinematics/curlChainUntilContact.js +45 -5
- package/lib/kinematics/curlChainUntilContact.js.map +1 -1
- package/lib/kinematics/decomposeJointRotation.d.ts +5 -2
- package/lib/kinematics/decomposeJointRotation.js +10 -131
- package/lib/kinematics/decomposeJointRotation.js.map +1 -1
- package/lib/kinematics/decomposeJointRotationOnBasis.d.ts +36 -0
- package/lib/kinematics/decomposeJointRotationOnBasis.js +228 -0
- package/lib/kinematics/decomposeJointRotationOnBasis.js.map +1 -0
- package/lib/kinematics/fitDigitDescent.d.ts +66 -0
- package/lib/kinematics/fitDigitDescent.js +142 -0
- package/lib/kinematics/fitDigitDescent.js.map +1 -0
- package/lib/kinematics/fitDigitToTarget.d.ts +125 -0
- package/lib/kinematics/fitDigitToTarget.js +251 -0
- package/lib/kinematics/fitDigitToTarget.js.map +1 -0
- package/lib/kinematics/hingedArmArticulation.d.ts +55 -7
- package/lib/kinematics/hingedArmArticulation.js +273 -84
- package/lib/kinematics/hingedArmArticulation.js.map +1 -1
- package/lib/kinematics/hingedArmSwivel.d.ts +141 -0
- package/lib/kinematics/hingedArmSwivel.js +196 -0
- package/lib/kinematics/hingedArmSwivel.js.map +1 -0
- package/lib/kinematics/index.d.ts +24 -0
- package/lib/kinematics/index.js +24 -0
- package/lib/kinematics/index.js.map +1 -1
- package/lib/kinematics/jointRomOvershoot.d.ts +13 -9
- package/lib/kinematics/jointRomOvershoot.js +21 -17
- package/lib/kinematics/jointRomOvershoot.js.map +1 -1
- package/lib/kinematics/jointToQuaternion.d.ts +2 -2
- package/lib/kinematics/jointToQuaternion.js +4 -19
- package/lib/kinematics/jointToQuaternion.js.map +1 -1
- package/lib/kinematics/jointToQuaternionOnBasis.d.ts +34 -0
- package/lib/kinematics/jointToQuaternionOnBasis.js +50 -0
- package/lib/kinematics/jointToQuaternionOnBasis.js.map +1 -0
- package/lib/kinematics/markAutoMovieBalance.d.ts +32 -0
- package/lib/kinematics/markAutoMovieBalance.js +65 -0
- package/lib/kinematics/markAutoMovieBalance.js.map +1 -0
- package/lib/kinematics/markAutoMovieRomOvershoot.d.ts +25 -0
- package/lib/kinematics/markAutoMovieRomOvershoot.js +43 -0
- package/lib/kinematics/markAutoMovieRomOvershoot.js.map +1 -0
- package/lib/kinematics/measureAutoMovieHumanoidBody.js +16 -5
- package/lib/kinematics/measureAutoMovieHumanoidBody.js.map +1 -1
- package/lib/kinematics/normalizeJointAxes.d.ts +15 -7
- package/lib/kinematics/normalizeJointAxes.js +52 -12
- package/lib/kinematics/normalizeJointAxes.js.map +1 -1
- package/lib/kinematics/poseJointCodec.d.ts +71 -0
- package/lib/kinematics/poseJointCodec.js +70 -0
- package/lib/kinematics/poseJointCodec.js.map +1 -0
- package/lib/kinematics/resolveAutoMovieBalanceOutcome.d.ts +112 -0
- package/lib/kinematics/resolveAutoMovieBalanceOutcome.js +168 -0
- package/lib/kinematics/resolveAutoMovieBalanceOutcome.js.map +1 -0
- package/lib/kinematics/resolveAutoMovieCenterOfMass.d.ts +29 -4
- package/lib/kinematics/resolveAutoMovieCenterOfMass.js +42 -8
- package/lib/kinematics/resolveAutoMovieCenterOfMass.js.map +1 -1
- package/lib/kinematics/resolveAutoMovieHumanoidRingModules.d.ts +75 -0
- package/lib/kinematics/resolveAutoMovieHumanoidRingModules.js +228 -0
- package/lib/kinematics/resolveAutoMovieHumanoidRingModules.js.map +1 -0
- package/lib/kinematics/resolveAutoMovieHumanoidSurfaces.d.ts +90 -10
- package/lib/kinematics/resolveAutoMovieHumanoidSurfaces.js +183 -258
- package/lib/kinematics/resolveAutoMovieHumanoidSurfaces.js.map +1 -1
- package/lib/kinematics/resolveAutoMovieMomentum.d.ts +112 -0
- package/lib/kinematics/resolveAutoMovieMomentum.js +153 -0
- package/lib/kinematics/resolveAutoMovieMomentum.js.map +1 -0
- package/lib/kinematics/swingTwistBasis.d.ts +108 -0
- package/lib/kinematics/swingTwistBasis.js +116 -0
- package/lib/kinematics/swingTwistBasis.js.map +1 -0
- package/lib/kinematics/swingTwistExcludedSwivels.d.ts +65 -0
- package/lib/kinematics/swingTwistExcludedSwivels.js +138 -0
- package/lib/kinematics/swingTwistExcludedSwivels.js.map +1 -0
- package/lib/kinematics/swingTwistRange.d.ts +246 -0
- package/lib/kinematics/swingTwistRange.js +322 -0
- package/lib/kinematics/swingTwistRange.js.map +1 -0
- package/lib/kinematics/swingTwistRegion.d.ts +50 -0
- package/lib/kinematics/swingTwistRegion.js +212 -0
- package/lib/kinematics/swingTwistRegion.js.map +1 -0
- package/lib/kinematics/swivelArcs.d.ts +166 -0
- package/lib/kinematics/swivelArcs.js +200 -0
- package/lib/kinematics/swivelArcs.js.map +1 -0
- package/lib/math/Quaternion.d.ts +29 -2
- package/lib/math/Quaternion.js +33 -2
- package/lib/math/Quaternion.js.map +1 -1
- package/lib/math/Transform.d.ts +50 -0
- package/lib/math/Transform.js +58 -0
- package/lib/math/Transform.js.map +1 -0
- package/lib/math/assignAutoMovieMinimumCost.d.ts +18 -0
- package/lib/math/assignAutoMovieMinimumCost.js +86 -0
- package/lib/math/assignAutoMovieMinimumCost.js.map +1 -0
- package/lib/math/bracketedBisection.d.ts +33 -0
- package/lib/math/bracketedBisection.js +52 -0
- package/lib/math/bracketedBisection.js.map +1 -0
- package/lib/math/bracketedRoot.d.ts +32 -0
- package/lib/math/bracketedRoot.js +76 -0
- package/lib/math/bracketedRoot.js.map +1 -0
- package/lib/math/index.d.ts +7 -0
- package/lib/math/index.js +7 -0
- package/lib/math/index.js.map +1 -1
- package/lib/math/nearestAngleAlias.d.ts +27 -0
- package/lib/math/nearestAngleAlias.js +44 -0
- package/lib/math/nearestAngleAlias.js.map +1 -0
- package/lib/math/solveAutoMovieHalfPlaneProgram.d.ts +68 -0
- package/lib/math/solveAutoMovieHalfPlaneProgram.js +199 -0
- package/lib/math/solveAutoMovieHalfPlaneProgram.js.map +1 -0
- package/lib/math/tetrahedralizeAutoMovieDelaunay.d.ts +82 -0
- package/lib/math/tetrahedralizeAutoMovieDelaunay.js +187 -0
- package/lib/math/tetrahedralizeAutoMovieDelaunay.js.map +1 -0
- package/lib/measureAutoMovieGeometryReach.js +2 -4
- package/lib/measureAutoMovieGeometryReach.js.map +1 -1
- package/lib/motion/AirborneTakeoffLinear.d.ts +22 -0
- package/lib/motion/AirborneTakeoffLinear.js +58 -0
- package/lib/motion/AirborneTakeoffLinear.js.map +1 -0
- package/lib/motion/IAutoMovieCrowdAgent.d.ts +113 -0
- package/lib/motion/IAutoMovieCrowdAgent.js +3 -0
- package/lib/motion/IAutoMovieCrowdAgent.js.map +1 -0
- package/lib/motion/IAutoMovieSeededChainFit.d.ts +32 -0
- package/lib/motion/IAutoMovieSeededChainFit.js +3 -0
- package/lib/motion/IAutoMovieSeededChainFit.js.map +1 -0
- package/lib/motion/IAutoMovieSolvedChainPlant.d.ts +20 -0
- package/lib/motion/IFitChainToTargetProps.d.ts +59 -0
- package/lib/motion/MotionTrajectoryStepper.d.ts +100 -0
- package/lib/motion/MotionTrajectoryStepper.js +357 -0
- package/lib/motion/MotionTrajectoryStepper.js.map +1 -0
- package/lib/motion/basisOf.d.ts +18 -0
- package/lib/motion/basisOf.js +25 -0
- package/lib/motion/basisOf.js.map +1 -0
- package/lib/motion/carriedAcceleration.d.ts +43 -0
- package/lib/motion/carriedAcceleration.js +55 -0
- package/lib/motion/carriedAcceleration.js.map +1 -0
- package/lib/motion/carriedRate.d.ts +48 -0
- package/lib/motion/carriedRate.js +60 -0
- package/lib/motion/carriedRate.js.map +1 -0
- package/lib/motion/constants/PLANT_RESIDUAL_EPSILON.d.ts +10 -0
- package/lib/motion/constants/PLANT_RESIDUAL_EPSILON.js +14 -0
- package/lib/motion/constants/PLANT_RESIDUAL_EPSILON.js.map +1 -0
- package/lib/motion/constants/index.d.ts +1 -0
- package/lib/motion/constants/index.js +1 -0
- package/lib/motion/constants/index.js.map +1 -1
- package/lib/motion/fitChainBend.d.ts +23 -0
- package/lib/motion/fitChainBend.js +293 -0
- package/lib/motion/fitChainBend.js.map +1 -0
- package/lib/motion/fitChainToTarget.d.ts +11 -13
- package/lib/motion/fitChainToTarget.js +12 -283
- package/lib/motion/fitChainToTarget.js.map +1 -1
- package/lib/motion/fitHingedChainCandidate.d.ts +16 -4
- package/lib/motion/fitHingedChainCandidate.js +186 -76
- package/lib/motion/fitHingedChainCandidate.js.map +1 -1
- package/lib/motion/fitHingedRotationError.d.ts +31 -0
- package/lib/motion/fitHingedRotationError.js +107 -0
- package/lib/motion/fitHingedRotationError.js.map +1 -0
- package/lib/motion/fitSeededChainToTarget.d.ts +20 -0
- package/lib/motion/fitSeededChainToTarget.js +32 -0
- package/lib/motion/fitSeededChainToTarget.js.map +1 -0
- package/lib/motion/gaitMotion.js +7 -13
- package/lib/motion/gaitMotion.js.map +1 -1
- package/lib/motion/gestureMotion.js +2 -5
- package/lib/motion/gestureMotion.js.map +1 -1
- package/lib/motion/importedNodeClipToAutoMovieMotion.js +6 -9
- package/lib/motion/importedNodeClipToAutoMovieMotion.js.map +1 -1
- package/lib/motion/index.d.ts +15 -0
- package/lib/motion/index.js +15 -0
- package/lib/motion/index.js.map +1 -1
- package/lib/motion/inertializeOffset.d.ts +15 -2
- package/lib/motion/inertializeOffset.js +16 -3
- package/lib/motion/inertializeOffset.js.map +1 -1
- package/lib/motion/inertializePose.d.ts +36 -13
- package/lib/motion/inertializePose.js +122 -43
- package/lib/motion/inertializePose.js.map +1 -1
- package/lib/motion/integrateAirborneRotation.d.ts +151 -0
- package/lib/motion/integrateAirborneRotation.js +204 -0
- package/lib/motion/integrateAirborneRotation.js.map +1 -0
- package/lib/motion/integrateMotionTrajectory.d.ts +117 -0
- package/lib/motion/integrateMotionTrajectory.js +156 -0
- package/lib/motion/integrateMotionTrajectory.js.map +1 -0
- package/lib/motion/orientChainEffector.d.ts +1 -1
- package/lib/motion/orientChainEffector.js +15 -7
- package/lib/motion/orientChainEffector.js.map +1 -1
- package/lib/motion/resolveHydrodynamicForce.d.ts +85 -0
- package/lib/motion/resolveHydrodynamicForce.js +100 -0
- package/lib/motion/resolveHydrodynamicForce.js.map +1 -0
- package/lib/motion/sampleMotion.js +2 -5
- package/lib/motion/sampleMotion.js.map +1 -1
- package/lib/motion/samplePoseVelocity.d.ts +76 -13
- package/lib/motion/samplePoseVelocity.js +126 -38
- package/lib/motion/samplePoseVelocity.js.map +1 -1
- package/lib/motion/smoothMinimum.d.ts +29 -0
- package/lib/motion/smoothMinimum.js +40 -0
- package/lib/motion/smoothMinimum.js.map +1 -0
- package/lib/motion/solveAirborneTakeoff.d.ts +150 -0
- package/lib/motion/solveAirborneTakeoff.js +324 -0
- package/lib/motion/solveAirborneTakeoff.js.map +1 -0
- package/lib/motion/solveDistalTwist.d.ts +62 -0
- package/lib/motion/solveDistalTwist.js +152 -0
- package/lib/motion/solveDistalTwist.js.map +1 -0
- package/lib/motion/speedProfile.d.ts +175 -0
- package/lib/motion/speedProfile.js +261 -0
- package/lib/motion/speedProfile.js.map +1 -0
- package/lib/motion/splitDistalTwist.d.ts +12 -17
- package/lib/motion/splitDistalTwist.js +37 -40
- package/lib/motion/splitDistalTwist.js.map +1 -1
- package/lib/motion/steerAutoMovieCrowd.d.ts +74 -0
- package/lib/motion/steerAutoMovieCrowd.js +249 -0
- package/lib/motion/steerAutoMovieCrowd.js.map +1 -0
- package/lib/motion/steerAutoMovieCrowdGeometry.d.ts +241 -0
- package/lib/motion/steerAutoMovieCrowdGeometry.js +470 -0
- package/lib/motion/steerAutoMovieCrowdGeometry.js.map +1 -0
- package/lib/physics/AutoMovieAir.d.ts +21 -0
- package/lib/physics/AutoMovieAir.js +26 -0
- package/lib/physics/AutoMovieAir.js.map +1 -0
- package/lib/physics/AutoMovieGravity.d.ts +22 -0
- package/lib/physics/AutoMovieGravity.js +30 -0
- package/lib/physics/AutoMovieGravity.js.map +1 -0
- package/lib/physics/IAutoMovieHit.d.ts +11 -7
- package/lib/physics/IAutoMovieProjectile.d.ts +65 -6
- package/lib/physics/IAutoMovieProjectileState.d.ts +6 -4
- package/lib/physics/admitMotionGeometry.js +12 -0
- package/lib/physics/admitMotionGeometry.js.map +1 -1
- package/lib/physics/bindPhysicalWorld.js +16 -4
- package/lib/physics/bindPhysicalWorld.js.map +1 -1
- package/lib/physics/combinePhysicalMassProperties.d.ts +2 -1
- package/lib/physics/combinePhysicalMassProperties.js +8 -90
- package/lib/physics/combinePhysicalMassProperties.js.map +1 -1
- package/lib/physics/deriveCenterOfMass.js +2 -5
- package/lib/physics/deriveCenterOfMass.js.map +1 -1
- package/lib/physics/derivePhysicalProfile.js +7 -5
- package/lib/physics/derivePhysicalProfile.js.map +1 -1
- package/lib/physics/index.d.ts +17 -0
- package/lib/physics/index.js +17 -0
- package/lib/physics/index.js.map +1 -1
- package/lib/physics/markAutoMovieSkeleton.d.ts +33 -0
- package/lib/physics/markAutoMovieSkeleton.js +62 -0
- package/lib/physics/markAutoMovieSkeleton.js.map +1 -0
- package/lib/physics/physicalHullErode.d.ts +25 -0
- package/lib/physics/physicalHullErode.js +54 -0
- package/lib/physics/physicalHullErode.js.map +1 -0
- package/lib/physics/physicalHullFaces.d.ts +56 -0
- package/lib/physics/physicalHullFaces.js +151 -0
- package/lib/physics/physicalHullFaces.js.map +1 -0
- package/lib/physics/physicalHullMass.d.ts +32 -0
- package/lib/physics/physicalHullMass.js +80 -0
- package/lib/physics/physicalHullMass.js.map +1 -0
- package/lib/physics/physicalHullNearest.d.ts +37 -0
- package/lib/physics/physicalHullNearest.js +178 -0
- package/lib/physics/physicalHullNearest.js.map +1 -0
- package/lib/physics/physicalHullSegment.d.ts +34 -0
- package/lib/physics/physicalHullSegment.js +276 -0
- package/lib/physics/physicalHullSegment.js.map +1 -0
- package/lib/physics/physicalInertiaTensor.d.ts +28 -0
- package/lib/physics/physicalInertiaTensor.js +58 -0
- package/lib/physics/physicalInertiaTensor.js.map +1 -0
- package/lib/physics/physicalNativeShape.d.ts +1 -1
- package/lib/physics/physicalNativeShape.js +15 -4
- package/lib/physics/physicalNativeShape.js.map +1 -1
- package/lib/physics/physicalPrincipalAxes.d.ts +28 -0
- package/lib/physics/physicalPrincipalAxes.js +96 -0
- package/lib/physics/physicalPrincipalAxes.js.map +1 -0
- package/lib/physics/physicalShapeBounds.d.ts +2 -1
- package/lib/physics/physicalShapeBounds.js +26 -2
- package/lib/physics/physicalShapeBounds.js.map +1 -1
- package/lib/physics/physicalShapeNearest.d.ts +70 -0
- package/lib/physics/physicalShapeNearest.js +201 -0
- package/lib/physics/physicalShapeNearest.js.map +1 -0
- package/lib/physics/physicalShapeNormal.d.ts +26 -0
- package/lib/physics/physicalShapeNormal.js +70 -0
- package/lib/physics/physicalShapeNormal.js.map +1 -0
- package/lib/physics/physicalShapePairDistance.d.ts +32 -0
- package/lib/physics/physicalShapePairDistance.js +124 -0
- package/lib/physics/physicalShapePairDistance.js.map +1 -0
- package/lib/physics/physicalShapeSegmentDistance.d.ts +16 -20
- package/lib/physics/physicalShapeSegmentDistance.js +18 -70
- package/lib/physics/physicalShapeSegmentDistance.js.map +1 -1
- package/lib/physics/physicalShapeSpan.d.ts +21 -0
- package/lib/physics/physicalShapeSpan.js +55 -0
- package/lib/physics/physicalShapeSpan.js.map +1 -0
- package/lib/physics/physicalShapeSurfaceAnchor.d.ts +1 -1
- package/lib/physics/physicalShapeSurfaceAnchor.js +24 -5
- package/lib/physics/physicalShapeSurfaceAnchor.js.map +1 -1
- package/lib/physics/projectileAt.d.ts +14 -12
- package/lib/physics/projectileAt.js +46 -16
- package/lib/physics/projectileAt.js.map +1 -1
- package/lib/physics/projectileContinue.d.ts +114 -0
- package/lib/physics/projectileContinue.js +189 -0
- package/lib/physics/projectileContinue.js.map +1 -0
- package/lib/physics/projectileDragFlight.d.ts +72 -0
- package/lib/physics/projectileDragFlight.js +166 -0
- package/lib/physics/projectileDragFlight.js.map +1 -0
- package/lib/physics/projectileFirstContact.d.ts +105 -0
- package/lib/physics/projectileFirstContact.js +174 -0
- package/lib/physics/projectileFirstContact.js.map +1 -0
- package/lib/physics/projectileTrajectory.js +3 -2
- package/lib/physics/projectileTrajectory.js.map +1 -1
- package/lib/physics/solveBallisticLaunch.js +2 -1
- package/lib/physics/solveBallisticLaunch.js.map +1 -1
- package/lib/physics/solveMovingLaunch.js +2 -1
- package/lib/physics/solveMovingLaunch.js.map +1 -1
- package/lib/physics/validatePhysicalProfile.js +18 -1
- package/lib/physics/validatePhysicalProfile.js.map +1 -1
- package/lib/populationRuntime/materializeCompiledFormation.js +2 -5
- package/lib/populationRuntime/materializeCompiledFormation.js.map +1 -1
- package/lib/resolve/lowerSkeletonNodes.js +3 -10
- package/lib/resolve/lowerSkeletonNodes.js.map +1 -1
- package/lib/rom/clampJointRom.d.ts +11 -3
- package/lib/rom/clampJointRom.js +43 -3
- package/lib/rom/clampJointRom.js.map +1 -1
- package/lib/rom/clampJointToSkeleton.d.ts +25 -2
- package/lib/rom/clampJointToSkeleton.js +39 -8
- package/lib/rom/clampJointToSkeleton.js.map +1 -1
- package/lib/rom/constants/ANKLE_DORSIFLEXION.d.ts +18 -0
- package/lib/rom/constants/ANKLE_DORSIFLEXION.js +22 -0
- package/lib/rom/constants/ANKLE_DORSIFLEXION.js.map +1 -0
- package/lib/rom/constants/DEFAULT_HUMANOID_ROM.d.ts +28 -0
- package/lib/rom/constants/DEFAULT_HUMANOID_ROM.js +129 -39
- package/lib/rom/constants/DEFAULT_HUMANOID_ROM.js.map +1 -1
- package/lib/rom/constants/ROM_TOLERANCE.d.ts +8 -0
- package/lib/rom/constants/ROM_TOLERANCE.js +12 -0
- package/lib/rom/constants/ROM_TOLERANCE.js.map +1 -0
- package/lib/rom/constants/index.d.ts +2 -0
- package/lib/rom/constants/index.js +2 -0
- package/lib/rom/constants/index.js.map +1 -1
- package/lib/rom/index.d.ts +1 -0
- package/lib/rom/index.js +1 -0
- package/lib/rom/index.js.map +1 -1
- package/lib/rom/scanJointRom.d.ts +62 -0
- package/lib/rom/scanJointRom.js +117 -0
- package/lib/rom/scanJointRom.js.map +1 -0
- package/lib/rom/validateJointRom.d.ts +4 -2
- package/lib/rom/validateJointRom.js +23 -45
- package/lib/rom/validateJointRom.js.map +1 -1
- package/lib/soft/IAutoMovieSoftBodyBoundarySample.d.ts +2 -0
- package/lib/soft/IAutoMovieSoftBodyObserver.d.ts +30 -0
- package/lib/soft/IAutoMovieSoftBodyObserver.js +3 -0
- package/lib/soft/IAutoMovieSoftBodyObserver.js.map +1 -0
- package/lib/soft/applySoftBodyFriction.d.ts +34 -0
- package/lib/soft/applySoftBodyFriction.js +52 -0
- package/lib/soft/applySoftBodyFriction.js.map +1 -0
- package/lib/soft/index.d.ts +6 -0
- package/lib/soft/index.js +6 -0
- package/lib/soft/index.js.map +1 -1
- package/lib/soft/projectSoftCordSelfContact.d.ts +53 -0
- package/lib/soft/projectSoftCordSelfContact.js +172 -0
- package/lib/soft/projectSoftCordSelfContact.js.map +1 -0
- package/lib/soft/simulateSoftBodyCore.d.ts +6 -3
- package/lib/soft/simulateSoftBodyCore.js +108 -16
- package/lib/soft/simulateSoftBodyCore.js.map +1 -1
- package/lib/soft/simulateSoftBodyWithBoundaries.d.ts +3 -2
- package/lib/soft/simulateSoftBodyWithBoundaries.js +10 -3
- package/lib/soft/simulateSoftBodyWithBoundaries.js.map +1 -1
- package/lib/soft/softBodyBudget.js +7 -0
- package/lib/soft/softBodyBudget.js.map +1 -1
- package/lib/soft/softBodyHeldLoads.d.ts +34 -0
- package/lib/soft/softBodyHeldLoads.js +69 -0
- package/lib/soft/softBodyHeldLoads.js.map +1 -0
- package/lib/soft/solveSoftBodyCompliantSweep.d.ts +48 -0
- package/lib/soft/solveSoftBodyCompliantSweep.js +86 -0
- package/lib/soft/solveSoftBodyCompliantSweep.js.map +1 -0
- package/lib/soft/validateSoftAnchors.d.ts +24 -0
- package/lib/soft/validateSoftAnchors.js +74 -0
- package/lib/soft/validateSoftAnchors.js.map +1 -0
- package/lib/soft/validateSoftBodyDomain.js +6 -48
- package/lib/soft/validateSoftBodyDomain.js.map +1 -1
- package/lib/soft/validateSoftBounded.d.ts +20 -0
- package/lib/soft/validateSoftBounded.js +27 -0
- package/lib/soft/validateSoftBounded.js.map +1 -0
- package/lib/soft/validateSoftCompliance.d.ts +30 -0
- package/lib/soft/validateSoftCompliance.js +54 -0
- package/lib/soft/validateSoftCompliance.js.map +1 -0
- package/lib/validation/AffordanceArticulation.d.ts +69 -0
- package/lib/validation/AffordanceArticulation.js +142 -0
- package/lib/validation/AffordanceArticulation.js.map +1 -0
- package/lib/validation/affordanceFollowedTravel.d.ts +19 -0
- package/lib/validation/affordanceFollowedTravel.js +43 -0
- package/lib/validation/affordanceFollowedTravel.js.map +1 -0
- package/lib/validation/affordanceLeadingTravel.d.ts +21 -0
- package/lib/validation/affordanceLeadingTravel.js +99 -0
- package/lib/validation/affordanceLeadingTravel.js.map +1 -0
- package/lib/validation/affordanceTravelRange.d.ts +21 -0
- package/lib/validation/affordanceTravelRange.js +39 -0
- package/lib/validation/affordanceTravelRange.js.map +1 -0
- package/lib/validation/appendShotEventsArtifact.js +12 -0
- package/lib/validation/appendShotEventsArtifact.js.map +1 -1
- package/lib/validation/detectFreeFall.js +2 -1
- package/lib/validation/detectFreeFall.js.map +1 -1
- package/lib/validation/index.d.ts +6 -0
- package/lib/validation/index.js +6 -0
- package/lib/validation/index.js.map +1 -1
- package/lib/validation/markAutoMovieSlip.d.ts +26 -0
- package/lib/validation/markAutoMovieSlip.js +52 -0
- package/lib/validation/markAutoMovieSlip.js.map +1 -0
- package/lib/validation/validateAffordance.d.ts +3 -3
- package/lib/validation/validateAffordance.js +21 -3
- package/lib/validation/validateAffordance.js.map +1 -1
- package/lib/validation/validateAffordanceArticulation.d.ts +19 -0
- package/lib/validation/validateAffordanceArticulation.js +183 -0
- package/lib/validation/validateAffordanceArticulation.js.map +1 -0
- package/lib/validation/validateBody.d.ts +2 -2
- package/lib/validation/validateBody.js +27 -3
- package/lib/validation/validateBody.js.map +1 -1
- package/lib/validation/validateJointConstraint.d.ts +1 -1
- package/lib/validation/validateJointConstraint.js +9 -1
- package/lib/validation/validateJointConstraint.js.map +1 -1
- package/lib/validation/validateModel.js +2 -0
- package/lib/validation/validateModel.js.map +1 -1
- package/lib/worldBlock.js +6 -9
- package/lib/worldBlock.js.map +1 -1
- package/package.json +6 -6
- package/src/IAutoMovieFormationPlacement.ts +4 -3
- package/src/anthropometry/AutoMovieHandAnthropometry.ts +65 -0
- package/src/anthropometry/index.ts +1 -0
- package/src/composition/AutoMovieComposition.ts +34 -7
- package/src/composition/AutoMovieScheduleCut.ts +141 -0
- package/src/composition/AutoMovieScheduleError.ts +108 -0
- package/src/composition/AutoMovieSchedulePlace.ts +253 -0
- package/src/composition/AutoMovieScheduleWalk.ts +215 -0
- package/src/composition/IAutoMovieIntent.ts +9 -7
- package/src/composition/index.ts +5 -0
- package/src/composition/markAutoMovieContacts.ts +79 -0
- package/src/composition/resolveAutoMovieContactEvents.ts +160 -19
- package/src/composition/resolveAutoMovieMutualGoal.ts +146 -72
- package/src/composition/resolveAutoMovieSchedule.ts +106 -145
- package/src/createAutoMovieGeometryActorReader.ts +2 -1
- package/src/describeAutoMovieInstanceSetSubject.ts +2 -5
- package/src/film/compileAttach.ts +2 -5
- package/src/film/compileLaunch.ts +5 -4
- package/src/film/propAnchorFrame.ts +3 -6
- package/src/film/stageScene.ts +3 -10
- package/src/film/staging/lowerLightPlacement.ts +3 -7
- package/src/formationSlotPosition.ts +54 -7
- package/src/geometry/IAutoMovieMark.ts +115 -0
- package/src/geometry/IAutoMovieMeshDefect.ts +39 -0
- package/src/geometry/construction/AutoMovieConstructionAdmission.ts +98 -13
- package/src/geometry/construction/AutoMovieConstructionBridgeRealize.ts +172 -0
- package/src/geometry/construction/AutoMovieConstructionContinuationRealize.ts +3 -0
- package/src/geometry/construction/AutoMovieConstructionPortRealize.ts +48 -16
- package/src/geometry/construction/AutoMovieConstructionSeeds.ts +54 -10
- package/src/geometry/construction/AutoMovieConstructionSplitBand.ts +509 -15
- package/src/geometry/construction/AutoMovieConstructionSplitRealize.ts +278 -0
- package/src/geometry/construction/AutoMovieConstructionSplitSeam.ts +50 -18
- package/src/geometry/construction/AutoMovieConstructionState.ts +13 -0
- package/src/geometry/construction/AutoMovieLoftCapRead.ts +3 -2
- package/src/geometry/construction/AutoMovieLoftCapSource.ts +34 -1
- package/src/geometry/construction/AutoMovieLoftJet.ts +10 -5
- package/src/geometry/construction/AutoMovieLoftPoint.ts +13 -4
- package/src/geometry/construction/AutoMovieLoftRelief.ts +42 -0
- package/src/geometry/construction/AutoMovieLoftViewRead.ts +34 -6
- package/src/geometry/construction/AutoMovieLoftViewSource.ts +4 -2
- package/src/geometry/construction/AutoMovieNaturalSpline.ts +44 -0
- package/src/geometry/construction/AutoMovieSolidBlendChain.ts +34 -20
- package/src/geometry/construction/AutoMovieSolidBodyMerge.ts +2 -0
- package/src/geometry/construction/AutoMovieSolidClip.ts +341 -54
- package/src/geometry/construction/AutoMovieSolidCycle.ts +104 -26
- package/src/geometry/construction/AutoMovieSolidIntersectionWalk.ts +100 -50
- package/src/geometry/construction/AutoMovieSolidJoin.ts +48 -2
- package/src/geometry/construction/AutoMovieSolidMeshConstraints.ts +35 -3
- package/src/geometry/construction/AutoMovieSolidMeshLoop.ts +55 -4
- package/src/geometry/construction/AutoMovieSolidMeshPlan.ts +79 -34
- package/src/geometry/construction/AutoMovieSolidRail.ts +124 -22
- package/src/geometry/construction/AutoMovieSolidRailSolve.ts +116 -25
- package/src/geometry/construction/AutoMovieViewLoft.ts +9 -0
- package/src/geometry/construction/IAutoMovieConstructionCurve.ts +42 -0
- package/src/geometry/construction/IAutoMovieLoftChain.ts +7 -0
- package/src/geometry/construction/IAutoMovieLoftRelief.ts +11 -0
- package/src/geometry/construction/IAutoMovieViewPart.ts +10 -1
- package/src/geometry/construction/faceAutoMovieSolidMesh.ts +76 -15
- package/src/geometry/construction/fairAutoMovieSolidMesh.ts +252 -0
- package/src/geometry/construction/gridAutoMovieSolidMesh.ts +173 -8
- package/src/geometry/construction/index.ts +5 -0
- package/src/geometry/construction/legalizeAutoMovieSolidMesh.ts +28 -2
- package/src/geometry/construction/markAutoMovieConstructionCurves.ts +58 -0
- package/src/geometry/construction/orientAutoMovieSolidChart.ts +32 -7
- package/src/geometry/construction/probeAutoMovieSolidMesh.ts +52 -30
- package/src/geometry/construction/realizeAutoMovieConstruction.ts +47 -5
- package/src/geometry/construction/sampleAutoMovieConstructionCurves.ts +307 -0
- package/src/geometry/index.ts +4 -0
- package/src/geometry/markAutoMovieMeshClearance.ts +69 -0
- package/src/geometry/measureAutoMovieMeshDefects.ts +327 -0
- package/src/index.ts +1 -0
- package/src/kinematics/AutoMovieHumanoidDigitSurfaces.ts +110 -0
- package/src/kinematics/AutoMovieHumanoidSurfaceExtents.ts +81 -0
- package/src/kinematics/AutoMovieHumanoidSurfaceRays.ts +286 -0
- package/src/kinematics/AutoMovieHumanoidSurfaceRegions.ts +189 -0
- package/src/kinematics/IAutoMovieHingedArticulation.ts +21 -3
- package/src/kinematics/IAutoMoviePoseRig.ts +39 -0
- package/src/kinematics/IAutoMovieSwivelNear.ts +26 -0
- package/src/kinematics/IAutoMovieSwivelSeed.ts +19 -0
- package/src/kinematics/alternateRigJointAngles.ts +41 -0
- package/src/kinematics/boxExcludedSwivels.ts +260 -0
- package/src/kinematics/constants/HUMANOID_JOINT_AXES.ts +19 -4
- package/src/kinematics/curlChainUntilContact.ts +35 -8
- package/src/kinematics/decomposeJointRotation.ts +15 -178
- package/src/kinematics/decomposeJointRotationOnBasis.ts +310 -0
- package/src/kinematics/fitDigitDescent.ts +253 -0
- package/src/kinematics/fitDigitToTarget.ts +425 -0
- package/src/kinematics/hingedArmArticulation.ts +402 -116
- package/src/kinematics/hingedArmSwivel.ts +295 -0
- package/src/kinematics/index.ts +24 -0
- package/src/kinematics/jointRomOvershoot.ts +30 -19
- package/src/kinematics/jointToQuaternion.ts +8 -43
- package/src/kinematics/jointToQuaternionOnBasis.ts +84 -0
- package/src/kinematics/markAutoMovieBalance.ts +75 -0
- package/src/kinematics/markAutoMovieRomOvershoot.ts +52 -0
- package/src/kinematics/measureAutoMovieHumanoidBody.ts +31 -9
- package/src/kinematics/normalizeJointAxes.ts +66 -12
- package/src/kinematics/poseJointCodec.ts +148 -0
- package/src/kinematics/resolveAutoMovieBalanceOutcome.ts +293 -0
- package/src/kinematics/resolveAutoMovieCenterOfMass.ts +63 -10
- package/src/kinematics/resolveAutoMovieHumanoidRingModules.ts +434 -0
- package/src/kinematics/resolveAutoMovieHumanoidSurfaces.ts +230 -356
- package/src/kinematics/resolveAutoMovieMomentum.ts +253 -0
- package/src/kinematics/swingTwistBasis.ts +162 -0
- package/src/kinematics/swingTwistExcludedSwivels.ts +204 -0
- package/src/kinematics/swingTwistRange.ts +460 -0
- package/src/kinematics/swingTwistRegion.ts +298 -0
- package/src/kinematics/swivelArcs.ts +245 -0
- package/src/math/Quaternion.ts +42 -2
- package/src/math/Transform.ts +65 -0
- package/src/math/assignAutoMovieMinimumCost.ts +86 -0
- package/src/math/bracketedBisection.ts +51 -0
- package/src/math/bracketedRoot.ts +72 -0
- package/src/math/index.ts +7 -0
- package/src/math/nearestAngleAlias.ts +43 -0
- package/src/math/solveAutoMovieHalfPlaneProgram.ts +288 -0
- package/src/math/tetrahedralizeAutoMovieDelaunay.ts +264 -0
- package/src/measureAutoMovieGeometryReach.ts +2 -4
- package/src/motion/AirborneTakeoffLinear.ts +70 -0
- package/src/motion/IAutoMovieCrowdAgent.ts +121 -0
- package/src/motion/IAutoMovieSeededChainFit.ts +32 -0
- package/src/motion/IAutoMovieSolvedChainPlant.ts +20 -0
- package/src/motion/IFitChainToTargetProps.ts +67 -0
- package/src/motion/MotionTrajectoryStepper.ts +478 -0
- package/src/motion/basisOf.ts +29 -0
- package/src/motion/carriedAcceleration.ts +56 -0
- package/src/motion/carriedRate.ts +61 -0
- package/src/motion/constants/PLANT_RESIDUAL_EPSILON.ts +10 -0
- package/src/motion/constants/index.ts +1 -0
- package/src/motion/fitChainBend.ts +491 -0
- package/src/motion/fitChainToTarget.ts +13 -485
- package/src/motion/fitHingedChainCandidate.ts +281 -148
- package/src/motion/fitHingedRotationError.ts +164 -0
- package/src/motion/fitSeededChainToTarget.ts +34 -0
- package/src/motion/gaitMotion.ts +6 -10
- package/src/motion/gestureMotion.ts +2 -5
- package/src/motion/importedNodeClipToAutoMovieMotion.ts +3 -6
- package/src/motion/index.ts +15 -0
- package/src/motion/inertializeOffset.ts +16 -2
- package/src/motion/inertializePose.ts +158 -53
- package/src/motion/integrateAirborneRotation.ts +334 -0
- package/src/motion/integrateMotionTrajectory.ts +309 -0
- package/src/motion/orientChainEffector.ts +19 -13
- package/src/motion/resolveHydrodynamicForce.ts +143 -0
- package/src/motion/sampleMotion.ts +2 -5
- package/src/motion/samplePoseVelocity.ts +168 -41
- package/src/motion/smoothMinimum.ts +36 -0
- package/src/motion/solveAirborneTakeoff.ts +471 -0
- package/src/motion/solveDistalTwist.ts +256 -0
- package/src/motion/speedProfile.ts +470 -0
- package/src/motion/splitDistalTwist.ts +55 -64
- package/src/motion/steerAutoMovieCrowd.ts +381 -0
- package/src/motion/steerAutoMovieCrowdGeometry.ts +592 -0
- package/src/physics/AutoMovieAir.ts +22 -0
- package/src/physics/AutoMovieGravity.ts +28 -0
- package/src/physics/IAutoMovieHit.ts +13 -7
- package/src/physics/IAutoMovieProjectile.ts +82 -6
- package/src/physics/IAutoMovieProjectileState.ts +10 -4
- package/src/physics/admitMotionGeometry.ts +16 -0
- package/src/physics/bindPhysicalWorld.ts +22 -11
- package/src/physics/combinePhysicalMassProperties.ts +9 -117
- package/src/physics/deriveCenterOfMass.ts +2 -5
- package/src/physics/derivePhysicalProfile.ts +3 -1
- package/src/physics/index.ts +17 -0
- package/src/physics/markAutoMovieSkeleton.ts +69 -0
- package/src/physics/physicalHullErode.ts +72 -0
- package/src/physics/physicalHullFaces.ts +215 -0
- package/src/physics/physicalHullMass.ts +99 -0
- package/src/physics/physicalHullNearest.ts +210 -0
- package/src/physics/physicalHullSegment.ts +338 -0
- package/src/physics/physicalInertiaTensor.ts +75 -0
- package/src/physics/physicalNativeShape.ts +31 -9
- package/src/physics/physicalPrincipalAxes.ts +114 -0
- package/src/physics/physicalShapeBounds.ts +24 -2
- package/src/physics/physicalShapeNearest.ts +287 -0
- package/src/physics/physicalShapeNormal.ts +105 -0
- package/src/physics/physicalShapePairDistance.ts +153 -0
- package/src/physics/physicalShapeSegmentDistance.ts +18 -92
- package/src/physics/physicalShapeSpan.ts +75 -0
- package/src/physics/physicalShapeSurfaceAnchor.ts +33 -14
- package/src/physics/projectileAt.ts +61 -20
- package/src/physics/projectileContinue.ts +287 -0
- package/src/physics/projectileDragFlight.ts +208 -0
- package/src/physics/projectileFirstContact.ts +286 -0
- package/src/physics/projectileTrajectory.ts +6 -5
- package/src/physics/solveBallisticLaunch.ts +2 -1
- package/src/physics/solveMovingLaunch.ts +2 -1
- package/src/physics/validatePhysicalProfile.ts +20 -1
- package/src/populationRuntime/materializeCompiledFormation.ts +3 -6
- package/src/resolve/lowerSkeletonNodes.ts +3 -10
- package/src/rom/clampJointRom.ts +59 -2
- package/src/rom/clampJointToSkeleton.ts +52 -15
- package/src/rom/constants/ANKLE_DORSIFLEXION.ts +20 -0
- package/src/rom/constants/DEFAULT_HUMANOID_ROM.ts +148 -37
- package/src/rom/constants/ROM_TOLERANCE.ts +8 -0
- package/src/rom/constants/index.ts +2 -0
- package/src/rom/index.ts +1 -0
- package/src/rom/scanJointRom.ts +169 -0
- package/src/rom/validateJointRom.ts +69 -74
- package/src/soft/IAutoMovieSoftBodyBoundarySample.ts +3 -0
- package/src/soft/IAutoMovieSoftBodyObserver.ts +36 -0
- package/src/soft/applySoftBodyFriction.ts +65 -0
- package/src/soft/index.ts +6 -0
- package/src/soft/projectSoftCordSelfContact.ts +239 -0
- package/src/soft/simulateSoftBodyCore.ts +127 -15
- package/src/soft/simulateSoftBodyWithBoundaries.ts +16 -2
- package/src/soft/softBodyBudget.ts +11 -0
- package/src/soft/softBodyHeldLoads.ts +85 -0
- package/src/soft/solveSoftBodyCompliantSweep.ts +107 -0
- package/src/soft/validateSoftAnchors.ts +143 -0
- package/src/soft/validateSoftBodyDomain.ts +5 -124
- package/src/soft/validateSoftBounded.ts +42 -0
- package/src/soft/validateSoftCompliance.ts +102 -0
- package/src/validation/AffordanceArticulation.ts +173 -0
- package/src/validation/affordanceFollowedTravel.ts +40 -0
- package/src/validation/affordanceLeadingTravel.ts +108 -0
- package/src/validation/affordanceTravelRange.ts +42 -0
- package/src/validation/appendShotEventsArtifact.ts +26 -0
- package/src/validation/detectFreeFall.ts +3 -2
- package/src/validation/index.ts +6 -0
- package/src/validation/markAutoMovieSlip.ts +65 -0
- package/src/validation/validateAffordance.ts +38 -3
- package/src/validation/validateAffordanceArticulation.ts +311 -0
- package/src/validation/validateBody.ts +80 -3
- package/src/validation/validateJointConstraint.ts +19 -1
- package/src/validation/validateModel.ts +7 -0
- package/src/worldBlock.ts +3 -6
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The assignment of rows to distinct columns of least total cost: the Hungarian method (Kuhn 1955) in its shortest-augmenting-path form, for a rectangular cost table with no more rows than columns.
|
|
3
|
+
*
|
|
4
|
+
* Row `i` is given column `result[i]`; no two rows share a column, and the sum of `cost[i][result[i]]` is the least any such assignment reaches. Ties are broken by the scan order of rows and columns, so the same table always gives the same assignment.
|
|
5
|
+
*
|
|
6
|
+
* @param cost The cost of giving each row each column: `rows` arrays of `columns` finite numbers, `rows <= columns`.
|
|
7
|
+
* @returns The column of each row.
|
|
8
|
+
* @throws {Error} When the table is ragged, has more rows than columns, or holds a value that is not finite: a caller's defect.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the problem solved, the rectangular case, the result's meaning, the deterministic tie rule and the refusals.
|
|
11
|
+
* @evidence contracts/development/implementation.md#principled-implementation Kuhn's Hungarian method with row and column potentials, each row added by a Dijkstra-like search for the shortest augmenting path in reduced costs (the O(n^2 m) form of Jonker and Volgenant's shortest-path formulation); reduced costs stay nonnegative, which is the optimality certificate of the dual.
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Admit the table, add the rows one at a time by an augmenting path, read the matching back.
|
|
13
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Exact on finite costs: no cost is scaled, rounded or capped.
|
|
14
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms O(rows^2 columns) time and O(rows + columns) memory beyond the table, against the factorial count of assignments.
|
|
15
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its table; nothing is kept between calls.
|
|
16
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Retains nothing; the working arrays are freed on return.
|
|
17
|
+
*/
|
|
18
|
+
export function assignAutoMovieMinimumCost(
|
|
19
|
+
cost: readonly (readonly number[])[],
|
|
20
|
+
): number[] {
|
|
21
|
+
const n: number = cost.length;
|
|
22
|
+
if (n === 0) return [];
|
|
23
|
+
const m: number = cost[0]!.length;
|
|
24
|
+
if (n > m)
|
|
25
|
+
throw new Error(
|
|
26
|
+
`assignAutoMovieMinimumCost: ${n} rows cannot take distinct columns of ${m}`,
|
|
27
|
+
);
|
|
28
|
+
cost.forEach((row: readonly number[], i: number): void => {
|
|
29
|
+
if (row.length !== m)
|
|
30
|
+
throw new Error(
|
|
31
|
+
`assignAutoMovieMinimumCost: row ${i} has ${row.length} columns, ${m} expected`,
|
|
32
|
+
);
|
|
33
|
+
for (const value of row)
|
|
34
|
+
if (!Number.isFinite(value))
|
|
35
|
+
throw new Error(`assignAutoMovieMinimumCost: row ${i} holds ${value}`);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Potentials u (rows) and v (columns), 1-based with column 0 the virtual start; way[j] is the column before j on the path.
|
|
39
|
+
const u: number[] = new Array<number>(n + 1).fill(0);
|
|
40
|
+
const v: number[] = new Array<number>(m + 1).fill(0);
|
|
41
|
+
const owner: number[] = new Array<number>(m + 1).fill(0);
|
|
42
|
+
const way: number[] = new Array<number>(m + 1).fill(0);
|
|
43
|
+
for (let i: number = 1; i <= n; ++i) {
|
|
44
|
+
owner[0] = i;
|
|
45
|
+
let j0: number = 0;
|
|
46
|
+
const least: number[] = new Array<number>(m + 1).fill(Infinity);
|
|
47
|
+
const used: boolean[] = new Array<boolean>(m + 1).fill(false);
|
|
48
|
+
|
|
49
|
+
// Grow the shortest-path tree in reduced costs until a free column is reached.
|
|
50
|
+
do {
|
|
51
|
+
used[j0] = true;
|
|
52
|
+
const i0: number = owner[j0]!;
|
|
53
|
+
let delta: number = Infinity;
|
|
54
|
+
let j1: number = 0;
|
|
55
|
+
for (let j: number = 1; j <= m; ++j) {
|
|
56
|
+
if (used[j]) continue;
|
|
57
|
+
const reduced: number = cost[i0 - 1]![j - 1]! - u[i0]! - v[j]!;
|
|
58
|
+
if (reduced < least[j]!) {
|
|
59
|
+
least[j] = reduced;
|
|
60
|
+
way[j] = j0;
|
|
61
|
+
}
|
|
62
|
+
if (least[j]! < delta) {
|
|
63
|
+
delta = least[j]!;
|
|
64
|
+
j1 = j;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
for (let j: number = 0; j <= m; ++j)
|
|
68
|
+
if (used[j]) {
|
|
69
|
+
u[owner[j]!] = u[owner[j]!]! + delta;
|
|
70
|
+
v[j] = v[j]! - delta;
|
|
71
|
+
} else least[j] = least[j]! - delta;
|
|
72
|
+
j0 = j1;
|
|
73
|
+
} while (owner[j0] !== 0);
|
|
74
|
+
|
|
75
|
+
// Flip the matching along the path back to the start.
|
|
76
|
+
do {
|
|
77
|
+
const j1: number = way[j0]!;
|
|
78
|
+
owner[j0] = owner[j1]!;
|
|
79
|
+
j0 = j1;
|
|
80
|
+
} while (j0 !== 0);
|
|
81
|
+
}
|
|
82
|
+
const result: number[] = new Array<number>(n).fill(-1);
|
|
83
|
+
for (let j: number = 1; j <= m; ++j)
|
|
84
|
+
if (owner[j] !== 0) result[owner[j]! - 1] = j - 1;
|
|
85
|
+
return result;
|
|
86
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The boundary of a yes-or-no condition between two arguments, the condition
|
|
3
|
+
* holding at one and not at the other, by bisection.
|
|
4
|
+
*
|
|
5
|
+
* Each step reads the condition at the bracket's midpoint and keeps the half
|
|
6
|
+
* whose ends still disagree, so the bracket halves on every step and the
|
|
7
|
+
* boundary never leaves it. Where the condition is the sign of a continuous
|
|
8
|
+
* function, `bracketedRoot` finds the crossing in fewer evaluations; this is
|
|
9
|
+
* for a condition that has no value to interpolate, or whose value jumps
|
|
10
|
+
* (one shape left as another is met), where a chord would misread it. The
|
|
11
|
+
* ends are the caller's to have read: neither is evaluated here.
|
|
12
|
+
*
|
|
13
|
+
* @param holds The condition.
|
|
14
|
+
* @param low The end where the condition holds; it may lie either side of
|
|
15
|
+
* `high`.
|
|
16
|
+
* @param high The end where it does not.
|
|
17
|
+
* @param tolerance The bracket width at which the search stops, in the
|
|
18
|
+
* argument's unit; positive.
|
|
19
|
+
* @returns The end of the final bracket where the condition does not hold,
|
|
20
|
+
* within `tolerance` of the boundary; `high` itself when the bracket is
|
|
21
|
+
* already no wider than `tolerance`.
|
|
22
|
+
* @throws If an end is not finite or the tolerance is not positive and
|
|
23
|
+
* finite.
|
|
24
|
+
*
|
|
25
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the method, which end each argument is, why the ends are not read, when to prefer the bracketed root, the unit of the tolerance, which end is returned and every thrown input.
|
|
26
|
+
* @evidence contracts/development/implementation.md#principled-implementation Bisection: the midpoint is read and the half whose ends disagree is kept, which needs nothing of the condition but that it holds at one end and not at the other, and keeps the boundary inside the bracket on every step.
|
|
27
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One loop over two ends; callers pass only the condition, the bracket and the tolerance.
|
|
28
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A non-finite end and a non-positive tolerance are refused instead of answered with an end; no condition or caller is special-cased.
|
|
29
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One evaluation a step, ceil(log2(|high - low| / tolerance)) in all, the fewest any search that reads only a yes or a no can take; the ends are not read again.
|
|
30
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments that evaluates each midpoint once and coordinates no work across calls.
|
|
31
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Holds two numbers for the duration of the call and retains nothing.
|
|
32
|
+
*/
|
|
33
|
+
export function bracketedBisection(
|
|
34
|
+
holds: (x: number) => boolean,
|
|
35
|
+
low: number,
|
|
36
|
+
high: number,
|
|
37
|
+
tolerance: number,
|
|
38
|
+
): number {
|
|
39
|
+
if (!Number.isFinite(low) || !Number.isFinite(high))
|
|
40
|
+
throw new Error("A bracketed bisection needs two finite ends");
|
|
41
|
+
if (!(tolerance > 0) || !Number.isFinite(tolerance))
|
|
42
|
+
throw new Error("A bracketed bisection needs a positive finite tolerance");
|
|
43
|
+
let lo: number = low;
|
|
44
|
+
let hi: number = high;
|
|
45
|
+
while (Math.abs(hi - lo) > tolerance) {
|
|
46
|
+
const mid: number = (lo + hi) / 2;
|
|
47
|
+
if (holds(mid)) lo = mid;
|
|
48
|
+
else hi = mid;
|
|
49
|
+
}
|
|
50
|
+
return hi;
|
|
51
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A root of a continuous function between two arguments where it takes
|
|
3
|
+
* opposite signs, by the Illinois variant of the false position method
|
|
4
|
+
* (Dowell and Jarratt 1971).
|
|
5
|
+
*
|
|
6
|
+
* Each step evaluates the function where the chord through the bracket's two
|
|
7
|
+
* ends crosses zero and keeps the half that still brackets the root. When the
|
|
8
|
+
* same end is kept twice in a row its value is halved for the next chord, so
|
|
9
|
+
* both ends close on the root and the order of convergence is about 1.44 on a
|
|
10
|
+
* smooth function, against one bit a step for bisection. The root never
|
|
11
|
+
* leaves the bracket, so the method needs no derivative and no guard.
|
|
12
|
+
*
|
|
13
|
+
* @param f The function.
|
|
14
|
+
* @param low One end of the bracket.
|
|
15
|
+
* @param high The other end.
|
|
16
|
+
* @param tolerance The bracket width at which the search stops, in the
|
|
17
|
+
* argument's unit; positive.
|
|
18
|
+
* @param limit The most evaluations after the two ends'.
|
|
19
|
+
* @returns The last argument evaluated, within `tolerance` of a root unless
|
|
20
|
+
* the limit ran out first; an end itself when the function is zero there.
|
|
21
|
+
* @throws If an end or its value is not finite, the two values share a sign,
|
|
22
|
+
* or the tolerance is not positive and finite.
|
|
23
|
+
*
|
|
24
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the method and its source, why both ends close, the order of convergence, each parameter's unit and default, what is returned when the limit runs out or an end is a root, and every thrown input.
|
|
25
|
+
* @evidence contracts/development/implementation.md#principled-implementation Dowell and Jarratt's Illinois rule: the chord's zero is evaluated, the half that keeps opposite signs is kept, and a value retained twice is halved, which removes false position's one-sided stall; the sign test keeps the root inside the bracket on every step.
|
|
26
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One loop over a bracket of two arguments and their values, with one flag for the end kept last; callers pass only the function and the bracket.
|
|
27
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A bracket that does not straddle a root, a non-finite end or value and a non-positive tolerance are refused instead of answered with an end; no function or caller is special-cased.
|
|
28
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One evaluation a step at superlinear order 1.44 on a smooth function, against bisection's one bit a step, bounded by `limit` evaluations.
|
|
29
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its arguments that evaluates each argument once and coordinates no work across calls.
|
|
30
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Holds five numbers and a flag for the duration of the call and retains nothing.
|
|
31
|
+
*/
|
|
32
|
+
export function bracketedRoot(
|
|
33
|
+
f: (x: number) => number,
|
|
34
|
+
low: number,
|
|
35
|
+
high: number,
|
|
36
|
+
tolerance: number,
|
|
37
|
+
limit: number = 64,
|
|
38
|
+
): number {
|
|
39
|
+
if (!Number.isFinite(low) || !Number.isFinite(high))
|
|
40
|
+
throw new Error("A bracketed root needs two finite ends");
|
|
41
|
+
if (!(tolerance > 0) || !Number.isFinite(tolerance))
|
|
42
|
+
throw new Error("A bracketed root needs a positive finite tolerance");
|
|
43
|
+
let a: number = low;
|
|
44
|
+
let b: number = high;
|
|
45
|
+
let fa: number = f(a);
|
|
46
|
+
let fb: number = f(b);
|
|
47
|
+
if (!Number.isFinite(fa) || !Number.isFinite(fb))
|
|
48
|
+
throw new Error("A bracketed root needs finite values at its ends");
|
|
49
|
+
if (fa === 0) return a;
|
|
50
|
+
if (fb === 0) return b;
|
|
51
|
+
if (fa > 0 === fb > 0)
|
|
52
|
+
throw new Error("A bracketed root needs opposite signs at its ends");
|
|
53
|
+
let x: number = Math.abs(fa) < Math.abs(fb) ? a : b;
|
|
54
|
+
let kept: -1 | 0 | 1 = 0;
|
|
55
|
+
for (let k: number = 0; k < limit && Math.abs(b - a) > tolerance; k++) {
|
|
56
|
+
x = (a * fb - b * fa) / (fb - fa);
|
|
57
|
+
const fx: number = f(x);
|
|
58
|
+
if (fx === 0 || !Number.isFinite(fx)) return x;
|
|
59
|
+
if (fx > 0 === fb > 0) {
|
|
60
|
+
b = x;
|
|
61
|
+
fb = fx;
|
|
62
|
+
if (kept === -1) fa /= 2;
|
|
63
|
+
kept = -1;
|
|
64
|
+
} else {
|
|
65
|
+
a = x;
|
|
66
|
+
fa = fx;
|
|
67
|
+
if (kept === 1) fb /= 2;
|
|
68
|
+
kept = 1;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return x;
|
|
72
|
+
}
|
package/src/math/index.ts
CHANGED
|
@@ -23,12 +23,16 @@ export * from "./IAutoMovieSingularDecomposition";
|
|
|
23
23
|
export * from "./IAutoMovieSingularMatrixBudget";
|
|
24
24
|
export * from "./Matrix4";
|
|
25
25
|
export * from "./Quaternion";
|
|
26
|
+
export * from "./Transform";
|
|
26
27
|
export * from "./Vector3";
|
|
27
28
|
export * from "./addAutoMovieQuadraticProduct";
|
|
28
29
|
export * from "./addPositiveModulo";
|
|
29
30
|
export * from "./adjacentAutoMovieFloat64";
|
|
30
31
|
export * from "./admitAutoMovieQuadraticProgram";
|
|
31
32
|
export * from "./assembleAutoMovieQuadraticProgram";
|
|
33
|
+
export * from "./assignAutoMovieMinimumCost";
|
|
34
|
+
export * from "./bracketedBisection";
|
|
35
|
+
export * from "./bracketedRoot";
|
|
32
36
|
export * from "./clampAutoMovieUnitInterval";
|
|
33
37
|
export * from "./closestPointOnSegmentXZ";
|
|
34
38
|
export * from "./closestPointsBetweenSegments";
|
|
@@ -52,6 +56,7 @@ export * from "./measureAutoMovieQuadraticState";
|
|
|
52
56
|
export * from "./midpoint";
|
|
53
57
|
export * from "./minimizeAutoMovieSimplexQuadratic";
|
|
54
58
|
export * from "./mixSeed";
|
|
59
|
+
export * from "./nearestAngleAlias";
|
|
55
60
|
export * from "./nearestHullEdge";
|
|
56
61
|
export * from "./orderAutoMovieQuadraticMatrix";
|
|
57
62
|
export * from "./pointHullDistance";
|
|
@@ -71,6 +76,7 @@ export * from "./seededValue";
|
|
|
71
76
|
export * from "./segmentIndex";
|
|
72
77
|
export * from "./segmentSegmentDistance";
|
|
73
78
|
export * from "./solveAutoMovieBoundedDisplacement";
|
|
79
|
+
export * from "./solveAutoMovieHalfPlaneProgram";
|
|
74
80
|
export * from "./solveAutoMovieQuadraticInterior";
|
|
75
81
|
export * from "./solveAutoMovieQuadraticKernel";
|
|
76
82
|
export * from "./solveAutoMovieQuadraticProgram";
|
|
@@ -78,6 +84,7 @@ export * from "./solveAutoMovieQuadraticStep";
|
|
|
78
84
|
export * from "./solveAutoMovieQuadraticWorkingSetStep";
|
|
79
85
|
export * from "./srgbHexToLinearColor";
|
|
80
86
|
export * from "./swingTwist";
|
|
87
|
+
export * from "./tetrahedralizeAutoMovieDelaunay";
|
|
81
88
|
export * from "./transformedBoxBounds";
|
|
82
89
|
export * from "./weldMeshVertices";
|
|
83
90
|
export * from "./wrapDegrees";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IAutoMovieAngleRange } from "@automovie/interface";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The full-turn alias of an angle nearest an interval: one inside it when
|
|
5
|
+
* any is, the angle itself first; otherwise the alias with the least
|
|
6
|
+
* overshoot, the lower one on a tie. A `null` interval is the immobile one,
|
|
7
|
+
* which admits only 0. No angle is clamped.
|
|
8
|
+
*
|
|
9
|
+
* The nearest alias matters for an interval no alias can hit exactly. An
|
|
10
|
+
* immobile axis admits only 0, and an extraction returns its half turn as
|
|
11
|
+
* 180 degrees less a rounding error, so the alternate chart's 360 degrees
|
|
12
|
+
* less that error has no alias at exactly 0; left unaliased it would score a
|
|
13
|
+
* full turn of overshoot and lose a chart choice to a far worse chart, on
|
|
14
|
+
* rounding noise alone.
|
|
15
|
+
*
|
|
16
|
+
* @param angle Degrees.
|
|
17
|
+
* @param range The interval, degrees; `null` for an immobile axis.
|
|
18
|
+
* @returns The alias, degrees.
|
|
19
|
+
*
|
|
20
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the alias chosen, the tie, the immobile case, that nothing is clamped and why the nearest alias matters.
|
|
21
|
+
* @evidence contracts/development/implementation.md#principled-implementation The aliases inside an interval are the whole turns between its ends, so the least and the greatest are two roundings; with none inside, the two neighbours of the interval are compared by their overshoot.
|
|
22
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Two roundings and one comparison.
|
|
23
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The angle is only shifted by whole turns, never moved into the interval.
|
|
24
|
+
* @evidenceExclude contracts/development/implementation.md#efficient-algorithms Constant work.
|
|
25
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The one alias owner, read by the joint inverse's chart choice and by the swing-twist range's twist.
|
|
26
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Retains nothing.
|
|
27
|
+
*/
|
|
28
|
+
export function nearestAngleAlias(
|
|
29
|
+
angle: number,
|
|
30
|
+
range: IAutoMovieAngleRange | null,
|
|
31
|
+
): number {
|
|
32
|
+
const minimum: number = range?.min ?? 0;
|
|
33
|
+
const maximum: number = range?.max ?? 0;
|
|
34
|
+
if (angle >= minimum && angle <= maximum) return angle;
|
|
35
|
+
const first: number = Math.ceil((minimum - angle) / 360);
|
|
36
|
+
const last: number = Math.floor((maximum - angle) / 360);
|
|
37
|
+
if (first <= last) return angle + 360 * Math.max(first, Math.min(last, 0));
|
|
38
|
+
// No alias is inside: `last` is the nearest one below the interval and
|
|
39
|
+
// `first` the nearest one above it.
|
|
40
|
+
const below: number = angle + 360 * last;
|
|
41
|
+
const above: number = angle + 360 * first;
|
|
42
|
+
return minimum - below <= above - maximum ? below : above;
|
|
43
|
+
}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The point of a disc nearest a preferred point that satisfies a set of
|
|
3
|
+
* half-planes in the plane, or, when no point satisfies them all, the point
|
|
4
|
+
* of the disc that violates the worst of them least: the two- and
|
|
5
|
+
* three-dimensional linear programs of optimal reciprocal collision
|
|
6
|
+
* avoidance (van den Berg, Guy, Lin and Manocha 2011, Reciprocal n-body
|
|
7
|
+
* collision avoidance, Robotics Research, Springer Tracts in Advanced
|
|
8
|
+
* Robotics 70, sections 5.2 and 5.3).
|
|
9
|
+
*
|
|
10
|
+
* A half-plane is a directed line, a point and a unit direction; a point `v`
|
|
11
|
+
* lies inside it when `det(direction, point - v) <= 0`, on the direction's
|
|
12
|
+
* left. The program is solved incrementally, the half-planes added in their
|
|
13
|
+
* given order (Seidel's randomised incremental algorithm in its
|
|
14
|
+
* deterministic order, which keeps the result reproducible): while the
|
|
15
|
+
* current optimum satisfies the next half-plane it stays; otherwise the new
|
|
16
|
+
* optimum lies on that half-plane's line and is found by a one-dimensional
|
|
17
|
+
* program along it against the earlier half-planes and the disc. When that
|
|
18
|
+
* fails, the three-dimensional program takes the point of the disc whose
|
|
19
|
+
* greatest signed distance into the violated half-planes is least, by the
|
|
20
|
+
* same incremental method on the projected half-planes of the planes that
|
|
21
|
+
* bound it.
|
|
22
|
+
*
|
|
23
|
+
* @param lines The half-planes, in order.
|
|
24
|
+
* @param radius The disc's radius about the origin, positive.
|
|
25
|
+
* @param preferred The preferred point.
|
|
26
|
+
* @returns The point found, and whether every half-plane holds at it.
|
|
27
|
+
* @throws {Error} When the radius is not positive and finite, a direction is not a unit vector, or a value is not finite: a caller's defect.
|
|
28
|
+
*
|
|
29
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the problem, the half-plane convention, the incremental method, the fallback and their source.
|
|
30
|
+
* @evidence contracts/development/implementation.md#principled-implementation The cited paper's two-dimensional incremental linear program with its one-dimensional subproblem and its three-dimensional program for the infeasible case.
|
|
31
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Admit the input, run the two-dimensional program, fall back to the three-dimensional one from the half-plane it failed on.
|
|
32
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No half-plane is dropped or softened: an infeasible set is answered by the least worst violation, and the result says it is.
|
|
33
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Expected linear in the half-planes for the feasible program, at worst quadratic, and cubic at worst for the fallback, on the few neighbours of one agent.
|
|
34
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure function of its input; nothing is kept between calls.
|
|
35
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Retains nothing.
|
|
36
|
+
*/
|
|
37
|
+
export function solveAutoMovieHalfPlaneProgram(
|
|
38
|
+
lines: readonly solveAutoMovieHalfPlaneProgram.ILine[],
|
|
39
|
+
radius: number,
|
|
40
|
+
preferred: solveAutoMovieHalfPlaneProgram.IPoint,
|
|
41
|
+
): solveAutoMovieHalfPlaneProgram.IResult {
|
|
42
|
+
if (!(radius > 0) || !Number.isFinite(radius))
|
|
43
|
+
throw new Error(
|
|
44
|
+
`solveAutoMovieHalfPlaneProgram: the radius ${radius} is not positive and finite`,
|
|
45
|
+
);
|
|
46
|
+
for (const [i, line] of lines.entries()) {
|
|
47
|
+
const values: number[] = [
|
|
48
|
+
line.point.x,
|
|
49
|
+
line.point.y,
|
|
50
|
+
line.direction.x,
|
|
51
|
+
line.direction.y,
|
|
52
|
+
];
|
|
53
|
+
if (!values.every(Number.isFinite))
|
|
54
|
+
throw new Error(
|
|
55
|
+
`solveAutoMovieHalfPlaneProgram: half-plane ${i} holds a value that is not finite`,
|
|
56
|
+
);
|
|
57
|
+
if (Math.abs(Math.hypot(line.direction.x, line.direction.y) - 1) > 1e-6)
|
|
58
|
+
throw new Error(
|
|
59
|
+
`solveAutoMovieHalfPlaneProgram: half-plane ${i}'s direction is not a unit vector`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
const planar: { failed: number; point: IPoint } = program2(
|
|
63
|
+
lines,
|
|
64
|
+
radius,
|
|
65
|
+
preferred,
|
|
66
|
+
false,
|
|
67
|
+
);
|
|
68
|
+
if (planar.failed >= lines.length)
|
|
69
|
+
return { point: planar.point, feasible: true };
|
|
70
|
+
return {
|
|
71
|
+
point: program3(lines, planar.failed, radius, planar.point),
|
|
72
|
+
feasible: false,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Companion types of {@link solveAutoMovieHalfPlaneProgram}.
|
|
78
|
+
*
|
|
79
|
+
* @evidence contracts/development/common.md#meaningful-documentation Each type states its meaning.
|
|
80
|
+
* @evidence contracts/development/design.md#principled-representation A point, a directed line and the result.
|
|
81
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface What the program reads and returns.
|
|
82
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts None.
|
|
83
|
+
*/
|
|
84
|
+
export namespace solveAutoMovieHalfPlaneProgram {
|
|
85
|
+
/** A point of the plane. */
|
|
86
|
+
export interface IPoint {
|
|
87
|
+
/** The first coordinate. */
|
|
88
|
+
x: number;
|
|
89
|
+
|
|
90
|
+
/** The second coordinate. */
|
|
91
|
+
y: number;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** A half-plane: the points left of a directed line, the line included. */
|
|
95
|
+
export interface ILine {
|
|
96
|
+
/** A point on the line. */
|
|
97
|
+
point: IPoint;
|
|
98
|
+
|
|
99
|
+
/** The line's unit direction. */
|
|
100
|
+
direction: IPoint;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** What the program found. */
|
|
104
|
+
export interface IResult {
|
|
105
|
+
/** The point. */
|
|
106
|
+
point: IPoint;
|
|
107
|
+
|
|
108
|
+
/** Whether every half-plane holds at it; otherwise it violates the worst of them least. */
|
|
109
|
+
feasible: boolean;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
type IPoint = solveAutoMovieHalfPlaneProgram.IPoint;
|
|
114
|
+
type ILine = solveAutoMovieHalfPlaneProgram.ILine;
|
|
115
|
+
|
|
116
|
+
/** Below this, two directions count as parallel and a determinant as zero. */
|
|
117
|
+
const EPSILON: number = 1e-9;
|
|
118
|
+
|
|
119
|
+
/** The determinant of two plane vectors, `a.x b.y - a.y b.x`. */
|
|
120
|
+
function det(a: IPoint, b: IPoint): number {
|
|
121
|
+
return a.x * b.y - a.y * b.x;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** The dot product of two plane vectors. */
|
|
125
|
+
function dot(a: IPoint, b: IPoint): number {
|
|
126
|
+
return a.x * b.x + a.y * b.y;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** `a + s b`. */
|
|
130
|
+
function along(a: IPoint, s: number, b: IPoint): IPoint {
|
|
131
|
+
return { x: a.x + s * b.x, y: a.y + s * b.y };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The one-dimensional program on line `index`: the point of that line, within
|
|
136
|
+
* the disc and inside the half-planes before it, nearest the preferred point
|
|
137
|
+
* (or furthest along `direction` when `directional`); null when there is none.
|
|
138
|
+
*/
|
|
139
|
+
function program1(
|
|
140
|
+
lines: readonly ILine[],
|
|
141
|
+
index: number,
|
|
142
|
+
radius: number,
|
|
143
|
+
preferred: IPoint,
|
|
144
|
+
directional: boolean,
|
|
145
|
+
): IPoint | null {
|
|
146
|
+
const line: ILine = lines[index]!;
|
|
147
|
+
const dotProduct: number = dot(line.point, line.direction);
|
|
148
|
+
const discriminant: number =
|
|
149
|
+
dotProduct * dotProduct + radius * radius - dot(line.point, line.point);
|
|
150
|
+
if (discriminant < 0) return null;
|
|
151
|
+
const root: number = Math.sqrt(discriminant);
|
|
152
|
+
let left: number = -dotProduct - root;
|
|
153
|
+
let right: number = -dotProduct + root;
|
|
154
|
+
for (let i: number = 0; i < index; ++i) {
|
|
155
|
+
const other: ILine = lines[i]!;
|
|
156
|
+
const denominator: number = det(line.direction, other.direction);
|
|
157
|
+
const numerator: number = det(other.direction, {
|
|
158
|
+
x: line.point.x - other.point.x,
|
|
159
|
+
y: line.point.y - other.point.y,
|
|
160
|
+
});
|
|
161
|
+
if (Math.abs(denominator) <= EPSILON) {
|
|
162
|
+
// Parallel lines: this one is wholly outside the other, or the other adds nothing.
|
|
163
|
+
if (numerator < 0) return null;
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
const t: number = numerator / denominator;
|
|
167
|
+
if (denominator >= 0) right = Math.min(right, t);
|
|
168
|
+
else left = Math.max(left, t);
|
|
169
|
+
if (left > right) return null;
|
|
170
|
+
}
|
|
171
|
+
if (directional)
|
|
172
|
+
return along(
|
|
173
|
+
line.point,
|
|
174
|
+
dot(preferred, line.direction) > 0 ? right : left,
|
|
175
|
+
line.direction,
|
|
176
|
+
);
|
|
177
|
+
const t: number = dot(line.direction, {
|
|
178
|
+
x: preferred.x - line.point.x,
|
|
179
|
+
y: preferred.y - line.point.y,
|
|
180
|
+
});
|
|
181
|
+
return along(line.point, Math.min(right, Math.max(left, t)), line.direction);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The two-dimensional program: the point of the disc inside every half-plane
|
|
186
|
+
* nearest the preferred point (or furthest along it when `directional`), and
|
|
187
|
+
* the index of the half-plane it failed on, `lines.length` when none.
|
|
188
|
+
*/
|
|
189
|
+
function program2(
|
|
190
|
+
lines: readonly ILine[],
|
|
191
|
+
radius: number,
|
|
192
|
+
preferred: IPoint,
|
|
193
|
+
directional: boolean,
|
|
194
|
+
): { failed: number; point: IPoint } {
|
|
195
|
+
const length: number = Math.hypot(preferred.x, preferred.y);
|
|
196
|
+
let point: IPoint = directional
|
|
197
|
+
? { x: preferred.x * radius, y: preferred.y * radius }
|
|
198
|
+
: length > radius
|
|
199
|
+
? { x: (preferred.x / length) * radius, y: (preferred.y / length) * radius }
|
|
200
|
+
: { x: preferred.x, y: preferred.y };
|
|
201
|
+
for (let i: number = 0; i < lines.length; ++i) {
|
|
202
|
+
const line: ILine = lines[i]!;
|
|
203
|
+
if (
|
|
204
|
+
det(line.direction, {
|
|
205
|
+
x: line.point.x - point.x,
|
|
206
|
+
y: line.point.y - point.y,
|
|
207
|
+
}) > 0
|
|
208
|
+
) {
|
|
209
|
+
const next: IPoint | null = program1(
|
|
210
|
+
lines,
|
|
211
|
+
i,
|
|
212
|
+
radius,
|
|
213
|
+
preferred,
|
|
214
|
+
directional,
|
|
215
|
+
);
|
|
216
|
+
if (next === null) return { failed: i, point };
|
|
217
|
+
point = next;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return { failed: lines.length, point };
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The three-dimensional program from the half-plane the two-dimensional one
|
|
225
|
+
* failed on: the point of the disc whose greatest signed distance into the
|
|
226
|
+
* half-planes is least, each violated half-plane in turn bounding the
|
|
227
|
+
* earlier ones by the bisector of the two.
|
|
228
|
+
*/
|
|
229
|
+
function program3(
|
|
230
|
+
lines: readonly ILine[],
|
|
231
|
+
begin: number,
|
|
232
|
+
radius: number,
|
|
233
|
+
start: IPoint,
|
|
234
|
+
): IPoint {
|
|
235
|
+
let point: IPoint = start;
|
|
236
|
+
let distance: number = 0;
|
|
237
|
+
for (let i: number = begin; i < lines.length; ++i) {
|
|
238
|
+
const line: ILine = lines[i]!;
|
|
239
|
+
if (
|
|
240
|
+
det(line.direction, {
|
|
241
|
+
x: line.point.x - point.x,
|
|
242
|
+
y: line.point.y - point.y,
|
|
243
|
+
}) <= distance
|
|
244
|
+
)
|
|
245
|
+
continue;
|
|
246
|
+
const projected: ILine[] = [];
|
|
247
|
+
for (let j: number = 0; j < i; ++j) {
|
|
248
|
+
const other: ILine = lines[j]!;
|
|
249
|
+
const determinant: number = det(line.direction, other.direction);
|
|
250
|
+
let at: IPoint;
|
|
251
|
+
if (Math.abs(determinant) <= EPSILON) {
|
|
252
|
+
// Parallel: opposite directions bound nothing new; the same direction is already implied.
|
|
253
|
+
if (dot(line.direction, other.direction) > 0) continue;
|
|
254
|
+
at = {
|
|
255
|
+
x: 0.5 * (line.point.x + other.point.x),
|
|
256
|
+
y: 0.5 * (line.point.y + other.point.y),
|
|
257
|
+
};
|
|
258
|
+
} else
|
|
259
|
+
at = along(
|
|
260
|
+
line.point,
|
|
261
|
+
det(other.direction, {
|
|
262
|
+
x: line.point.x - other.point.x,
|
|
263
|
+
y: line.point.y - other.point.y,
|
|
264
|
+
}) / determinant,
|
|
265
|
+
line.direction,
|
|
266
|
+
);
|
|
267
|
+
const dx: number = other.direction.x - line.direction.x;
|
|
268
|
+
const dy: number = other.direction.y - line.direction.y;
|
|
269
|
+
const norm: number = Math.hypot(dx, dy);
|
|
270
|
+
if (norm <= EPSILON) continue;
|
|
271
|
+
projected.push({ point: at, direction: { x: dx / norm, y: dy / norm } });
|
|
272
|
+
}
|
|
273
|
+
const before: IPoint = point;
|
|
274
|
+
const solved: { failed: number; point: IPoint } = program2(
|
|
275
|
+
projected,
|
|
276
|
+
radius,
|
|
277
|
+
{ x: -line.direction.y, y: line.direction.x },
|
|
278
|
+
true,
|
|
279
|
+
);
|
|
280
|
+
// In principle the projected program cannot fail; a failure is rounding, and the point before it is kept.
|
|
281
|
+
point = solved.failed < projected.length ? before : solved.point;
|
|
282
|
+
distance = det(line.direction, {
|
|
283
|
+
x: line.point.x - point.x,
|
|
284
|
+
y: line.point.y - point.y,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
return point;
|
|
288
|
+
}
|