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