Playground
From carton_s · Compiles in your browser · $0
CtrlShiftS
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
asset carton_s "Cardboard carton S" complexity=3// an open cardboard shipping box, 3x3 squares inside (.9 x .9 m), built for the steep packing// camera: a pale inner floor, four walls with lighter corrugated rims and four flaps splayed outward. `pop`// unfolds it from a flat net; `close` folds the short x flaps in, then the long z flaps over them, then a strip// of packing tape rolls out along the seam. A "this side up" mark sits on the front wall and the front lid flaplet boxC = cardboardlet rimC = cardboard*1.16let floorC = cardboard*1.07let tapeC = cardboard*.74let printC = walnutlet labelC = cream// the inner floor and the four walls, each hinged at its bottom edge with +z pointing outwardbox bed at=(0, 0, 0) size=(.9, .03, .9) round=.006 bev=1 color=floorCslab wall_xn at=(-.46, 0, 0) yaw=-90 pts=[-.45,0 .45,0 .45,.25 -.45,.25] t=.02 round=.004 edge=rimC color=boxC jointslab wall_xp at=(.46, 0, 0) yaw=90 pts=[-.45,0 .45,0 .45,.25 -.45,.25] t=.02 round=.004 edge=rimC color=boxC jointslab wall_zn at=(0, 0, -.46) yaw=180 pts=[-.47,0 .47,0 .47,.264 -.47,.264] t=.02 round=.004 edge=rimC color=boxC jointslab wall_zp at=(0, 0, .46) pts=[-.47,0 .47,0 .47,.264 -.47,.264] t=.02 round=.004 edge=rimC color=boxC joint// four top flaps splayed outward: the short x flaps fold in first, the long z flaps close over themslab flap_xn on=wall_xn at=(0, .25, 0) rot=(115, 0, 0) pts=[-.444,0 .444,0 .444,.4 .4429,.41 .4395,.4195 .4342,.4281 .4271,.4352 .4185,.4405 .409,.4439 .399,.445 -.399,.445 -.409,.4439 -.4185,.4405 -.4271,.4352 -.4342,.4281 -.4395,.4195 -.4429,.41 -.444,.4] t=.012 round=.004 edge=rimC color=boxC jointslab flap_xp on=wall_xp at=(0, .25, 0) rot=(115, 0, 0) pts=[-.444,0 .444,0 .444,.4 .4429,.41 .4395,.4195 .4342,.4281 .4271,.4352 .4185,.4405 .409,.4439 .399,.445 -.399,.445 -.409,.4439 -.4185,.4405 -.4271,.4352 -.4342,.4281 -.4395,.4195 -.4429,.41 -.444,.4] t=.012 round=.004 edge=rimC color=boxC jointslab flap_zn on=wall_zn at=(0, .268, 0) rot=(105, 0, 0) pts=[-.458,0 .458,0 .458,.41 .4569,.42 .4535,.4295 .4482,.4381 .4411,.4452 .4325,.4505 .423,.4539 .413,.455 -.413,.455 -.423,.4539 -.4325,.4505 -.4411,.4452 -.4482,.4381 -.4535,.4295 -.4569,.42 -.458,.41] t=.014 round=.004 edge=rimC color=boxC jointslab flap_zp on=wall_zp at=(0, .268, 0) rot=(105, 0, 0) pts=[-.458,0 .458,0 .458,.41 .4569,.42 .4535,.4295 .4482,.4381 .4411,.4452 .4325,.4505 .423,.4539 .413,.455 -.413,.455 -.423,.4539 -.4325,.4505 -.4411,.4452 -.4482,.4381 -.4535,.4295 -.4569,.42 -.458,.41] t=.014 round=.004 edge=rimC color=boxC joint// "this side up": two arrows over a bar, printed on the front wall and on the front lid flap; a label on the back flapslab arrow x2 on=wall_zp at=(0, .1, .011) row=(.09, 0, 0) pts=[-.016,0 .016,0 .016,.07 .042,.07 0,.125 -.042,.07 -.016,.07] t=.004 round=.0015 color=printC ink=noneslab bar on=wall_zp at=(0, .1, .011) pts=[-.1,-.034 .1,-.034 .1,-.016 -.1,-.016] t=.004 round=.0015 color=printC ink=noneslab lidarrow x2 on=flap_zp at=(0, .1911, .009) row=(.09, 0, 0) pts=[-.016,0 .016,0 .016,.07 .042,.07 0,.125 -.042,.07 -.016,.07] t=.004 round=.0015 color=printC ink=noneslab lidbar on=flap_zp at=(0, .1911, .009) pts=[-.1,-.034 .1,-.034 .1,-.016 -.1,-.016] t=.004 round=.0015 color=printC ink=noneslab label on=flap_zn at=(.2025, .1311, .009) pts=[-.1,0 .1,0 .1,.13 -.1,.13] t=.004 round=.0015 color=labelC ink=noneslab line x3 on=label at=(-.012, .065, .004) row=(0, .03, 0) pts=[-.07,-.006 .07,-.006 .07,.006 -.07,.006] t=.003 round=.001 color=printC ink=none// packing tape: baked at 1% size inside the floor; `close` lifts it to the lid seam and rolls it out along +xslab tape at=(-.4, .012, 0) rot=(-90, 0, 0) scale=.01 pts=[0,-.07 .96,-.07 .96,.07 0,.07] t=.006 round=.002 color=tapeC ink=thin joint// pop (0.6 s): the walls rise off the flat net with a little overshoot, then the flaps flop out to restanim pop: wall_xn rx keys=[0:90 .12:90 .5:-6 .62:3 .72:0 1:0] hz=1.6667 onceanim pop: wall_xp rx keys=[0:90 .12:90 .5:-6 .62:3 .72:0 1:0] hz=1.6667 onceanim pop: wall_zn rx keys=[0:90 .12:90 .5:-6 .62:3 .72:0 1:0] hz=1.6667 onceanim pop: wall_zp rx keys=[0:90 .12:90 .5:-6 .62:3 .72:0 1:0] hz=1.6667 onceanim pop: flap_xn rx keys=[0:-115 .2:-115 .55:-75 .75:8 .86:-3 1:0] hz=1.6667 onceanim pop: flap_xp rx keys=[0:-115 .2:-115 .55:-75 .75:8 .86:-3 1:0] hz=1.6667 onceanim pop: flap_zn rx keys=[0:-105 .28:-105 .62:-60 .8:6 .9:-2 1:0] hz=1.6667 onceanim pop: flap_zp rx keys=[0:-105 .28:-105 .62:-60 .8:6 .9:-2 1:0] hz=1.6667 once// close (1.2 s): CARTON_FLAP_TIMES x- [0, .22] x+ [.15, .38] z- [.40, .62] z+ [.55, .80] s, tape [.85, 1.05] sanim close: flap_xn rx keys=[0:0 .1833:-205 1:-205] hz=.8333 onceanim close: flap_xp rx keys=[0:0 .125:0 .3167:-205 1:-205] hz=.8333 onceanim close: flap_zn rx keys=[0:0 .3333:0 .5167:-195 1:-195] hz=.8333 onceanim close: flap_zp rx keys=[0:0 .4583:0 .6667:-195 1:-195] hz=.8333 onceanim close: tape px keys=[0:0 .7:0 .705:-.08 1:-.08] hz=.8333 onceanim close: tape pz keys=[0:0 .7:0 .705:.267 1:.267] hz=.8333 onceanim close: tape s keys=[0:0 .7083:0 .875:99 1:99] hz=.8333 once
Clean: no issues on this seed.
seed
Shapes— / 45
Triangles— / 4,500
Draw calls— / 3