Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Light Shader in Codea
--# Main
-- 2 Face
function parseObjFormat(data)
local avs, ans, auvs = {},{},{}
local f = "%s(\-?%d*[\.]%d+)"
for x,y,z in string.gmatch(data, "v" .. f .. f .. f) do
table.insert(avs,
vec3(tonumber(x), tonumber(y), tonumber(z)))
end
for x,y,z in string.gmatch(data, "vn" .. f .. f .. f) do
table.insert(ans,
vec3(tonumber(x), tonumber(y), tonumber(z)))
end
for x,y in string.gmatch(data, "vt" .. f .. f) do
table.insert(auvs,
vec2(tonumber(x), tonumber(y)))
end
local vs,uvs,ns = {},{},{}
local fa = "%s(%d+)/(%d+)/(%d+)"
for v1,vt1,vn1,v2,vt2,vn2,v3,vt3,vn3 in
string.gmatch(data, "f" .. fa .. fa .. fa .. "\n") do
v1,v2,v3=tonumber(v1),tonumber(v2),tonumber(v3)
vt1,vt2,vt3=tonumber(vt1),tonumber(vt2),tonumber(vt3)
vn1,vn2,vn3=tonumber(vn1),tonumber(vn2),tonumber(vn3)
table.insert(vs, avs[v1])
table.insert(vs, avs[v2])
table.insert(vs, avs[v3])
table.insert(uvs, auvs[vt1])
table.insert(uvs, auvs[vt2])
table.insert(uvs, auvs[vt3])
table.insert(ns, ans[vn1])
table.insert(ns, ans[vn2])
table.insert(ns, ans[vn3])
end
for v1,vt1,vn1,v2,vt2,vn2,v3,vt3,vn3,v4,vt4,vn4 in
string.gmatch(data, "f" .. fa .. fa .. fa .. fa .. "\n") do
v1,v2,v3=tonumber(v1),tonumber(v2),tonumber(v3)
vt1,vt2,vt3=tonumber(vt1),tonumber(vt2),tonumber(vt3)
vn1,vn2,vn3=tonumber(vn1),tonumber(vn2),tonumber(vn3)
v4,vt4,vn4=tonumber(v4),tonumber(vt4),tonumber(vn4)
table.insert(vs, avs[v1])
table.insert(vs, avs[v2])
table.insert(vs, avs[v3])
table.insert(vs, avs[v1])
table.insert(vs, avs[v3])
table.insert(vs, avs[v4])
table.insert(uvs, auvs[vt1])
table.insert(uvs, auvs[vt2])
table.insert(uvs, auvs[vt3])
table.insert(uvs, auvs[vt1])
table.insert(uvs, auvs[vt3])
table.insert(uvs, auvs[vt4])
table.insert(ns, ans[vn1])
table.insert(ns, ans[vn2])
table.insert(ns, ans[vn3])
table.insert(ns, ans[vn1])
table.insert(ns, ans[vn3])
table.insert(ns, ans[vn4])
end
return vs,ns,uvs
end
function setup()
parameter.number("Z", 0,10,3)
parameter.number("Y",-10,10,0)
parameter.integer("R",-180,180,0)
vs, ns, uvs = parseObjFormat(data)
local v=vs[1]
m = mesh()
m.vertices = vs
m.texCoords = uvs
m.texture = "Documents:face"
m:setColors(255,255,255,255)
m.shader = lightShader
local nor = m:buffer("normal")
if nor then
nor:resize(#ns)
for i,v in ipairs(ns) do
nor[i] = v
end
end
end
function draw()
background(40, 40, 50)
perspective(45)
camera(0,7.1+Y,Z,0,7.10,0)
rotate(R, 0,1,0)
m.shader.light = vec3(Gravity.x,Gravity.y,1)
m.shader.time = ElapsedTime
m.shader.freq = .4
m:draw()
end
--# Data
data = [===[
v -0.109346 7.107816 0.365271
v -0.127650 7.103911 0.360161
v -0.146574 7.107861 0.358565
v -0.106464 7.125035 0.373740
v -0.130383 7.122353 0.375515
v -0.152180 7.125091 0.365506
v -0.112069 7.142264 0.380681
v -0.130995 7.146214 0.379085
v -0.149298 7.142310 0.373975
v 0.113108 7.106705 0.365678
v 0.130239 7.103082 0.360636
v 0.147928 7.106797 0.359103
v 0.110364 7.122790 0.374125
v 0.132716 7.120310 0.375985
v 0.153121 7.122903 0.366051
v 0.115558 7.138895 0.381073
v 0.133247 7.142611 0.379541
v 0.150378 7.138987 0.374498
v -0.058971 6.826745 0.367763
v 0.068186 6.824399 0.367967
v -0.068962 6.879619 0.368324
v 0.076994 6.875927 0.368548
v -0.134943 6.881549 0.287645
v 0.135930 6.877810 0.288095
v -0.127927 6.825168 0.287040
v 0.131041 6.822036 0.287474
v 0.001644 6.869929 0.392968
v 0.006315 6.820465 0.392435
v -0.111997 6.824984 0.286994
v 0.006334 6.820580 0.381883
v -0.045289 6.825027 0.360909
v 0.116313 6.823243 0.287388
v 0.055510 6.822850 0.361068
v -0.058976 6.826607 0.365290
v 0.068175 6.824424 0.365496
v -0.056309 6.750521 0.364461
v 0.055007 6.744937 0.364601
v -0.098603 6.738751 0.283675
v 0.105471 6.738915 0.284046
v -0.127848 6.825044 0.284568
v 0.130986 6.821919 0.285002
v 0.005423 6.752201 0.389215
v 0.006319 6.820491 0.389965
v -0.111695 6.825933 0.284534
v -0.046864 6.825101 0.357946
v 0.006338 6.820608 0.379346
v 0.056959 6.823067 0.358112
v 0.116576 6.824207 0.284928
v 0.001595 6.868403 0.436414
v 0.001058 6.887259 0.437216
v 0.002114 6.849720 0.442486
v 0.003674 6.832237 0.441543
v 0.006509 6.776218 0.420383
v 0.005814 6.760815 0.399835
v 0.003280 6.706661 0.395164
v 0.004593 6.734628 0.394129
v 0.001576 6.670206 0.391236
v -0.000099 6.633451 0.353978
v 0.000471 6.902942 0.458612
v 0.000268 6.914395 0.497060
v -0.000127 6.946566 0.513706
v -0.000531 6.984943 0.499109
v 0.002167 7.048810 0.472045
v 0.002466 7.091206 0.455370
v 0.001270 7.129145 0.434699
v -0.006895 7.203466 0.452306
v -0.009832 7.261664 0.436094
v 0.000146 6.636354 0.269671
v 0.006268 6.820185 0.417942
v 0.006574 6.822034 0.249201
v 0.001599 6.879730 0.283080
v 0.005633 6.753725 0.282743
v 0.006271 6.820198 0.416764
v -0.002821 7.334611 0.430321
v 0.000000 6.669074 0.182954
v 0.317592 7.082162 0.072746
v 0.314254 6.948159 0.027217
v 0.302129 7.089170 0.099945
v 0.346059 7.043874 -0.021014
v 0.336826 7.118825 0.039547
v 0.353865 7.097073 -0.003871
v 0.321089 7.133535 0.039992
v 0.340523 7.119858 -0.012492
v 0.333656 7.053531 -0.047173
v 0.288294 6.917522 0.016808
v 0.099487 7.073914 0.381462
v 0.103290 7.087023 0.368661
v 0.083135 7.111074 0.374549
v 0.140123 7.012310 0.373221
v 0.095302 7.025889 0.403342
v 0.080882 6.971181 0.411346
v 0.080124 6.918504 0.418628
v 0.104293 6.889780 0.403297
v 0.032833 6.895539 0.434701
v 0.038820 6.874961 0.426789
v 0.037930 6.857700 0.431060
v 0.030313 6.840297 0.429918
v 0.105507 6.834665 0.395876
v 0.134647 6.837740 0.371413
v 0.042619 6.780372 0.410485
v 0.038402 6.758321 0.395158
v 0.096009 6.809250 0.386585
v 0.112879 6.849522 0.396412
v 0.135211 6.873338 0.377143
v 0.154273 6.841105 0.356435
v 0.133557 6.794607 0.348755
v 0.077751 6.749770 0.362944
v 0.036279 6.730923 0.386615
v 0.034368 6.702772 0.383292
v 0.087871 6.782275 0.378092
v 0.036621 6.662464 0.375523
v 0.036824 6.631132 0.343623
v 0.076377 6.648726 0.296340
v 0.085625 6.679251 0.326880
v 0.115696 6.671515 0.226612
v 0.143948 6.708488 0.265567
v 0.124076 7.170549 0.379412
v 0.126198 7.171982 0.409593
v 0.093413 7.161140 0.423018
v 0.101430 7.164349 0.392376
v 0.129412 7.210651 0.420395
v 0.065259 7.201438 0.445725
v 0.056740 7.105910 0.398168
v 0.083776 6.964216 0.429810
v 0.086612 6.929584 0.434006
v 0.064370 6.969349 0.451650
v 0.074559 6.934212 0.454310
v 0.024473 6.911399 0.459984
v 0.029452 6.922405 0.491935
v 0.037547 6.947069 0.506183
v 0.026886 6.981336 0.491857
v 0.045797 6.929651 0.465327
v 0.053815 6.966024 0.465951
v 0.063735 6.988676 0.448374
v 0.061061 7.030060 0.428025
v 0.029711 7.048194 0.460260
v 0.033880 7.120756 0.423528
v 0.132153 7.078242 0.360539
v 0.132935 7.067521 0.366584
v 0.179030 7.061420 0.347259
v 0.164268 7.077967 0.342973
v 0.229486 7.106713 0.287540
v 0.186721 7.119964 0.329540
v 0.160854 7.162059 0.368379
v 0.179271 7.171893 0.378905
v 0.138531 7.044151 0.372141
v 0.190673 7.034457 0.344240
v 0.202205 6.970425 0.328466
v 0.190354 7.202536 0.383120
v 0.252731 7.107522 0.256293
v 0.191551 7.244644 0.368805
v 0.112449 7.255003 0.415767
v 0.233235 7.223036 0.296089
v 0.285120 7.140162 0.194718
v 0.244743 6.986146 0.243386
v 0.282435 7.020965 0.170037
v 0.196212 6.726355 0.149951
v 0.227380 6.758523 0.184267
v 0.247636 6.868025 0.213301
v 0.247315 6.792418 0.077215
v 0.269767 6.827607 0.101228
v 0.272499 6.890100 0.138370
v 0.056162 6.638422 0.261940
v 0.082308 6.848221 0.415630
v 0.074604 6.832062 0.412708
v 0.038064 6.820761 0.409624
v 0.106520 6.832646 0.380411
v 0.071427 6.824369 0.393359
v 0.122778 6.836732 0.368464
v 0.038515 6.820732 0.407424
v 0.086608 6.829410 0.370841
v 0.026228 6.822487 0.249277
v 0.022828 6.881061 0.282954
v 0.068031 6.824564 0.249475
v 0.086516 6.884970 0.283500
v 0.059514 6.883880 0.283021
v 0.113586 6.835134 0.292211
v 0.028567 6.751000 0.282796
v 0.056452 6.748996 0.283053
v 0.102413 6.803860 0.291017
v 0.172300 6.895208 0.348507
v 0.124081 6.942101 0.381928
v 0.113602 7.123421 0.306246
v 0.138805 7.137100 0.396622
v 0.171758 7.130974 0.379922
v 0.106526 7.134203 0.399360
v 0.173229 7.105995 0.355133
v 0.140561 7.098790 0.371444
v 0.108198 7.102173 0.376629
v 0.207179 7.106832 0.311637
v 0.302837 7.132797 0.030624
v 0.311812 7.117735 0.080387
v 0.275444 7.023882 -0.014058
v 0.281747 7.050287 -0.035315
v 0.278916 6.941594 0.058514
v 0.283774 7.203852 0.142280
v 0.236874 7.271919 0.254430
v 0.185827 7.336915 0.340356
v 0.108956 7.343060 0.397581
v 0.247189 6.887936 0.032610
v 0.100203 6.690323 0.162182
v 0.142914 6.729382 0.114108
v 0.210767 6.811050 0.054051
v 0.069129 7.105959 0.381096
v 0.099315 7.058526 0.392057
v 0.062533 7.066814 0.418270
v 0.031564 7.084130 0.444477
v 0.182075 7.125385 0.361669
v 0.188892 7.137751 0.344267
v 0.211798 7.147385 0.337770
v 0.229588 7.171687 0.323438
v 0.121443 6.833529 0.367745
v 0.115544 6.835853 0.360596
v 0.115532 6.835927 0.363410
v 0.126633 6.825972 0.365568
v 0.188339 6.838993 0.313312
v 0.141975 6.752144 0.302025
v 0.079447 6.713923 0.340859
v 0.222473 6.846176 0.267423
v -0.317067 7.089175 0.071154
v -0.316784 6.956834 0.024406
v -0.299185 7.096041 0.096522
v -0.354052 7.051805 -0.018927
v -0.339765 7.125614 0.040733
v -0.360650 7.104273 -0.000643
v -0.324366 7.140387 0.039771
v -0.348609 7.127113 -0.010217
v -0.344535 7.061795 -0.045855
v -0.291865 6.926890 0.011211
v -0.109417 7.071540 0.381940
v -0.114805 7.085170 0.368665
v -0.077563 7.112789 0.373878
v -0.146311 7.009343 0.372670
v -0.099706 7.023399 0.402961
v -0.086552 6.963330 0.410935
v -0.079535 6.922020 0.418362
v -0.102739 6.892619 0.403075
v -0.026652 6.895775 0.434595
v -0.035987 6.876440 0.426668
v -0.036587 6.860275 0.430956
v -0.025771 6.841584 0.429847
v -0.100069 6.838274 0.395505
v -0.131521 6.840594 0.370920
v -0.032039 6.780082 0.410338
v -0.028780 6.758966 0.395030
v -0.089054 6.809686 0.385995
v -0.108451 6.852294 0.395855
v -0.134121 6.876856 0.376636
v -0.151864 6.844421 0.355765
v -0.130315 6.797906 0.348139
v -0.080782 6.755616 0.362429
v -0.028371 6.732751 0.386519
v -0.028242 6.705544 0.383209
v -0.080316 6.781801 0.377636
v -0.034267 6.665627 0.375429
v -0.036771 6.633266 0.343513
v -0.075723 6.652996 0.296111
v -0.086020 6.684587 0.326627
v -0.113588 6.674945 0.226234
v -0.139480 6.712626 0.265099
v -0.136841 7.174256 0.378980
v -0.139676 7.175868 0.409154
v -0.102675 7.163203 0.422685
v -0.111545 7.166807 0.392017
v -0.145449 7.214932 0.419945
v -0.078912 7.203424 0.445486
v -0.052378 7.105239 0.397963
v -0.090138 6.957141 0.429393
v -0.087214 6.934578 0.433717
v -0.071098 6.967395 0.451383
v -0.076452 6.931285 0.454005
v -0.019818 6.910433 0.459893
v -0.025858 6.921114 0.491821
v -0.034067 6.946527 0.506047
v -0.027833 6.980846 0.491745
v -0.044457 6.928926 0.465154
v -0.051816 6.967402 0.465771
v -0.060230 6.993769 0.448195
v -0.059931 7.031565 0.427821
v -0.024338 7.049273 0.460174
v -0.028848 7.120595 0.423412
v -0.140288 7.079222 0.360228
v -0.141899 7.066939 0.366711
v -0.185789 7.065880 0.347003
v -0.172876 7.083217 0.342470
v -0.227988 7.111072 0.286760
v -0.188233 7.121325 0.329007
v -0.169979 7.166702 0.367831
v -0.188952 7.175168 0.378274
v -0.146199 7.043636 0.371620
v -0.196848 7.039497 0.343593
v -0.205181 6.971537 0.327741
v -0.202679 7.205505 0.382441
v -0.248495 7.110789 0.255421
v -0.205861 7.250348 0.368148
v -0.130058 7.259799 0.415381
v -0.241816 7.232158 0.295329
v -0.277200 7.149202 0.193799
v -0.244879 6.991850 0.242562
v -0.275653 7.027108 0.169094
v -0.198775 6.730959 0.149286
v -0.230826 6.768314 0.183545
v -0.246989 6.873717 0.212468
v -0.248523 6.796387 0.076360
v -0.268968 6.833716 0.100320
v -0.270677 6.895756 0.137448
v -0.055546 6.642722 0.261784
v -0.070198 6.852438 0.415392
v -0.073268 6.840177 0.412527
v -0.025207 6.821663 0.409506
v -0.104733 6.836076 0.380024
v -0.066417 6.825396 0.393058
v -0.119357 6.839544 0.368066
v -0.026012 6.821661 0.407214
v -0.080938 6.832362 0.369427
v -0.012167 6.823036 0.249214
v -0.019514 6.882250 0.282891
v -0.056435 6.824897 0.249252
v -0.079412 6.888546 0.283215
v -0.056778 6.886654 0.282844
v -0.109065 6.836784 0.291693
v -0.018448 6.752057 0.282723
v -0.058940 6.755444 0.282903
v -0.095466 6.804674 0.290379
v -0.173220 6.900362 0.347991
v -0.126009 6.944621 0.381490
v -0.109921 7.125600 0.305865
v -0.137244 7.140258 0.396217
v -0.172429 7.133657 0.379328
v -0.102716 7.137161 0.399267
v -0.173875 7.106891 0.354524
v -0.138975 7.099473 0.370743
v -0.104375 7.102915 0.376257
v -0.208354 7.112424 0.311005
v -0.307288 7.139977 0.028707
v -0.311011 7.124434 0.078515
v -0.275444 7.023882 -0.014058
v -0.292115 7.059108 -0.039362
v -0.278916 6.941594 0.058514
v -0.288757 7.209593 0.139248
v -0.241749 7.276718 0.251895
v -0.190365 7.340688 0.338364
v -0.114031 7.345296 0.396400
v -0.247189 6.887936 0.032610
v -0.100203 6.690323 0.162182
v -0.142914 6.729382 0.114108
v -0.210767 6.811050 0.054051
v -0.065221 7.104819 0.380283
v -0.106300 7.057791 0.391677
v -0.064155 7.066566 0.418038
v -0.026057 7.086511 0.444399
v -0.183391 7.127373 0.361450
v -0.195712 7.141590 0.343612
v -0.215038 7.149475 0.337020
v -0.234318 7.174642 0.322630
v -0.117657 6.836085 0.367285
v -0.111581 6.839003 0.359775
v -0.111416 6.839094 0.363009
v -0.123268 6.828887 0.365133
v -0.186684 6.843313 0.312707
v -0.138679 6.756281 0.301524
v -0.083459 6.720790 0.340534
v -0.222096 6.851559 0.266677
v 0.188105 7.285319 0.348850
v 0.108064 7.293351 0.405669
v -0.011539 7.295164 0.433956
v -0.122948 7.297660 0.405138
v -0.199050 7.290346 0.347590
vn 0.022048 -0.545594 0.837760
vn 0.010303 -0.397089 0.917722
vn -0.160321 -0.403017 0.901041
vn -0.145894 -0.553500 0.819971
vn -0.326228 -0.397086 0.857845
vn -0.309667 -0.545586 0.778744
vn -0.001736 -0.237233 0.971451
vn -0.170031 -0.240674 0.955597
vn -0.333465 -0.237236 0.912426
vn -0.022055 -0.545589 0.837763
vn 0.145894 -0.553505 0.819968
vn 0.160320 -0.403021 0.901039
vn -0.010308 -0.397089 0.917722
vn 0.309673 -0.545598 0.778734
vn 0.326230 -0.397094 0.857841
vn 0.170028 -0.240679 0.955596
vn 0.001733 -0.237238 0.971450
vn 0.333463 -0.237239 0.912426
vn -0.446806 -0.717747 0.534045
vn -0.000001 -0.734164 0.678972
vn -0.000001 0.000000 1.000000
vn -0.639363 0.000000 0.768905
vn 0.446686 -0.717868 0.533983
vn 0.601598 -0.696134 0.391762
vn 0.839904 0.000000 0.542735
vn 0.639360 0.000000 0.768907
vn -0.601767 -0.695891 0.391934
vn -0.839906 0.000000 0.542732
vn -0.012203 -0.999875 0.010094
vn 0.000000 -1.000000 0.000000
vn -0.024404 -0.999498 0.020197
vn 0.011941 -0.999880 0.009889
vn 0.023879 -0.999520 0.019763
vn -0.441407 0.723438 0.530845
vn -0.639361 -0.000000 0.768906
vn -0.000000 -0.000000 1.000000
vn -0.000000 0.734163 0.678973
vn 0.441410 0.723444 0.530835
vn 0.639361 -0.000000 0.768907
vn 0.839904 -0.000000 0.542735
vn 0.593905 0.707111 0.383759
vn -0.593905 0.707111 0.383759
vn -0.839904 -0.000000 0.542735
vn 0.000000 1.000000 0.000002
vn 0.000000 1.000000 -0.000020
vn 0.000000 1.000000 0.000004
vn 0.000000 1.000000 -0.000018
vn 0.000000 1.000000 -0.000020
vn 0.879692 -0.442441 0.174320
vn 0.886986 -0.387289 0.251521
vn 0.816543 0.013876 0.577118
vn 0.919151 -0.081174 0.385452
vn 0.978435 -0.196309 0.064246
vn 0.857952 0.150846 0.491085
vn 0.967392 0.215562 0.132988
vn 0.314575 0.933878 0.170040
vn 0.709756 0.365889 0.601973
vn 0.405626 0.689548 -0.599993
vn 0.454794 -0.062552 -0.888397
vn 0.149663 -0.788614 -0.596397
vn -0.353943 0.917983 -0.178976
vn -0.282271 0.312942 -0.906858
vn -0.689214 -0.337400 -0.641206
vn 0.291992 -0.092254 0.951961
vn 0.376961 -0.121806 0.918185
vn 0.310698 0.142139 0.939821
vn 0.224053 0.413552 0.882482
vn 0.691181 0.027813 0.722146
vn 0.437325 0.133142 0.889393
vn 0.510242 -0.069699 0.857202
vn 0.750948 -0.155545 0.641781
vn 0.841850 0.054120 0.536991
vn 0.775702 -0.300281 0.555084
vn 0.563391 0.068371 0.823357
vn 0.573114 -0.023685 0.819133
vn 0.390619 -0.560909 0.729930
vn 0.360563 0.075741 0.929654
vn 0.000054 -0.522217 0.852813
vn -0.000035 0.079425 0.996841
vn 0.000042 0.105903 0.994376
vn 0.367487 0.057640 0.928241
vn -0.000010 0.062144 0.998067
vn -0.020718 -0.048722 0.998598
vn -0.092719 -0.940103 0.328038
vn 0.000313 -0.945582 0.325384
vn -0.493912 0.053884 0.867841
vn -0.656056 -0.689940 0.305899
vn -0.189387 -0.931160 0.311567
vn -0.934921 -0.145167 0.323804
vn 0.000151 0.953345 0.301884
vn -0.141394 0.946798 0.289105
vn -0.000267 -0.334458 0.942411
vn 0.000041 -0.521697 0.853131
vn 0.388948 -0.461176 0.797519
vn 0.439218 -0.158984 0.884201
vn -0.572648 0.784058 0.239431
vn -0.926101 0.340387 0.162708
vn 0.526380 -0.049247 0.848822
vn 0.640411 -0.242622 0.728703
vn 0.675076 -0.017070 0.737551
vn 0.673637 -0.100233 0.732234
vn 0.709811 -0.207119 0.673253
vn 0.779264 -0.228048 0.583731
vn 0.655895 -0.336726 0.675587
vn 0.756927 -0.296115 0.582561
vn 0.488795 -0.393602 0.778561
vn 0.599744 -0.310083 0.737669
vn 0.673568 -0.227601 0.703210
vn 0.400526 -0.215233 0.890648
vn 0.460695 -0.117035 0.879808
vn -0.000035 -0.153307 0.988179
vn 0.000009 -0.078966 0.996877
vn 0.584320 -0.310385 0.749821
vn 0.513008 0.228239 0.827484
vn 0.451972 -0.316156 0.834126
vn 0.000065 -0.465911 0.884831
vn 0.499227 -0.412497 0.761983
vn 0.000077 -0.941546 0.336884
vn 0.403364 -0.865450 0.297143
vn 0.611614 -0.769893 0.182191
vn 0.732921 -0.386832 0.559631
vn 0.672498 -0.737813 0.058129
vn 0.822468 -0.394259 0.410007
vn 0.317742 -0.436996 0.841471
vn 0.231857 -0.813867 0.532788
vn 0.427033 -0.704954 0.566288
vn 0.309092 -0.499943 0.809023
vn 0.360916 -0.103267 0.926863
vn 0.208474 -0.151334 0.966249
vn 0.222072 -0.565537 0.794262
vn 0.972391 0.107300 0.207227
vn 0.895848 -0.358404 0.262685
vn 0.822198 0.213664 0.527577
vn 0.671531 -0.414430 0.614242
vn 0.355707 -0.845276 0.398724
vn 0.000135 -0.905940 0.423407
vn 0.582198 -0.697153 0.418358
vn 0.000134 -0.816838 0.576868
vn 0.723862 0.054030 0.687826
vn 0.001234 -0.040837 0.999165
vn 0.691163 0.373650 0.618611
vn 0.002197 0.484120 0.874999
vn 0.725557 -0.480556 0.492578
vn 0.848786 0.171713 0.500078
vn 0.830187 0.257177 0.494621
vn 0.585243 0.036861 0.810019
vn 0.740435 0.122553 0.660861
vn 0.649629 0.280975 0.706424
vn 0.001176 0.425765 0.904833
vn 0.693405 0.252795 0.674747
vn 0.629678 0.308798 0.712846
vn 0.000001 0.434806 0.900524
vn 0.509600 0.272626 0.816078
vn 0.000000 -0.019450 0.999811
vn -0.000000 0.082259 0.996611
vn 0.481929 -0.003698 0.876203
vn 0.317966 0.022325 0.947839
vn 0.320983 0.441042 0.838124
vn 0.531818 0.337710 0.776609
vn 0.592067 0.106591 0.798808
vn 0.463030 0.513977 0.722102
vn 0.750221 -0.218292 0.624114
vn 0.619263 -0.272499 0.736382
vn 0.419243 0.454782 0.785754
vn 0.518010 -0.359022 0.776382
vn 0.350211 -0.724090 0.594176
vn 0.668682 -0.470427 0.575815
vn 0.598065 -0.595664 0.536192
vn 0.902727 -0.084634 0.421807
vn 0.775592 -0.146140 0.614085
vn 0.718422 -0.104228 0.687755
vn 0.891038 -0.163824 0.423335
vn 0.956664 -0.004112 0.291164
vn 0.933029 0.109174 0.342837
vn 0.715883 0.063425 0.695334
vn 0.767010 0.229587 0.599154
vn 0.351117 0.245371 0.903610
vn 0.000000 0.222992 0.974820
vn 0.919947 0.165665 0.355321
vn 0.958931 -0.019310 0.282980
vn 0.768169 0.247604 0.590431
vn 0.388322 0.234843 0.891097
vn 0.000000 0.169240 0.985575
vn 0.921676 -0.120626 0.368732
vn 0.965203 -0.097925 0.242473
vn 0.846351 -0.239521 0.475731
vn 0.921223 -0.207368 0.329160
vn 0.742873 -0.665451 -0.072902
vn 0.898487 -0.384676 0.211532
vn 0.804315 -0.519481 -0.288474
vn 0.947918 -0.315344 0.044822
vn 0.806939 -0.420240 -0.415028
vn 0.961695 -0.177312 0.209051
vn 0.000307 -0.462142 0.886806
vn 0.334570 -0.459055 0.823001
vn 0.367194 -0.539536 0.757674
vn 0.482800 -0.703027 0.522166
vn 0.319665 -0.944475 -0.076042
vn 0.409143 -0.899545 -0.153038
vn 0.000026 -0.991326 -0.131426
vn 0.000005 -0.976256 -0.216620
vn 0.581155 -0.775746 -0.245921
vn 0.650773 -0.608990 -0.453460
vn 0.000470 -0.994099 0.108478
vn 0.095129 -0.987684 0.124223
vn -0.000785 -0.997222 0.074485
vn -0.119563 -0.992438 0.027772
vn 0.112492 -0.740587 0.662478
vn 0.119829 0.932072 0.341881
vn -0.000244 0.874990 0.484140
vn -0.170454 0.969410 0.176607
vn -0.019060 -0.081937 0.996455
vn -0.858405 0.364141 0.361307
vn -0.680669 -0.680690 0.270833
vn 0.267529 -0.381639 0.884749
vn 0.246206 -0.422760 0.872156
vn 0.449001 -0.482167 0.752272
vn 0.483809 -0.739651 0.467809
vn 0.265350 0.319144 0.909800
vn -0.879692 -0.442441 0.174324
vn -0.919151 -0.081174 0.385452
vn -0.816543 0.013876 0.577118
vn -0.886986 -0.387288 0.251525
vn -0.857953 0.150846 0.491083
vn -0.978435 -0.196309 0.064244
vn -0.967393 0.215562 0.132983
vn -0.709756 0.365888 0.601974
vn -0.314575 0.933878 0.170041
vn -0.405624 0.689549 -0.599993
vn -0.454793 -0.062551 -0.888398
vn -0.149662 -0.788616 -0.596394
vn 0.353944 0.917983 -0.178971
vn 0.282272 0.312945 -0.906856
vn 0.689214 -0.337400 -0.641206
vn -0.279054 -0.083801 0.956612
vn -0.222381 0.427081 0.876441
vn -0.310067 0.156397 0.937762
vn -0.369708 -0.113902 0.922140
vn -0.691843 0.024258 0.721640
vn -0.750819 -0.155555 0.641930
vn -0.509877 -0.070106 0.857386
vn -0.438552 0.127147 0.889666
vn -0.840152 0.053498 0.539706
vn -0.572896 -0.025396 0.819234
vn -0.564322 0.067503 0.822791
vn -0.781898 -0.296059 0.548621
vn -0.361167 0.076286 0.929376
vn -0.397401 -0.559242 0.727544
vn -0.368014 0.058147 0.928000
vn 0.091229 -0.940265 0.327991
vn 0.017510 -0.050728 0.998559
vn 0.227915 -0.973618 -0.011062
vn 0.543455 -0.676657 0.496781
vn 0.492456 0.052012 0.868782
vn 0.934616 -0.145654 0.324464
vn 0.141469 0.946767 0.289168
vn -0.442529 -0.153535 0.883513
vn -0.391149 -0.460558 0.796799
vn 0.575334 0.781549 0.241188
vn 0.927438 0.334428 0.167379
vn -0.674763 -0.017747 0.737821
vn -0.641971 -0.240456 0.728049
vn -0.528437 -0.047829 0.847624
vn -0.672872 -0.101219 0.732801
vn -0.778657 -0.228425 0.584393
vn -0.709140 -0.207224 0.673928
vn -0.756362 -0.295828 0.583441
vn -0.654889 -0.337496 0.676179
vn -0.488305 -0.394539 0.778394
vn -0.673573 -0.225900 0.703753
vn -0.600190 -0.308951 0.737781
vn -0.461103 -0.115726 0.879768
vn -0.401991 -0.213712 0.890354
vn -0.584818 -0.310751 0.749281
vn -0.506379 0.240979 0.827955
vn -0.449744 -0.319158 0.834187
vn -0.499338 -0.412242 0.762049
vn -0.403455 -0.865411 0.297132
vn -0.733023 -0.386347 0.559834
vn -0.611749 -0.769774 0.182242
vn -0.822418 -0.394144 0.410218
vn -0.672506 -0.737799 0.058202
vn -0.319067 -0.435707 0.841639
vn -0.304273 -0.502500 0.809266
vn -0.427761 -0.706081 0.564332
vn -0.231857 -0.813865 0.532791
vn -0.208474 -0.151335 0.966249
vn -0.360917 -0.103268 0.926863
vn -0.213058 -0.568469 0.794638
vn -0.900271 -0.351921 0.256248
vn -0.970976 0.107933 0.213439
vn -0.678123 -0.410935 0.609329
vn -0.820817 0.212073 0.530362
vn -0.356473 -0.844873 0.398894
vn -0.583119 -0.696549 0.418081
vn -0.723207 0.051803 0.688686
vn -0.690455 0.372359 0.620178
vn -0.849492 0.168418 0.500000
vn -0.726365 -0.479506 0.492411
vn -0.829467 0.255487 0.496700
vn -0.585127 0.036508 0.810119
vn -0.740344 0.123176 0.660846
vn -0.648597 0.282260 0.706861
vn -0.629667 0.308821 0.712846
vn -0.693057 0.252518 0.675209
vn -0.509618 0.269581 0.817078
vn -0.481929 -0.003699 0.876203
vn -0.321302 0.031723 0.946445
vn -0.592221 0.104653 0.798950
vn -0.535464 0.329792 0.777506
vn -0.324689 0.432529 0.841128
vn -0.464407 0.509876 0.724122
vn -0.421160 0.459113 0.782202
vn -0.626257 -0.263105 0.733879
vn -0.753056 -0.216425 0.621343
vn -0.350212 -0.724089 0.594177
vn -0.518190 -0.358017 0.776726
vn -0.597479 -0.596384 0.536046
vn -0.672589 -0.465642 0.575153
vn -0.775703 -0.149262 0.613193
vn -0.902770 -0.084756 0.421691
vn -0.718423 -0.104229 0.687754
vn -0.891039 -0.163824 0.423333
vn -0.933030 0.109173 0.342837
vn -0.956664 -0.004112 0.291164
vn -0.716874 0.062260 0.694417
vn -0.351116 0.245371 0.903610
vn -0.767010 0.229586 0.599154
vn -0.919948 0.165665 0.355319
vn -0.958931 -0.019310 0.282980
vn -0.388322 0.234843 0.891098
vn -0.768169 0.247604 0.590431
vn -0.965203 -0.097925 0.242473
vn -0.921676 -0.120626 0.368733
vn -0.921222 -0.207369 0.329163
vn -0.846310 -0.239542 0.475793
vn -0.898486 -0.384675 0.211540
vn -0.742876 -0.665449 -0.072896
vn -0.947918 -0.315344 0.044823
vn -0.804315 -0.519482 -0.288473
vn -0.806939 -0.420240 -0.415027
vn -0.961695 -0.177312 0.209052
vn -0.335451 -0.460795 0.821670
vn -0.481244 -0.704862 0.521128
vn -0.364897 -0.544200 0.755445
vn -0.409158 -0.899543 -0.153011
vn -0.319745 -0.944449 -0.076023
vn -0.581155 -0.775746 -0.245921
vn -0.650773 -0.608990 -0.453460
vn -0.097491 -0.987781 0.121589
vn 0.127757 -0.991416 0.027793
vn 0.006775 -0.997483 0.070584
vn -0.119501 -0.756376 0.643129
vn -0.119651 0.934561 0.335080
vn 0.186858 0.968480 0.164717
vn 0.876250 0.338698 0.342739
vn 0.030658 -0.108750 0.993596
vn 0.665721 -0.700338 0.257568
vn -0.262131 -0.380532 0.886839
vn -0.443432 -0.479097 0.757518
vn -0.248473 -0.421612 0.872069
vn -0.484243 -0.734987 0.474661
vn -0.266760 0.331940 0.904796
vn 0.770122 0.251640 0.586165
vn 0.413097 0.237790 0.879094
vn 0.000000 0.181534 0.983385
vn -0.413097 0.237790 0.879094
vn -0.770123 0.251640 0.586163
vt 0.703981 0.470478
vt 0.696989 0.501146
vt 0.734650 0.501146
vt 0.734650 0.463485
vt 0.772312 0.501146
vt 0.765320 0.470478
vt 0.703981 0.531815
vt 0.734650 0.538808
vt 0.765320 0.531815
vt 0.703981 0.470478
vt 0.734650 0.463485
vt 0.734650 0.501146
vt 0.696989 0.501146
vt 0.765320 0.470478
vt 0.772312 0.501146
vt 0.734650 0.538808
vt 0.703981 0.531815
vt 0.765320 0.531815
vt 0.079122 0.299241
vt 0.126037 0.299241
vt 0.126037 0.332565
vt 0.079611 0.332565
vt 0.172952 0.299241
vt 0.213104 0.299241
vt 0.213104 0.332565
vt 0.172463 0.332565
vt 0.038970 0.299241
vt 0.038970 0.332565
vt 0.079122 0.296075
vt 0.126037 0.296238
vt 0.038970 0.296321
vt 0.172952 0.296075
vt 0.213104 0.296190
vt 0.079022 0.268064
vt 0.079022 0.237894
vt 0.126035 0.237894
vt 0.126035 0.268065
vt 0.173049 0.268065
vt 0.173049 0.237894
vt 0.211250 0.237894
vt 0.211250 0.268065
vt 0.040821 0.268065
vt 0.040821 0.237893
vt 0.079022 0.274350
vt 0.040821 0.274346
vt 0.126035 0.274285
vt 0.173049 0.274351
vt 0.211250 0.274346
vt 0.658220 0.592910
vt 0.689550 0.629900
vt 0.679410 0.724090
vt 0.658710 0.734460
vt 0.742900 0.677260
vt 0.709750 0.737730
vt 0.736760 0.712170
vt 0.714620 0.752770
vt 0.680940 0.752530
vt 0.744180 0.728550
vt 0.767480 0.676310
vt 0.692180 0.606800
vt 0.724220 0.765850
vt 0.794570 0.710790
vt 0.749190 0.606730
vt 0.778780 0.638210
vt 0.395530 0.771210
vt 0.380150 0.767630
vt 0.407640 0.751490
vt 0.411130 0.761260
vt 0.487470 0.707000
vt 0.446300 0.705620
vt 0.443660 0.672990
vt 0.486240 0.645890
vt 0.396280 0.648390
vt 0.381550 0.620950
vt 0.399550 0.596220
vt 0.421560 0.629150
vt 0.353360 0.613200
vt 0.359130 0.599730
vt 0.332560 0.610500
vt 0.332560 0.598590
vt 0.332560 0.583610
vt 0.359560 0.587500
vt 0.652740 0.327150
vt 0.668730 0.327000
vt 0.670570 0.391830
vt 0.653190 0.393670
vt 0.692530 0.328380
vt 0.699840 0.371940
vt 0.688050 0.383040
vt 0.728970 0.332190
vt 0.652460 0.269930
vt 0.676520 0.273880
vt 0.332560 0.520820
vt 0.332560 0.500640
vt 0.361030 0.501700
vt 0.362070 0.523860
vt 0.700400 0.291230
vt 0.728160 0.318550
vt 0.388700 0.573550
vt 0.413750 0.560970
vt 0.432010 0.582360
vt 0.455250 0.605310
vt 0.447170 0.552590
vt 0.472710 0.561550
vt 0.439850 0.527740
vt 0.454540 0.504850
vt 0.433810 0.548640
vt 0.402930 0.502050
vt 0.410330 0.479870
vt 0.360710 0.482670
vt 0.361460 0.466570
vt 0.332560 0.480440
vt 0.332560 0.464180
vt 0.398230 0.520260
vt 0.398520 0.534300
vt 0.427100 0.537060
vt 0.332560 0.443110
vt 0.363860 0.441400
vt 0.332560 0.412850
vt 0.363890 0.413690
vt 0.411960 0.424200
vt 0.414120 0.457290
vt 0.470370 0.438900
vt 0.466410 0.479210
vt 0.431030 0.807980
vt 0.428010 0.826510
vt 0.389210 0.817690
vt 0.404660 0.805340
vt 0.423380 0.855240
vt 0.369470 0.844330
vt 0.407580 0.785250
vt 0.383900 0.647230
vt 0.378790 0.633690
vt 0.372370 0.662250
vt 0.365540 0.639510
vt 0.346070 0.630780
vt 0.332560 0.626870
vt 0.345280 0.653120
vt 0.332560 0.653000
vt 0.346580 0.671320
vt 0.332560 0.673520
vt 0.346550 0.691830
vt 0.332560 0.693580
vt 0.354630 0.642640
vt 0.362950 0.669050
vt 0.373320 0.682690
vt 0.405680 0.689510
vt 0.376790 0.708530
vt 0.348650 0.727570
vt 0.332560 0.728650
vt 0.374080 0.737770
vt 0.348140 0.757070
vt 0.332560 0.760660
vt 0.406850 0.718650
vt 0.332560 0.844450
vt 0.332560 0.789480
vt 0.350730 0.783910
vt 0.441960 0.746670
vt 0.443970 0.733260
vt 0.484520 0.736510
vt 0.473840 0.751850
vt 0.404490 0.738320
vt 0.502560 0.775840
vt 0.484370 0.777650
vt 0.466640 0.765010
vt 0.462390 0.807330
vt 0.470770 0.824940
vt 0.487490 0.795630
vt 0.503450 0.807500
vt 0.539650 0.771590
vt 0.522480 0.773520
vt 0.481550 0.851180
vt 0.515770 0.822090
vt 0.583000 0.802270
vt 0.542790 0.874410
vt 0.364510 0.770780
vt 0.489930 0.895550
vt 0.426910 0.897430
vt 0.332560 0.890330
vt 0.569680 0.926400
vt 0.614580 0.835600
vt 0.494320 0.971850
vt 0.420760 0.971280
vt 0.332560 0.961020
vt 0.542090 0.684690
vt 0.587330 0.720290
vt 0.502290 0.576840
vt 0.537240 0.599620
vt 0.536470 0.475210
vt 0.528310 0.515150
vt 0.598210 0.520450
vt 0.596860 0.555910
vt 0.640470 0.551960
vt 0.643170 0.606640
vt 0.592460 0.612340
vt 0.636380 0.756350
vt 0.332560 0.567290
vt 0.354750 0.570090
vt 0.383990 0.558360
vt 0.405660 0.551230
vt 0.397740 0.388670
vt 0.468210 0.374600
vt 0.332560 0.363100
vt 0.396730 0.328400
vt 0.527390 0.415420
vt 0.607340 0.492620
vt 0.332560 0.542090
vt 0.356510 0.545740
vt 0.384950 0.545900
vt 0.407720 0.545530
vt 0.421830 0.545440
vt 0.362040 0.543070
vt 0.332560 0.539420
vt 0.393650 0.543760
vt 0.420690 0.541060
vt 0.418630 0.542640
vt 0.691910 0.456710
vt 0.653430 0.465670
vt 0.759490 0.381080
vt 0.740790 0.417720
vt 0.418770 0.543530
vt 0.652250 0.213810
vt 0.708060 0.231840
vt 0.755870 0.296600
vt 0.761610 0.340920
vt 0.654040 0.774240
vt 0.438370 0.774920
vt 0.432160 0.793770
vt 0.461500 0.791660
vt 0.471830 0.788820
vt 0.439280 0.759350
vt 0.761580 0.343630
vt 0.783960 0.775530
vt 0.783470 0.917070
vt 0.762770 0.906700
vt 0.752630 0.812520
vt 0.732430 0.920340
vt 0.699280 0.859880
vt 0.705420 0.894780
vt 0.761240 0.935150
vt 0.727560 0.935390
vt 0.698000 0.911170
vt 0.674690 0.858930
vt 0.750000 0.789420
vt 0.717960 0.948470
vt 0.647610 0.893410
vt 0.663400 0.820820
vt 0.692990 0.789350
vt 0.269590 0.771210
vt 0.253990 0.761260
vt 0.257480 0.751490
vt 0.284970 0.767630
vt 0.177650 0.707000
vt 0.178870 0.645890
vt 0.221450 0.672990
vt 0.218820 0.705620
vt 0.268840 0.648390
vt 0.243550 0.629150
vt 0.265560 0.596220
vt 0.283560 0.620950
vt 0.305990 0.599730
vt 0.311760 0.613200
vt 0.305560 0.587500
vt 0.635780 0.392120
vt 0.636740 0.327280
vt 0.618170 0.383580
vt 0.606250 0.372610
vt 0.612990 0.328970
vt 0.576620 0.333110
vt 0.628450 0.274210
vt 0.303050 0.523860
vt 0.304080 0.501700
vt 0.604750 0.291840
vt 0.577310 0.319460
vt 0.233110 0.582360
vt 0.251370 0.560970
vt 0.276420 0.573550
vt 0.209870 0.605310
vt 0.192400 0.561550
vt 0.217950 0.552590
vt 0.210580 0.504850
vt 0.225260 0.527740
vt 0.231300 0.548640
vt 0.254780 0.479870
vt 0.262180 0.502050
vt 0.303650 0.466570
vt 0.304410 0.482670
vt 0.266890 0.520260
vt 0.266600 0.534300
vt 0.238010 0.537060
vt 0.301260 0.441400
vt 0.301220 0.413690
vt 0.250990 0.457290
vt 0.253160 0.424200
vt 0.198710 0.479210
vt 0.194740 0.438900
vt 0.234090 0.807980
vt 0.260450 0.805340
vt 0.275900 0.817690
vt 0.237110 0.826510
vt 0.295650 0.844330
vt 0.241730 0.855240
vt 0.257540 0.785250
vt 0.286320 0.633690
vt 0.281210 0.647230
vt 0.299570 0.639510
vt 0.292750 0.662250
vt 0.319050 0.630780
vt 0.319830 0.653120
vt 0.318540 0.671320
vt 0.318570 0.691830
vt 0.302160 0.669050
vt 0.310480 0.642640
vt 0.291800 0.682690
vt 0.259440 0.689510
vt 0.288320 0.708530
vt 0.316470 0.727570
vt 0.316980 0.757070
vt 0.291030 0.737770
vt 0.258270 0.718650
vt 0.314380 0.783910
vt 0.223160 0.746670
vt 0.191280 0.751850
vt 0.180600 0.736510
vt 0.221150 0.733260
vt 0.260620 0.738320
vt 0.198470 0.765010
vt 0.180740 0.777650
vt 0.162550 0.775840
vt 0.194350 0.824940
vt 0.202720 0.807330
vt 0.161660 0.807500
vt 0.177620 0.795630
vt 0.142630 0.773520
vt 0.125460 0.771590
vt 0.183570 0.851180
vt 0.149350 0.822090
vt 0.122330 0.874410
vt 0.082110 0.802270
vt 0.300600 0.770780
vt 0.238210 0.897430
vt 0.175180 0.895550
vt 0.095430 0.926400
vt 0.050540 0.835600
vt 0.244360 0.971280
vt 0.170800 0.971850
vt 0.077790 0.720290
vt 0.123020 0.684690
vt 0.127880 0.599620
vt 0.162830 0.576840
vt 0.136800 0.515150
vt 0.128640 0.475210
vt 0.068260 0.555910
vt 0.066900 0.520450
vt 0.021940 0.606640
vt 0.024640 0.551960
vt 0.072650 0.612340
vt 0.028740 0.756350
vt 0.310370 0.570090
vt 0.259460 0.551230
vt 0.281120 0.558360
vt 0.196910 0.374600
vt 0.267380 0.388670
vt 0.268390 0.328400
vt 0.137730 0.415420
vt 0.057770 0.492620
vt 0.308600 0.545740
vt 0.257390 0.545530
vt 0.280160 0.545900
vt 0.243280 0.545440
vt 0.303080 0.543070
vt 0.271460 0.543760
vt 0.246490 0.542640
vt 0.244430 0.541060
vt 0.614850 0.457100
vt 0.546570 0.382130
vt 0.565620 0.418590
vt 0.246350 0.543530
vt 0.596610 0.232370
vt 0.549400 0.297600
vt 0.544040 0.342000
vt 0.011070 0.774240
vt 0.226740 0.774920
vt 0.203620 0.791660
vt 0.232960 0.793770
vt 0.193290 0.788820
vt 0.225840 0.759350
vt 0.544080 0.344710
vt 0.491463 0.922200
vt 0.425196 0.918011
vt 0.332560 0.916143
vt 0.239924 0.918011
vt 0.173650 0.922200
g face Meshes base_ma_Rig
f 1/1/1 4/2/2 5/3/3 2/4/4
f 2/4/4 5/3/3 6/5/5 3/6/6
f 4/2/2 7/7/7 8/8/8 5/3/3
f 5/3/3 8/8/8 9/9/9 6/5/5
f 10/10/10 11/11/11 14/12/12 13/13/13
f 11/11/11 12/14/14 15/15/15 14/12/12
f 13/13/13 14/12/12 17/16/16 16/17/17
f 14/12/12 15/15/15 18/18/18 17/16/16
f 19/19/19 28/20/20 27/21/21 21/22/22
f 20/23/23 26/24/24 24/25/25 22/26/26
f 25/27/27 19/19/19 21/22/22 23/28/28
f 27/21/21 28/20/20 20/23/23 22/26/26
f 28/20/20 19/19/19 31/29/29 30/30/30
f 19/19/19 25/27/27 29/31/31 31/29/29
f 26/24/24 20/23/23 33/32/32 32/33/33
f 20/23/23 28/20/20 30/30/30 33/32/32
f 34/34/34 36/35/35 42/36/36 43/37/37
f 35/38/38 37/39/39 39/40/40 41/41/41
f 40/42/42 38/43/43 36/35/35 34/34/34
f 42/36/36 37/39/39 35/38/38 43/37/37
f 40/42/42 34/34/34 45/44/44 44/45/45
f 34/34/34 43/37/37 46/46/46 45/44/44
f 43/37/37 35/38/38 47/47/47 46/46/46
f 35/38/38 41/41/41 48/48/48 47/47/47
f 195/49/49 77/50/50 76/51/51 78/52/52
f 77/50/50 79/53/53 80/54/54 76/51/51
f 81/55/55 80/54/54 79/53/53
f 80/54/54 82/56/56 192/57/57 76/51/51
f 192/57/57 78/52/52 76/51/51
f 81/55/55 83/58/58 82/56/56 80/54/54
f 79/53/53 84/59/59 83/58/58 81/55/55
f 77/50/50 85/60/60 84/59/59 79/53/53
f 195/49/49 85/60/60 77/50/50
f 192/57/57 82/56/56 191/61/61
f 83/58/58 84/59/59 194/62/62
f 85/60/60 193/63/63 194/64/62 84/59/59
f 195/49/49 193/63/63 85/60/60
f 191/61/61 82/56/56 83/58/58 194/62/62
f 88/65/64 204/66/65 87/67/66 189/68/67
f 147/69/68 146/70/69 89/71/70 148/72/71
f 91/73/72 92/74/73 93/75/74 182/76/75
f 92/74/73 94/77/76 95/78/77 93/75/74
f 94/77/76 50/79/78 49/80/79 95/78/77
f 49/80/79 51/81/80 96/82/81 95/78/77
f 70/83/82 172/84/83 173/85/84 71/86/85
f 172/84/83 174/87/86 175/88/87 176/89/88
f 172/84/83 176/89/88 173/85/84
f 177/90/89 175/88/87 174/87/86
f 72/91/90 178/92/91 172/84/83 70/83/82
f 53/93/92 54/94/93 101/95/94 100/96/95
f 178/92/91 179/97/96 174/87/86 172/84/83
f 177/90/89 174/87/86 179/97/96 180/98/97
f 93/75/74 164/99/98 103/100/99 104/101/100
f 181/102/101 104/101/100 105/103/102 216/104/103
f 105/103/102 106/105/104 217/106/105 216/104/103
f 104/101/100 103/100/99 99/107/106 105/103/102
f 106/105/104 107/108/107 218/109/108 217/106/105
f 107/108/107 108/110/109 109/111/110 218/109/108
f 108/110/109 56/112/111 55/113/112 109/111/110
f 101/95/94 54/94/93 56/112/111 108/110/109
f 108/110/109 107/108/107 110/114/113 101/95/94
f 102/115/114 100/96/95 101/95/94 110/114/113
f 110/114/113 107/108/107 106/105/104 215/116/115
f 55/113/112 57/117/116 111/118/117 109/111/110
f 57/117/116 58/119/118 112/120/119 111/118/117
f 112/120/119 113/121/120 114/122/121 111/118/117
f 113/121/120 115/123/122 116/124/123 114/122/121
f 217/106/105 218/109/108 114/122/121 116/124/123
f 218/109/108 109/111/110 111/118/117 114/122/121
f 117/125/124 118/126/125 119/127/126 120/128/127
f 118/126/125 121/129/128 122/130/129 119/127/126
f 120/128/127 204/66/65 88/65/64 186/131/130
f 91/73/72 124/132/131 125/133/132 92/74/73
f 124/132/131 126/134/133 127/135/134 125/133/132
f 94/77/76 128/136/135 59/137/136 50/79/78
f 128/136/135 129/138/137 60/139/138 59/137/136
f 129/138/137 130/140/139 61/141/140 60/139/138
f 130/140/139 131/142/141 62/143/142 61/141/140
f 129/138/137 132/144/143 133/145/144 130/140/139
f 132/144/143 127/135/134 126/134/133 133/145/144
f 126/134/133 124/132/131 91/73/72 134/146/145
f 130/140/139 133/145/144 131/142/141
f 90/147/146 135/148/147 134/146/145 91/73/72
f 131/142/141 134/146/145 135/148/147 136/149/148
f 131/142/141 133/145/144 134/146/145
f 63/150/149 62/143/142 131/142/141 136/149/148
f 126/134/133 134/146/145 133/145/144
f 136/149/148 135/148/147 206/151/150 207/152/151
f 64/153/152 63/150/149 136/149/148 207/152/151
f 206/151/150 135/148/147 90/147/146 205/154/153
f 128/136/135 132/144/143 129/138/137
f 132/144/143 128/136/135 94/77/76 127/135/134
f 125/133/132 127/135/134 94/77/76 92/74/73
f 66/155/154 65/156/155 137/157/156 122/130/129
f 138/158/157 139/159/158 140/160/159 141/161/160
f 87/67/66 86/162/161 139/159/158 138/158/157
f 141/161/160 190/163/162 143/164/163 187/165/164
f 117/125/124 144/166/165 145/167/166 118/126/125
f 144/166/165 209/168/167 210/169/168 145/167/166
f 139/159/158 146/70/69 147/69/68 140/160/159
f 146/70/69 205/154/153 90/147/146 89/71/70
f 89/71/70 90/147/146 91/73/72 182/76/75
f 147/69/68 150/170/169 142/171/170 140/160/159
f 145/167/166 149/172/171 121/129/128 118/126/125
f 210/169/168 211/173/172 149/172/171 145/167/166
f 150/170/169 154/174/173 153/175/174 211/173/172
f 137/157/156 123/176/175 119/127/126 122/130/129
f 149/172/171 151/177/176 152/178/177 121/129/128
f 67/179/178 122/130/129 121/129/128 152/178/177
f 197/180/179 153/175/174 154/174/173 196/181/180
f 151/177/176 149/172/171 211/173/172 153/175/174
f 151/177/176 364/389/181 365/390/182 152/178/177
f 151/177/176 153/175/174 197/180/179 364/389/181
f 365/390/182 366/391/183 67/179/178 152/178/177
f 150/170/169 155/185/184 156/186/185 154/174/173
f 148/72/71 155/185/184 150/170/169 147/69/68
f 155/185/184 148/72/71 219/187/186 159/188/187
f 104/101/100 181/102/101 182/76/75 93/75/74
f 216/104/103 217/106/105 116/124/123 219/187/186
f 115/123/122 157/189/188 158/190/189 116/124/123
f 158/190/189 159/188/187 219/187/186 116/124/123
f 157/189/188 160/191/190 161/192/191 158/190/189
f 161/192/191 160/191/190 200/193/192 195/194/49
f 158/190/189 161/192/191 162/195/193 159/188/187
f 161/192/191 195/194/49 162/195/193
f 155/185/184 159/188/187 162/195/193 156/186/185
f 156/186/185 162/195/193 195/194/49 78/196/52
f 78/196/52 196/181/180 154/174/173 156/186/185
f 96/82/81 51/81/80 52/197/194 97/198/195
f 103/100/99 164/99/98 165/199/196 98/200/197
f 113/121/120 163/201/198 201/202/199 115/123/122
f 163/201/198 68/203/200 75/204/201 201/202/199
f 58/119/118 68/203/200 163/201/198 112/120/119
f 112/120/119 163/201/198 113/121/120
f 115/123/122 201/202/199 202/205/202 157/189/188
f 157/189/188 202/205/202 203/206/203 160/191/190
f 203/206/203 200/193/192 160/191/190
f 122/130/129 67/179/178 66/155/154
f 93/75/74 95/78/77 96/82/81 164/99/98
f 165/199/196 164/99/98 96/82/81 97/198/195
f 97/198/195 52/197/194 69/207/204 166/208/205
f 98/200/197 165/199/196 168/209/206 167/210/207
f 98/200/197 169/211/208 99/107/106 103/100/99
f 53/93/92 100/96/95 170/212/209 73/213/210
f 100/96/95 102/115/114 171/214/211 170/212/209
f 102/115/114 212/215/212 213/216/213 171/214/211
f 165/199/196 97/198/195 166/208/205 168/209/206
f 166/217/205 69/218/204 71/86/85 173/85/84
f 167/219/207 168/220/206 176/89/88 175/88/87
f 167/210/207 214/221/214 169/211/208 98/200/197
f 73/222/210 170/223/209 178/92/91 72/91/90
f 170/223/209 171/224/211 179/97/96 178/92/91
f 171/224/211 213/225/213 180/98/97 179/97/96
f 168/220/206 166/217/205 173/85/84 176/89/88
f 196/181/180 78/196/52 192/226/57
f 148/72/71 181/102/101 216/104/103 219/187/186
f 182/76/75 181/102/101 148/72/71 89/71/70
f 186/131/130 88/65/64 183/227/215
f 183/227/215 88/65/64 189/68/67
f 144/166/165 117/125/124 184/228/216 185/229/217
f 185/229/217 184/228/216 183/227/215
f 209/168/167 144/166/165 185/229/217 208/230/218
f 208/230/218 185/229/217 183/227/215
f 117/125/124 120/128/127 186/131/130 184/228/216
f 183/227/215 184/228/216 186/131/130
f 138/158/157 141/161/160 187/165/164 188/231/219
f 188/231/219 187/165/164 183/227/215
f 183/227/215 187/165/164 143/164/163
f 87/67/66 138/158/157 188/231/219 189/68/67
f 189/68/67 188/231/219 183/227/215
f 141/161/160 140/160/159 142/171/170 190/163/162
f 120/128/127 119/127/126 123/176/175 204/66/65
f 86/162/161 87/67/66 204/66/65 123/176/175
f 86/162/161 205/154/153 146/70/69 139/159/158
f 123/176/175 206/151/150 205/154/153 86/162/161
f 207/152/151 206/151/150 123/176/175 137/157/156
f 64/153/152 207/152/151 137/157/156 65/156/155
f 143/164/163 208/230/218 183/227/215
f 190/163/162 209/168/167 208/230/218 143/164/163
f 210/169/168 209/168/167 190/163/162 142/171/170
f 142/171/170 150/170/169 211/173/172 210/169/168
f 99/107/106 215/116/115 106/105/104 105/103/102
f 169/211/208 214/221/214 213/216/213 212/215/212
f 214/232/214 167/219/207 175/88/87 177/90/89
f 180/98/97 213/225/213 214/232/214 177/90/89
f 212/215/212 215/116/115 99/107/106 169/211/208
f 110/114/113 215/116/115 212/215/212 102/115/114
f 339/233/220 222/234/221 220/235/222 221/236/223
f 221/236/223 220/235/222 224/237/224 223/238/225
f 225/239/226 223/238/225 224/237/224
f 224/237/224 220/235/222 336/240/227 226/241/228
f 336/240/227 220/235/222 222/234/221
f 225/239/226 224/237/224 226/241/228 227/242/229
f 223/238/225 225/239/226 227/242/229 228/243/230
f 221/236/223 223/238/225 228/243/230 229/244/231
f 339/233/220 221/236/223 229/244/231
f 336/240/227 335/245/232 226/241/228
f 227/242/229 338/246/233 228/243/230
f 229/244/231 228/243/230 338/247/233 337/248/234
f 339/233/220 229/244/231 337/248/234
f 335/245/232 338/246/233 227/242/229 226/241/228
f 232/249/235 333/250/236 231/251/237 348/252/238
f 291/253/239 292/254/240 233/255/241 290/256/242
f 235/257/243 326/258/244 237/259/245 236/260/246
f 236/260/246 237/259/245 239/261/247 238/262/248
f 238/262/248 239/261/247 49/80/79 50/79/78
f 49/80/79 239/261/247 240/263/249 51/81/80
f 70/83/82 71/86/85 317/264/250 316/265/251
f 316/265/251 317/264/250 320/266/252 319/267/253
f 316/265/251 319/267/253 318/268/254
f 321/269/255 318/268/254 319/267/253
f 72/91/90 70/83/82 316/265/251 322/270/256
f 53/93/92 244/271/257 245/272/258 54/94/93
f 322/270/256 316/265/251 318/268/254 323/273/259
f 321/269/255 324/274/260 323/273/259 318/268/254
f 237/259/245 248/275/261 247/276/262 308/277/263
f 325/278/264 360/279/265 249/280/266 248/275/261
f 249/280/266 360/279/265 361/281/267 250/282/268
f 248/275/261 249/280/266 243/283/269 247/276/262
f 250/282/268 361/281/267 362/284/270 251/285/271
f 251/285/271 362/284/270 253/286/272 252/287/273
f 252/287/273 253/286/272 55/113/112 56/112/111
f 245/272/258 252/287/273 56/112/111 54/94/93
f 252/287/273 245/272/258 254/288/274 251/285/271
f 246/289/275 254/288/274 245/272/258 244/271/257
f 254/288/274 359/290/276 250/282/268 251/285/271
f 55/113/112 253/286/272 255/291/277 57/117/116
f 57/117/116 255/291/277 256/292/278 58/119/118
f 256/292/278 255/291/277 258/293/279 257/294/280
f 257/294/280 258/293/279 260/295/281 259/296/282
f 361/281/267 260/295/281 258/293/279 362/284/270
f 362/284/270 258/293/279 255/291/277 253/286/272
f 261/297/283 264/298/284 263/299/285 262/300/286
f 262/300/286 263/299/285 266/301/287 265/302/288
f 264/298/284 330/303/289 232/249/235 348/252/238
f 235/257/243 236/260/246 269/304/290 268/305/291
f 268/305/291 269/304/290 271/306/292 270/307/293
f 238/262/248 50/79/78 59/137/136 272/308/294
f 272/308/294 59/137/136 60/139/138 273/309/295
f 273/309/295 60/139/138 61/141/140 274/310/296
f 274/310/296 61/141/140 62/143/142 275/311/297
f 273/309/295 274/310/296 277/312/298 276/313/299
f 276/313/299 277/312/298 270/307/293 271/306/292
f 270/307/293 278/314/300 235/257/243 268/305/291
f 274/310/296 275/311/297 277/312/298
f 234/315/301 235/257/243 278/314/300 279/316/302
f 275/311/297 280/317/303 279/316/302 278/314/300
f 275/311/297 278/314/300 277/312/298
f 63/150/149 280/317/303 275/311/297 62/143/142
f 270/307/293 277/312/298 278/314/300
f 280/317/303 351/318/304 350/319/305 279/316/302
f 64/153/152 351/318/304 280/317/303 63/150/149
f 350/319/305 349/320/306 234/315/301 279/316/302
f 272/308/294 273/309/295 276/313/299
f 276/313/299 271/306/292 238/262/248 272/308/294
f 269/304/290 236/260/246 238/262/248 271/306/292
f 66/155/154 266/301/287 281/321/307 65/156/155
f 282/322/308 285/323/309 284/324/310 283/325/311
f 231/251/237 282/322/308 283/325/311 230/326/312
f 285/323/309 331/327/313 287/328/314 334/329/315
f 261/297/283 262/300/286 289/330/316 288/331/317
f 288/331/317 289/330/316 354/332/318 353/333/319
f 283/325/311 284/324/310 291/253/239 290/256/242
f 290/256/242 233/255/241 234/315/301 349/320/306
f 233/255/241 326/258/244 235/257/243 234/315/301
f 291/253/239 284/324/310 286/334/320 294/335/321
f 289/330/316 262/300/286 265/302/288 293/336/322
f 354/332/318 289/330/316 293/336/322 355/337/323
f 294/335/321 355/337/323 297/338/324 298/339/325
f 281/321/307 266/301/287 263/299/285 267/340/326
f 293/336/322 265/302/288 296/341/327 295/342/328
f 67/179/178 296/341/327 265/302/288 266/301/287
f 341/343/329 340/344/330 298/339/325 297/338/324
f 295/342/328 297/338/324 355/337/323 293/336/322
f 295/342/328 296/341/327 367/392/331 368/393/332
f 295/342/328 368/393/332 341/343/329 297/338/324
f 367/392/331 296/341/327 67/179/178 366/391/183
f 294/335/321 298/339/325 300/347/333 299/348/334
f 292/254/240 291/253/239 294/335/321 299/348/334
f 299/348/334 303/349/335 363/350/336 292/254/240
f 248/275/261 237/259/245 326/258/244 325/278/264
f 360/279/265 363/350/336 260/295/281 361/281/267
f 259/296/282 260/295/281 302/351/337 301/352/338
f 302/351/337 260/295/281 363/350/336 303/349/335
f 301/352/338 302/351/337 305/353/339 304/354/340
f 305/353/339 339/355/220 344/356/341 304/354/340
f 302/351/337 303/349/335 306/357/342 305/353/339
f 305/353/339 306/357/342 339/355/220
f 299/348/334 300/347/333 306/357/342 303/349/335
f 300/347/333 222/358/221 339/355/220 306/357/342
f 222/358/221 300/347/333 298/339/325 340/344/330
f 240/263/249 241/359/343 52/197/194 51/81/80
f 247/276/262 242/360/344 309/361/345 308/277/263
f 257/294/280 259/296/282 345/362/346 307/363/347
f 307/363/347 345/362/346 75/364/201 68/203/200
f 58/119/118 256/292/278 307/363/347 68/203/200
f 256/292/278 257/294/280 307/363/347
f 259/296/282 301/352/338 346/365/348 345/362/346
f 301/352/338 304/354/340 347/366/349 346/365/348
f 347/366/349 304/354/340 344/356/341
f 266/301/287 66/155/154 67/179/178
f 237/259/245 308/277/263 240/263/249 239/261/247
f 309/361/345 241/359/343 240/263/249 308/277/263
f 241/359/343 310/367/350 69/207/204 52/197/194
f 242/360/344 311/368/351 312/369/352 309/361/345
f 242/360/344 247/276/262 243/283/269 313/370/353
f 53/93/92 73/213/210 314/371/354 244/271/257
f 244/271/257 314/371/354 315/372/355 246/289/275
f 246/289/275 315/372/355 357/373/356 356/374/357
f 309/361/345 312/369/352 310/367/350 241/359/343
f 310/375/350 317/264/250 71/86/85 69/218/204
f 311/376/351 319/267/253 320/266/252 312/377/352
f 311/368/351 242/360/344 313/370/353 358/378/358
f 73/222/210 72/91/90 322/270/256 314/379/354
f 314/379/354 322/270/256 323/273/259 315/380/355
f 315/380/355 323/273/259 324/274/260 357/381/356
f 312/377/352 320/266/252 317/264/250 310/375/350
f 340/344/330 336/382/227 222/358/221
f 292/254/240 363/350/336 360/279/265 325/278/264
f 326/258/244 233/255/241 292/254/240 325/278/264
f 330/303/289 327/383/359 232/249/235
f 327/383/359 333/250/236 232/249/235
f 288/331/317 329/384/360 328/385/361 261/297/283
f 329/384/360 327/383/359 328/385/361
f 353/333/319 352/386/362 329/384/360 288/331/317
f 352/386/362 327/383/359 329/384/360
f 261/297/283 328/385/361 330/303/289 264/298/284
f 327/383/359 330/303/289 328/385/361
f 282/322/308 332/387/363 331/327/313 285/323/309
f 332/387/363 327/383/359 331/327/313
f 327/383/359 287/328/314 331/327/313
f 231/251/237 333/250/236 332/387/363 282/322/308
f 333/250/236 327/383/359 332/387/363
f 285/323/309 334/329/315 286/334/320 284/324/310
f 264/298/284 348/252/238 267/340/326 263/299/285
f 230/326/312 267/340/326 348/252/238 231/251/237
f 230/326/312 283/325/311 290/256/242 349/320/306
f 267/340/326 230/326/312 349/320/306 350/319/305
f 351/318/304 281/321/307 267/340/326 350/319/305
f 64/153/152 65/156/155 281/321/307 351/318/304
f 287/328/314 327/383/359 352/386/362
f 334/329/315 287/328/314 352/386/362 353/333/319
f 354/332/318 286/334/320 334/329/315 353/333/319
f 286/334/320 354/332/318 355/337/323 294/335/321
f 243/283/269 249/280/266 250/282/268 359/290/276
f 313/370/353 356/374/357 357/373/356 358/378/358
f 358/388/358 321/269/255 319/267/253 311/376/351
f 324/274/260 321/269/255 358/388/358 357/381/356
f 356/374/357 313/370/353 243/283/269 359/290/276
f 254/288/274 246/289/275 356/374/357 359/290/276
f 364/389/181 197/180/179 198/182/364
f 365/390/182 364/389/181 198/182/364 199/183/365
f 199/183/365 74/184/366 366/391/183 365/390/182
f 343/345/367 367/392/331 366/391/183 74/184/366
f 368/393/332 367/392/331 343/345/367 342/346/368
f 341/343/329 368/393/332 342/346/368
]===]
--# Shader
lightShader = shader()
lightShader.vertexProgram = [[
//This is the current model * view * projection matrix
// Codea sets it automatically
uniform mat4 modelViewProjection;
uniform vec3 light;
//This is the current mesh vertex position, color and tex coord
// Set automatically
attribute vec4 position;
attribute vec4 color;
attribute vec2 texCoord;
attribute vec3 normal;
//This is an output variable that will be passed to the fragment shader
varying lowp vec4 vColor;
varying highp vec2 vTexCoord;
varying lowp float vShade;
void main()
{
//Pass the mesh color to the fragment shader
vColor = color;
vTexCoord = vec2(texCoord.x,1.-texCoord.y);
if (light != vec3(0.,0.,0.)) {
lowp vec4 nor = modelViewProjection * vec4(normal,0);
vShade = (dot(nor.xyz,light)+0.2)/1.2;
if (vShade >1.0) {vShade=1.0;}
if (vShade <0.2) {vShade=0.2;}
} else {
vShade = 1.;
}
//Multiply the vertex position by our combined transform
gl_Position = modelViewProjection * position;
}
]]
lightShader.fragmentProgram = [[
//This represents the current texture on the mesh
uniform lowp sampler2D texture;
//The interpolated vertex color for this fragment
varying lowp vec4 vColor;
//The interpolated texture coordinate for this fragment
varying highp vec2 vTexCoord;
varying lowp float vShade;
void main()
{
//Sample the texture at the interpolated coordinate
lowp vec4 col = texture2D( texture, vTexCoord );
col.rgb = col.rgb*vShade;
//Set the output color to the texture color
gl_FragColor = col;
}
]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.