aboutsummaryrefslogtreecommitdiff
path: root/examples/04_3D_exemple.pd
blob: 1b6d62557fd1467df6b7b377d2fb54dd19b78a59 (plain)
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
#N canvas 557 132 607 384 12;
#X declare -lib Gem -path ../;
#X obj 82 222 t b b;
#X obj 82 198 metro 10;
#X obj 82 164 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#N canvas 451 422 544 277 gem 0;
#X obj 267 18 gemhead;
#X msg 47 96 0 \, destroy;
#X obj 252 45 inlet;
#X obj 267 146 translateXYZ;
#X obj 13 19 inlet;
#X obj 13 45 sel 1;
#X obj 252 70 unpack s f f f;
#X obj 13 124 gemwin 50;
#X msg 13 71 reset \, lighting 1 \, create \, 1;
#X obj 421 50 gemhead;
#X obj 419 74 world_light;
#X msg 342 193 20;
#X obj 342 170 loadbang;
#X obj 228 110 pack f f f;
#X obj 267 216 sphere 0.1;
#X obj 377 109 gemhead;
#X obj 376 220 sphere 1;
#X obj 377 135 alpha;
#X obj 376 196 color 1 1 1 0.5;
#X connect 0 0 3 0;
#X connect 1 0 7 0;
#X connect 2 0 6 0;
#X connect 3 0 14 0;
#X connect 4 0 5 0;
#X connect 5 0 8 0;
#X connect 5 1 1 0;
#X connect 6 1 3 1;
#X connect 6 1 13 0;
#X connect 6 2 3 2;
#X connect 6 2 13 1;
#X connect 6 3 3 3;
#X connect 6 3 13 2;
#X connect 8 0 7 0;
#X connect 9 0 10 0;
#X connect 11 0 14 2;
#X connect 11 0 16 2;
#X connect 12 0 11 0;
#X connect 15 0 17 0;
#X connect 17 0 18 0;
#X connect 18 0 16 0;
#X restore 43 343 pd gem;
#X obj 43 319 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X msg 207 181 force3D 1 0 0;
#X msg 215 204 force3D 0 1 0;
#X msg 223 227 force3D 0 0 1;
#X text 112 160 <- start here;
#X text 66 316 <- gem simulation;
#X text 347 205 <- send X \, Y \, Z forces;
#X obj 82 264 mass3D 0 10;
#X obj 189 264 link3D 0 1 1 1 0.03;
#X obj 74 22 declare -lib Gem -path ../;
#X text 76 61 Simulation of a 3D model. The small sphere is linked
to the center of the big one with a 3D link. This link has the same
diameter than the big sphere.;
#X connect 0 0 11 0;
#X connect 0 1 12 0;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X connect 4 0 3 0;
#X connect 5 0 11 0;
#X connect 6 0 11 0;
#X connect 7 0 11 0;
#X connect 11 0 12 0;
#X connect 11 0 3 1;
#X connect 12 0 11 0;