|
a |
|
b/Docs/FullHuman_media.any |
|
|
1 |
#path ANYBODY_PATH_OUTPUT "." |
|
|
2 |
#include "../libdef.any" |
|
|
3 |
|
|
|
4 |
//#define BM_ARM_LEFT OFF |
|
|
5 |
//#define BM_TRUNK_MUSCLES OFF |
|
|
6 |
//#define BM_LEG_MODEL OFF |
|
|
7 |
#define BM_LEG_MODEL _LEG_MODEL_TLEM2_ |
|
|
8 |
|
|
|
9 |
#include "<ANYBODY_PATH_MODELUTILS>/Video/VideoLookAtCamera.any" |
|
|
10 |
|
|
|
11 |
Main = { |
|
|
12 |
|
|
|
13 |
// VideoLookAtCamera ShoulderCloseUpFront(UP_DIRECTION=y, _AUTO_OPEN_PREVIEW_=0) = |
|
|
14 |
// { |
|
|
15 |
// VideoName = "ShoulderCloseupFront"; |
|
|
16 |
// Analysis = { |
|
|
17 |
// AnyOperation &ref = Main.study.InitialConditions; |
|
|
18 |
// }; |
|
|
19 |
// VideoInputScale = 5; |
|
|
20 |
// VideoResolution = {600,600}; |
|
|
21 |
// CameraLookAtPoint = Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Humerus.gh.r+{0,0,-0.05}; |
|
|
22 |
// CameraFieldOfView = DesignVar(0.4); |
|
|
23 |
// CameraDirection = {1,0,0}; |
|
|
24 |
// BackgroundColor = DesignVar({1,1,1}); |
|
|
25 |
// Preview.FileName = VideoName + ".jpg"; |
|
|
26 |
// }; |
|
|
27 |
// VideoLookAtCamera ShoulderCloseUpBack(UP_DIRECTION=y, _AUTO_OPEN_PREVIEW_=0) = |
|
|
28 |
// { |
|
|
29 |
// VideoName = "ShoulderCloseupBack"; |
|
|
30 |
// Analysis = { |
|
|
31 |
// AnyOperation &ref = Main.study.InitialConditions; |
|
|
32 |
// }; |
|
|
33 |
// VideoInputScale = 5; |
|
|
34 |
// VideoResolution = {600,600}; |
|
|
35 |
// CameraLookAtPoint = Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Humerus.gh.r+{0,0,-0.05}; |
|
|
36 |
// CameraFieldOfView = DesignVar(0.4); |
|
|
37 |
// CameraDirection = {-1,0,0}; |
|
|
38 |
// BackgroundColor = DesignVar({1,1,1}); |
|
|
39 |
// Preview.FileName = VideoName + ".jpg"; |
|
|
40 |
// }; |
|
|
41 |
|
|
|
42 |
|
|
|
43 |
VideoLookAtCamera RotatingGif(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF, VIDEO_ENCODER="libx264") = |
|
|
44 |
{ |
|
|
45 |
VideoName = "_static/Human_rotating_model"; |
|
|
46 |
|
|
|
47 |
Analysis = { |
|
|
48 |
AnyOperation &ref = Main.study.Kinematics; |
|
|
49 |
}; |
|
|
50 |
VideoInputScale = 5; |
|
|
51 |
VideoResolution = {500,500}; |
|
|
52 |
VideoInputFrameRate = 30; |
|
|
53 |
VideoOutputFrameRate = 30; |
|
|
54 |
CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r - {0,0.1,0}; |
|
|
55 |
CameraFieldOfView = DesignVar(2); |
|
|
56 |
CameraDirection = {cos(2*pi*Main.study.t),sin(pi*30/180),sin(2*pi*Main.study.t) }; |
|
|
57 |
BackgroundColor = DesignVar({1,1,1}); |
|
|
58 |
Counter = Main.study.iStep; |
|
|
59 |
}; |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
#include "<ANYBODY_PATH_BODY>/HumanModel.any" |
|
|
63 |
|
|
|
64 |
AnyFolder Model = |
|
|
65 |
{ |
|
|
66 |
AnyFolder &Human = .HumanModel.BodyModel; |
|
|
67 |
AnyFolder &MotionDrivers = .HumanModel.DefaultMannequinDrivers; |
|
|
68 |
|
|
|
69 |
AnyReacForce HumanGroundResiduals = |
|
|
70 |
{ |
|
|
71 |
AnyKinMeasure& PelvisPosX = .Human.Interface.Trunk.PelvisPosX; |
|
|
72 |
AnyKinMeasure& PelvisPosY = .Human.Interface.Trunk.PelvisPosY; |
|
|
73 |
AnyKinMeasure& PelvisPosZ = .Human.Interface.Trunk.PelvisPosZ; |
|
|
74 |
AnyKinMeasure& PelvisRotX = .Human.Interface.Trunk.PelvisRotX; |
|
|
75 |
AnyKinMeasure& PelvisRotY = .Human.Interface.Trunk.PelvisRotY; |
|
|
76 |
AnyKinMeasure& PelvisRotZ = .Human.Interface.Trunk.PelvisRotZ; |
|
|
77 |
}; |
|
|
78 |
|
|
|
79 |
}; |
|
|
80 |
|
|
|
81 |
|
|
|
82 |
AnyBodyStudy study = |
|
|
83 |
{ |
|
|
84 |
AnyFolder &ModelForSim = .Model; // '&' creates a local reference to existing folder |
|
|
85 |
AnyFolder &Cam = Main.RotatingGif; |
|
|
86 |
Gravity = {0,-9.81,1}; // Gravity Vector |
|
|
87 |
tStart = 0; // Start time |
|
|
88 |
tEnd = 1; // End time |
|
|
89 |
|
|
|
90 |
InitialConditions.SolverType = KinSolOverDeterminate; |
|
|
91 |
Kinematics.SolverType = KinSolOverDeterminate; |
|
|
92 |
}; |
|
|
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
AnyOperationSequence RunApplication = |
|
|
97 |
{ |
|
|
98 |
//AnyOperation& CreateFrontImage = Main.ShoulderCloseUpFront.Preview; |
|
|
99 |
// AnyOperation& CreateFrontBack = Main.ShoulderCloseUpBack.Preview; |
|
|
100 |
AnyOperation& CreateRotatingGif = Main.RotatingGif.Create_Video; |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
}; |
|
|
105 |
|
|
|
106 |
}; |