Seaside lighthouse · celworld
seed

Seaside lighthouse

lighthouse_islet v1Made by APIc5
Open in Playground

v1 cost

$0.351

API, priced from the call usage.

The run, with the maths
All 1 version$0.351

Budget

c5 · 71 lines
Shapes63 / 100
Triangles7,600 / 8,000
Draw calls3 / 4
States
open_door · signal · hop
Used in
No scene yet
Made
1asset lighthouse_islet "Seaside lighthouse" complexity=5
2// a chunky striped lighthouse on a rocky islet: a keeper's hut, a little dock with a gull,
3// and a lamp room whose glowing lamp turns its two beams round. The door opens, the lamp signals.
4
5// proportions and colours
6let TH = 3.4..3.9
7let stripe = cherry:3|cobalt:2|tangerine|teal
8let trim = cream:3|white
9let rockA = rockGrey:2|rockCool
10let rockB = rockWarm:2|rockSand
11let beamC = lemon:2|sunflower|white
12
13// the islet and the sea around it
14lathe islet r=2.4 h=.5 prof=[0:.9 .15:1 .8:.85 1:.7] color=rockA cap=rockB segs=20 joint
15cyl sea on=islet at=(0, .06, 0) r=3.6 h=.14 round=.05 cap=waterLight color=water segs=20 joint
16torus foam on=sea at=(0, .14, 0) R=3.5 r=.07 color=foam segs=20 sides=5
17ball rock x7 on=islet ring=10 ring0=20 at=(2.15, .34, 0) r=(.55, .34, .45) color=sel(i, rockB, rockA, rockB, rockA, rockB, rockA, rockB) segs=8 rings=5
18puff grass x3 on=islet ring=20 ring0=40 at=(1.35, .5, 0) r=(.38, .2, .34) color=leafA segs=8 rings=5
19
20// the tower: a tapered, banded column with a hinged door and glowing windows
21lathe tower on=islet at=(0, .42, 0) h=TH r=.9 prof=[0:1 1:.62] linear color=trim bands=[.22:stripe .44:trim .66:stripe .88:trim] segs=24
22box doorway on=tower at=(.02, .1, .88) size=(.38, .8, .1) round=.03 color=inkDark
23cyl hinge on=tower at=(.22, .12, .88) h=.76 r=.03 color=brass segs=8 joint
24box leaf on=hinge at=(-.2, .02, 0) size=(.4, .72, .12) round=.04 color=walnut
25box win1 on=tower at=(0, TH*.38, .7) size=(.22, .32, .2) round=.05 color=glow ink=glow
26box win2 on=tower at=(0, TH*.68, .6) size=(.2, .3, .2) round=.05 color=glow ink=glow
27
28// the gallery: a fat deck with a railing of posts
29cyl gallery on=tower at=(0, TH-.1, 0) r=1.2 h=.2 round=.07 color=stripe segs=24
30torus rail on=gallery at=(0, .7, 0) R=1.05 r=.04 color=trim segs=24 sides=5
31rod post x10 on=gallery ring=0 at=(1.05, .17, 0) to=(0, .53, 0) r=.035 sides=6 color=trim
32
33// the lamp room: a pedestal, brass mullions, a glowing lamp with two beams, a capped roof
34cyl lampbase on=gallery at=(0, .12, 0) r=.62 h=.34 round=.05 color=trim segs=20
35rod mull x8 on=lampbase ring=0 at=(.52, .3, 0) to=(0, .8, 0) r=.035 sides=6 color=brass
36cyl roofring on=lampbase at=(0, 1.05, 0) r=.66 h=.14 round=.04 color=stripe segs=20
37cone lroof on=lampbase at=(0, 1.15, 0) r=.7 r2=.1 h=.42 color=stripe segs=20
38ball finial on=lroof at=end r=.1 color=brass segs=10 rings=6
39rod pole on=finial at=(0, .05, 0) to=(0, .5, 0) r=.02 sides=6 color=brass
40slab flag on=pole at=(0, .28, 0) pts=[0,0 .45,.08 0,.16] t=.03 round=.01 color=stripe joint
41ball lamp on=lampbase at=(0, .72, 0) r=.2 color=glow ink=glow segs=12 rings=8 joint
42cone beam1 on=lamp at=(0, 0, .12) rot=(90, 0, 0) h=1.7 r=.1 r2=.5 color=beamC ink=glow segs=10
43cone beam2 on=lamp at=(0, 0, -.12) rot=(-90, 0, 0) h=1.7 r=.1 r2=.5 color=beamC ink=glow segs=10
44
45// the keeper's hut
46box hut on=islet at=(-1.15, .38, .3) size=(.9, .7, .7) round=.08 color=trim
47cone hroof on=hut at=(0, .66, 0) segs=4 yaw=45 r=.72 h=.4 color=terracotta
48box chimney on=hut at=(-.25, .7, -.15) size=(.16, .4, .16) round=.03 color=rockWarm
49box hwin on=hut at=(.2, .2, .37) size=(.26, .26, .06) round=.03 color=glow ink=glow
50box hdoor on=hut at=(-.2, 0, .37) size=(.22, .4, .06) round=.03 color=walnut
51
52// the dock and a gull
53box dock on=islet at=(.9, .12, 1.7) size=(.7, .14, 1.8) round=.04 color=walnut
54cyl dpost x2 on=dock row=(.6, 0, 0) at=(0, .08, .78) r=.06 h=.3 round=.02 color=oak segs=8
55ball gull on=dock at=(0, .24, -.45) r=(.13, .12, .18) color=white segs=10 rings=6 joint
56ball ghead on=gull at=(0, .1, .14) r=.09 color=white segs=10 rings=6 joint
57cone beak on=ghead surf=(0, -5) h=.09 r=.03 r2=.01 color=marigold segs=8
58face gface on=ghead eyes=dot mouth=none size=.25 spacing=35 detail=.6
59ball wing on=gull at=(.12, .02, -.02) mirror r=(.04, .09, .16) color=silver segs=8 rings=5
60ball gtail on=gull at=(0, .02, -.2) r=(.06, .03, .1) color=silver segs=8 rings=5
61
62// idle: the lamp turns, the sea bobs, the flag waves, the gull nods
63anim lamp spin hz=.3
64anim sea bob amp=.015 hz=.3
65anim flag ry sin amp=18 hz=.8
66anim ghead nod amp=10 hz=.4
67// states: the door swings open, the lamp signals fast and pulses, the gull hops
68anim open_door: hinge ry keys=[0:0 .6:105 1:100] hz=.6 once
69anim signal: lamp ry spin hz=1.2
70anim signal: lamp s sin amp=.2 hz=3
71anim hop: gull py bounce amp=.08 hz=2
72