New answers tagged

6

inputstring = "Transform Basis: V3 (V3 0.99060506 (-1.4430956e-2) 0.1359906) (V3 1.381684e-2 0.9998897 5.458703e-3) (V3 (-0.13605437) (-3.5284583e-3) 0.9906951) Transform Position: V3 0.4690141 0.6664715 0.16474605"; lines = StringSplit[ StringDelete[inputstring, { "(", ")", RegularExpression["V\\d+"], ...


2

SeedRandom[300] nTimeSteps = 5; myRandomWalk = AnglePath3D[RandomReal[{-360 \[Degree], 360 \[Degree]}, {nTimeSteps, 3}]]; oldRandomWalk = myRandomWalk; pt1 = myRandomWalk[[4]]; pt2 = myRandomWalk[[5]]; unitVector = Normalize[pt2 - pt1]; delta = 0.5; myRandomWalk[[;; 4]] = # - (delta/2) unitVector & /@ myRandomWalk[[;; 4]]; myRandomWalk[[5 ;;]] = # + (...


Top 50 recent answers are included