-
Notifications
You must be signed in to change notification settings - Fork 1
/
ejer_4.htm
818 lines (770 loc) · 53.5 KB
/
ejer_4.htm
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
var canvas;
var ctx;
// Ejemplo de como calcular una Tranformacion de View
// El punto de vista gira alrededor del centro de la palmera
var aspect = 1;
var escala = 50;
var d = 12;
var OX = 500;
var OY = 350;
// Matriz de View (Pasa de World Space a Camera Space)
var m11 = 1; var m12 = 0; var m13 = 0;
var m21 = 0; var m22 = 1; var m23 = 0;
var m31 = 0.141; var m32 = 0.141; var m33 = 0.707;
var tras_x = 0; var tras_y = 0; var tras_z = 0;
function Transform_X(x,y,z)
{
// Paso de World Space a Camera Space
var xc = x*m11 + y*m21 + z*m31 + tras_x;
var yc = x*m12 + y*m22 + z*m32 + tras_y;
var zc = x*m13 + y*m23 + z*m33 + tras_z;
// Perspectiva: Proyecto a Screen Space
var xs = xc/(zc + d ) * d *escala;
return xs;
}
function Transform_Y(x,y,z)
{
// Paso de World Space a Camera Space
var xc = x*m11 + y*m21 + z*m31 + tras_x;
var yc = x*m12 + y*m22 + z*m32 + tras_y;
var zc = x*m13 + y*m23 + z*m33 + tras_z;
// Perspectiva: Proyecto a Screen Space
var ys = yc/(zc + d ) * d *escala * aspect;
return ys;
}
// Proyecta y Dibuja un triangulo
function DrawTri(x0,y0,z0,x1,y1,z1,x2,y2,z2)
{
ctx.beginPath();
// Primer punto
var X = Transform_X(x0,y0,z0);
var Y = Transform_Y(x0,y0,z0);
ctx.moveTo(OX + X, OY - Y);
// Segundo punto
X = Transform_X(x1,y1,z1);
Y = Transform_Y(x1,y1,z1);
ctx.lineTo(OX + X, OY - Y);
// Tercer punto
X = Transform_X(x2,y2,z2);
Y = Transform_Y(x2,y2,z2);
ctx.lineTo(OX + X, OY - Y);
ctx.closePath();
ctx.fill();
ctx.stroke();
}
// Dibuja una linea
function Line3d(x0,y0,z0,x1,y1,z1)
{
ctx.beginPath();
// Primer punto
var X = Transform_X(x0,y0,z0);
var Y = Transform_Y(x0,y0,z0);
ctx.moveTo(OX + X, OY - Y);
// Segundo punto
X = Transform_X(x1,y1,z1);
Y = Transform_Y(x1,y1,z1);
ctx.lineTo(OX + X, OY - Y);
ctx.closePath();
ctx.stroke();
}
// Dibuja una Palmera
function palmera()
{
ctx.fillStyle = 'rgba(120,255,120,0.4)';
DrawTri(4.25784,2.35621,4.1643,4.15704,2.35859,4.77698,4.51082,2.22235,4.36735);
DrawTri(4.25784,2.35621,4.1643,3.98594,2.44754,4.66123,4.15704,2.35859,4.77698);
DrawTri(3.98594,2.44754,4.66123,4.25784,2.35621,4.1643,4.19579,2.37862,4.25639);
DrawTri(4.24134,2.35882,4.15434,3.98594,2.44754,4.66123,4.19579,2.37862,4.25639);
DrawTri(4.24134,2.35882,4.15434,3.79273,2.35859,4.58814,3.98594,2.44754,4.66123);
DrawTri(3.79273,2.35859,4.58814,4.24134,2.35882,4.15434,3.92352,2.22235,4.06292);
DrawTri(4.25686,2.02067,3.69295,4.24134,2.35882,4.15434,4.45787,2.10698,3.75077);
DrawTri(4.02037,2.16375,3.95542,4.24134,2.35882,4.15434,4.25686,2.02067,3.69295);
DrawTri(4.24134,2.35882,4.15434,4.02037,2.16375,3.95542,3.95811,2.21979,4.04935);
DrawTri(4.621,2.02067,3.8817,4.25784,2.35621,4.1643,4.51671,2.21157,4.34137);
DrawTri(4.25784,2.35621,4.1643,4.621,2.02067,3.8817,4.45787,2.10698,3.75077);
DrawTri(4.45787,2.10698,3.75077,4.49319,1.90737,3.59468,4.29605,2.00188,3.67665);
DrawTri(3.79908,2.33627,4.84534,3.98594,2.44754,4.66123,3.78189,2.39509,4.58363);
DrawTri(3.98594,2.44754,4.66123,3.79908,2.33627,4.84534,3.85861,2.34193,4.90687);
DrawTri(3.98594,2.44754,4.66123,3.9432,2.33627,4.92005,4.16696,2.39509,4.78324);
DrawTri(3.9432,2.33627,4.92005,3.98594,2.44754,4.66123,3.85861,2.34193,4.90687);
DrawTri(4.56507,1.90737,3.63194,4.49319,1.90737,3.59468,4.45787,2.10698,3.75077);
DrawTri(4.56507,1.90737,3.63194,4.50243,1.57631,3.48929,4.49319,1.90737,3.59468);
DrawTri(4.50243,1.57631,3.48929,4.56507,1.90737,3.63194,4.57432,1.57631,3.52656);
DrawTri(4.61188,2.00219,3.84096,4.56507,1.90737,3.63194,4.45787,2.10698,3.75077);
DrawTri(4.25784,2.35621,4.1643,4.45787,2.10698,3.75077,4.24134,2.35882,4.15434);
DrawTri(4.25784,2.35621,4.1643,4.24134,2.35882,4.15434,4.19579,2.37862,4.25639);
DrawTri(4.60309,1.83487,3.49339,4.60307,2.16773,3.54053,4.65,2.16773,3.4936);
DrawTri(4.60307,2.16773,3.54053,4.60309,1.83487,3.49339,4.55616,1.83487,3.54032);
DrawTri(4.74718,2.89512,3.6171,4.99418,3.35391,3.88899,4.99846,3.35391,3.88471);
DrawTri(4.99418,3.35391,3.88899,4.74718,2.89512,3.6171,4.72657,2.89512,3.63771);
DrawTri(5.16125,3.43554,4.05534,4.99846,3.35391,3.88471,4.99418,3.35391,3.88899);
DrawTri(4.99846,3.35391,3.88471,5.16125,3.43554,4.05534,5.16481,3.43554,4.05178);
DrawTri(5.02852,2.85024,3.63847,4.99846,3.35391,3.88471,5.13916,3.30271,3.88107);
DrawTri(4.99846,3.35391,3.88471,5.02852,2.85024,3.63847,4.74718,2.89512,3.6171);
DrawTri(4.74718,2.89512,3.6171,4.62107,2.40831,3.5116,4.72657,2.89512,3.63771);
DrawTri(4.76821,2.34509,3.45265,4.65,2.16773,3.4936,4.62107,2.40831,3.5116);
DrawTri(4.65,2.16773,3.4936,4.60307,2.16773,3.54053,4.62107,2.40831,3.5116);
DrawTri(4.80362,2.36142,3.51562,4.74718,2.89512,3.6171,4.95871,2.81435,3.61652);
DrawTri(4.74718,2.89512,3.6171,4.80362,2.36142,3.51562,4.62107,2.40831,3.5116);
DrawTri(4.99846,3.35391,3.88471,5.17366,3.41957,4.03261,5.13046,3.32654,3.88997);
DrawTri(5.17366,3.41957,4.03261,4.99846,3.35391,3.88471,5.16481,3.43554,4.05178);
DrawTri(4.72657,2.89512,3.63771,4.62629,2.37074,3.6854,4.7272,2.82368,3.84049);
DrawTri(4.62629,2.37074,3.6854,4.72657,2.89512,3.63771,4.62107,2.40831,3.5116);
DrawTri(5.15299,3.43015,4.05283,4.99418,3.35391,3.88899,5.01035,3.33711,4.00964);
DrawTri(4.99418,3.35391,3.88899,5.15299,3.43015,4.05283,5.16125,3.43554,4.05534);
DrawTri(4.99418,3.35391,3.88899,4.74706,2.86329,3.8716,4.98967,3.31576,3.98224);
DrawTri(4.74706,2.86329,3.8716,4.99418,3.35391,3.88899,4.72657,2.89512,3.63771);
DrawTri(4.62107,2.40831,3.5116,4.60307,2.16773,3.54053,4.56212,2.34509,3.65874);
DrawTri(4.45327,2.48069,3.04619,4.18718,2.68,2.52177,4.12394,2.37583,2.98546);
DrawTri(4.45327,2.48069,3.04619,4.39756,2.75582,2.54578,4.18718,2.68,2.52177);
DrawTri(4.39756,2.75582,2.54578,4.45327,2.48069,3.04619,4.45277,2.53865,2.94885);
DrawTri(4.47261,2.48274,3.0456,4.39756,2.75582,2.54578,4.45277,2.53865,2.94885);
DrawTri(4.47261,2.48274,3.0456,4.59373,2.68,2.46608,4.39756,2.75582,2.54578);
DrawTri(4.59373,2.68,2.46608,4.47261,2.48274,3.0456,4.77934,2.37583,2.89568);
DrawTri(4.70733,2.02486,3.29606,4.47261,2.48274,3.0456,4.51333,2.09248,3.39089);
DrawTri(4.75841,2.27385,3.01201,4.47261,2.48274,3.0456,4.70733,2.02486,3.29606);
DrawTri(4.47261,2.48274,3.0456,4.75841,2.27385,3.01201,4.75856,2.36408,2.92427);
DrawTri(4.30097,2.02486,3.35173,4.45327,2.48069,3.04619,4.13341,2.35706,3.00504);
DrawTri(4.45327,2.48069,3.04619,4.30097,2.02486,3.35173,4.51333,2.09248,3.39089);
DrawTri(4.51333,2.09248,3.39089,4.5642,1.85263,3.46398,4.68359,1.9963,3.32391);
DrawTri(4.44102,2.7342,2.265,4.39756,2.75582,2.54578,4.60684,2.71473,2.47564);
DrawTri(4.39756,2.75582,2.54578,4.44102,2.7342,2.265,4.35738,2.74863,2.25245);
DrawTri(4.39756,2.75582,2.54578,4.2802,2.7342,2.28703,4.17712,2.71473,2.53451);
DrawTri(4.2802,2.7342,2.28703,4.39756,2.75582,2.54578,4.35738,2.74863,2.25245);
DrawTri(4.48398,1.85263,3.47497,4.5642,1.85263,3.46398,4.51333,2.09248,3.39089);
DrawTri(4.48398,1.85263,3.47497,4.60163,1.50791,3.44038,4.5642,1.85263,3.46398);
DrawTri(4.60163,1.50791,3.44038,4.48398,1.85263,3.47497,4.52141,1.50791,3.45137);
DrawTri(4.33082,1.99677,3.37183,4.48398,1.85263,3.47497,4.51333,2.09248,3.39089);
DrawTri(4.45327,2.48069,3.04619,4.51333,2.09248,3.39089,4.47261,2.48274,3.0456);
DrawTri(4.45327,2.48069,3.04619,4.47261,2.48274,3.0456,4.45277,2.53865,2.94885);
DrawTri(3.53533,1.69367,3.54215,3.11701,1.29595,3.77101,3.59061,1.57501,3.86774);
DrawTri(3.53533,1.69367,3.54215,3.0673,1.36236,3.56195,3.11701,1.29595,3.77101);
DrawTri(3.0673,1.36236,3.56195,3.53533,1.69367,3.54215,3.44069,1.63173,3.53565);
DrawTri(3.53397,1.6951,3.5228,3.0673,1.36236,3.56195,3.44069,1.63173,3.53565);
DrawTri(3.53397,1.6951,3.5228,3.10802,1.26845,3.36168,3.0673,1.36236,3.56195);
DrawTri(3.10802,1.26845,3.36168,3.53397,1.6951,3.5228,3.5761,1.53068,3.20788);
DrawTri(4.06376,1.73195,3.30963,3.53397,1.6951,3.5228,4.03711,1.83595,3.50882);
DrawTri(3.71779,1.58916,3.23744,3.53397,1.6951,3.5228,4.06376,1.73195,3.30963);
DrawTri(3.53397,1.6951,3.5228,3.71779,1.58916,3.23744,3.59837,1.55003,3.23061);
DrawTri(4.07275,1.75944,3.71876,3.53533,1.69367,3.54215,3.61639,1.58488,3.85978);
DrawTri(3.53533,1.69367,3.54215,4.07275,1.75944,3.71876,4.03711,1.83595,3.50882);
DrawTri(4.03711,1.83595,3.50882,4.28652,1.79915,3.46522,4.1007,1.74309,3.33543);
DrawTri(2.96567,1.10341,3.50022,3.0673,1.36236,3.56195,3.08147,1.29298,3.3489);
DrawTri(3.0673,1.36236,3.56195,2.96567,1.10341,3.50022,2.94407,1.09386,3.5827);
DrawTri(3.0673,1.36236,3.56195,2.96923,1.11429,3.66214,3.09098,1.32205,3.78155);
DrawTri(2.96923,1.11429,3.66214,3.0673,1.36236,3.56195,2.94407,1.09386,3.5827);
DrawTri(4.28829,1.80457,3.54599,4.28652,1.79915,3.46522,4.03711,1.83595,3.50882);
DrawTri(4.28829,1.80457,3.54599,4.5874,1.62888,3.42966,4.28652,1.79915,3.46522);
DrawTri(4.5874,1.62888,3.42966,4.28829,1.80457,3.54599,4.58917,1.6343,3.51043);
DrawTri(4.1079,1.7668,3.69058,4.28829,1.80457,3.54599,4.03711,1.83595,3.50882);
DrawTri(3.53533,1.69367,3.54215,4.03711,1.83595,3.50882,3.53397,1.6951,3.5228);
DrawTri(3.53533,1.69367,3.54215,3.53397,1.6951,3.5228,3.44069,1.63173,3.53565);
DrawTri(4.58986,1.77265,3.70336,4.60877,1.5583,3.56496,4.53029,1.55409,3.58443);
DrawTri(4.62517,1.20679,3.55512,4.53029,1.55409,3.58443,4.60877,1.5583,3.56496);
DrawTri(4.53029,1.55409,3.58443,4.62517,1.20679,3.55512,4.54669,1.20258,3.5746);
DrawTri(4.97543,1.90896,4.02586,4.58986,1.77265,3.70336,4.68955,2.07541,4.11753);
DrawTri(4.58986,1.77265,3.70336,4.97543,1.90896,4.02586,4.80504,1.70266,3.70274);
DrawTri(4.79998,1.68513,4.52335,4.9428,1.44353,4.57266,4.99818,1.6157,4.50438);
DrawTri(4.9428,1.44353,4.57266,4.79998,1.68513,4.52335,4.86976,1.40766,4.59986);
DrawTri(4.38947,1.85953,4.13788,4.58986,1.77265,3.70336,4.40751,1.68135,3.8014);
DrawTri(4.58986,1.77265,3.70336,4.38947,1.85953,4.13788,4.67041,2.07684,4.12069);
DrawTri(4.79998,1.68513,4.52335,4.68955,2.07541,4.11753,4.70081,1.99982,4.20116);
DrawTri(5.01059,1.65968,4.44865,4.68955,2.07541,4.11753,4.79998,1.68513,4.52335);
DrawTri(4.68955,2.07541,4.11753,5.01059,1.65968,4.44865,5.02001,1.96026,4.08912);
DrawTri(4.6704,2.07364,4.1205,4.70081,1.99982,4.20116,4.68955,2.07541,4.11753);
DrawTri(4.67041,2.07684,4.12069,4.68955,2.07541,4.11753,4.58986,1.77265,3.70336);
DrawTri(4.59837,1.58682,4.51357,4.86976,1.40766,4.59986,4.79998,1.68513,4.52335);
DrawTri(4.86976,1.40766,4.59986,4.59837,1.58682,4.51357,4.78508,1.40757,4.58608);
DrawTri(4.61189,1.56876,4.48257,4.6704,2.07364,4.1205,4.41922,1.81889,4.14548);
DrawTri(4.61189,1.56876,4.48257,4.70081,1.99982,4.20116,4.6704,2.07364,4.1205);
DrawTri(4.70081,1.99982,4.20116,4.61189,1.56876,4.48257,4.79998,1.68513,4.52335);
DrawTri(4.58986,1.77265,3.70336,4.53029,1.55409,3.58443,4.42787,1.66025,3.76542);
DrawTri(4.58986,1.77265,3.70336,4.77303,1.67911,3.68026,4.60877,1.5583,3.56496);
DrawTri(5.26465,2.3737,3.68459,5.87945,2.31772,3.75116,5.43337,2.18068,3.44496);
DrawTri(5.26465,2.3737,3.68459,5.78655,2.44414,3.91233,5.87945,2.31772,3.75116);
DrawTri(5.78655,2.44414,3.91233,5.26465,2.3737,3.68459,5.3628,2.39386,3.73746);
DrawTri(5.25623,2.37989,3.701,5.78655,2.44414,3.91233,5.3628,2.39386,3.73746);
DrawTri(5.25623,2.37989,3.701,5.71794,2.39406,4.12058,5.78655,2.44414,3.91233);
DrawTri(5.71794,2.39406,4.12058,5.25623,2.37989,3.701,5.17301,2.30374,4.0405);
DrawTri(4.76049,2.10072,3.7625,5.25623,2.37989,3.701,4.81312,2.14889,3.54777);
DrawTri(5.05315,2.24475,3.95973,5.25623,2.37989,3.701,4.76049,2.10072,3.7625);
DrawTri(5.25623,2.37989,3.701,5.05315,2.24475,3.95973,5.15683,2.29774,4.0075);
DrawTri(4.92192,2.02443,3.39326,5.26465,2.3737,3.68459,5.40601,2.17233,3.4422);
DrawTri(5.26465,2.3737,3.68459,4.92192,2.02443,3.39326,4.81312,2.14889,3.54777);
DrawTri(4.81312,2.14889,3.54777,4.63391,1.96634,3.55211,4.7395,2.07844,3.72762);
DrawTri(5.97003,2.34047,4.10412,5.78655,2.44414,3.91233,5.71826,2.43203,4.12586);
DrawTri(5.78655,2.44414,3.91233,5.97003,2.34047,4.10412,6.02745,2.32989,4.04125);
DrawTri(5.78655,2.44414,3.91233,6.03392,2.31027,3.95798,5.88897,2.35135,3.73539);
DrawTri(6.03392,2.31027,3.95798,5.78655,2.44414,3.91233,6.02745,2.32989,4.04125);
DrawTri(4.66578,1.95128,3.47921,4.63391,1.96634,3.55211,4.81312,2.14889,3.54777);
DrawTri(4.66578,1.95128,3.47921,4.49236,1.65254,3.59982,4.63391,1.96634,3.55211);
DrawTri(4.49236,1.65254,3.59982,4.66578,1.95128,3.47921,4.52423,1.63748,3.52692);
DrawTri(4.88014,2.0125,3.40728,4.66578,1.95128,3.47921,4.81312,2.14889,3.54777);
DrawTri(5.26465,2.3737,3.68459,4.81312,2.14889,3.54777,5.25623,2.37989,3.701);
DrawTri(5.26465,2.3737,3.68459,5.25623,2.37989,3.701,5.3628,2.39386,3.73746);
DrawTri(4.38178,1.47956,3.46901,4.49902,1.26825,3.55303,4.53254,1.27312,3.47949);
DrawTri(4.53052,0.917745,3.54419,4.53254,1.27312,3.47949,4.49902,1.26825,3.55303);
DrawTri(4.53254,1.27312,3.47949,4.53052,0.917745,3.54419,4.56404,0.922613,3.47065);
DrawTri(3.87898,1.55932,3.57895,4.38178,1.47956,3.46901,3.96736,1.75686,3.31247);
DrawTri(4.38178,1.47956,3.46901,3.87898,1.55932,3.57895,4.25647,1.38393,3.63135);
DrawTri(3.6197,1.34543,3.11484,3.51648,1.08702,3.17621,3.51914,1.2529,3.27543);
DrawTri(3.51648,1.08702,3.17621,3.6197,1.34543,3.11484,3.54367,1.0596,3.0996);
DrawTri(4.15711,1.57866,3.04922,4.38178,1.47956,3.46901,4.42627,1.40859,3.25881);
DrawTri(4.38178,1.47956,3.46901,4.15711,1.57866,3.04922,3.97654,1.76053,3.29573);
DrawTri(3.6197,1.34543,3.11484,3.96736,1.75686,3.31247,3.90233,1.67828,3.26318);
DrawTri(3.55082,1.29651,3.32328,3.96736,1.75686,3.31247,3.6197,1.34543,3.11484);
DrawTri(3.96736,1.75686,3.31247,3.55082,1.29651,3.32328,3.79712,1.60312,3.57828);
DrawTri(3.977,1.75736,3.29559,3.90233,1.67828,3.26318,3.96736,1.75686,3.31247);
DrawTri(3.97654,1.76053,3.29573,3.96736,1.75686,3.31247,4.38178,1.47956,3.46901);
DrawTri(3.76102,1.27269,2.95626,3.54367,1.0596,3.0996,3.6197,1.34543,3.11484);
DrawTri(3.54367,1.0596,3.0996,3.76102,1.27269,2.95626,3.60661,1.07018,3.04227);
DrawTri(3.77868,1.25395,2.98467,3.977,1.75736,3.29559,4.13677,1.53452,3.06443);
DrawTri(3.77868,1.25395,2.98467,3.90233,1.67828,3.26318,3.977,1.75736,3.29559);
DrawTri(3.90233,1.67828,3.26318,3.77868,1.25395,2.98467,3.6197,1.34543,3.11484);
DrawTri(4.38178,1.47956,3.46901,4.53254,1.27312,3.47949,4.44389,1.38613,3.2954);
DrawTri(4.38178,1.47956,3.46901,4.29603,1.36507,3.61857,4.49902,1.26825,3.55303);
DrawTri(4.66512,1.60847,3.3445,4.56124,1.39408,3.4378,4.62181,1.40307,3.49077);
DrawTri(4.57736,1.0448,3.47865,4.62181,1.40307,3.49077,4.56124,1.39408,3.4378);
DrawTri(4.62181,1.40307,3.49077,4.57736,1.0448,3.47865,4.63794,1.05379,3.53162);
DrawTri(4.69982,1.67801,2.82951,4.66512,1.60847,3.3445,4.92021,1.88995,2.98556);
DrawTri(4.66512,1.60847,3.3445,4.69982,1.67801,2.82951,4.55011,1.50341,3.18038);
DrawTri(5.2283,1.48639,2.71831,5.21135,1.22424,2.60791,5.10774,1.38473,2.57833);
DrawTri(5.21135,1.22424,2.60791,5.2283,1.48639,2.71831,5.27821,1.2011,2.65644);
DrawTri(5.1264,1.72739,3.24656,4.66512,1.60847,3.3445,4.85696,1.54895,3.44869);
DrawTri(4.66512,1.60847,3.3445,5.1264,1.72739,3.24656,4.93344,1.89457,2.99905);
DrawTri(5.2283,1.48639,2.71831,4.92021,1.88995,2.98556,4.98971,1.81348,2.93912);
DrawTri(5.05082,1.42605,2.59404,4.92021,1.88995,2.98556,5.2283,1.48639,2.71831);
DrawTri(4.92021,1.88995,2.98556,5.05082,1.42605,2.59404,4.72178,1.72106,2.75024);
DrawTri(4.93359,1.89141,2.9996,4.98971,1.81348,2.93912,4.92021,1.88995,2.98556);
DrawTri(4.93344,1.89457,2.99905,4.92021,1.88995,2.98556,4.66512,1.60847,3.3445);
DrawTri(5.34314,1.42326,2.90061,5.27821,1.2011,2.65644,5.2283,1.48639,2.71831);
DrawTri(5.27821,1.2011,2.65644,5.34314,1.42326,2.90061,5.31459,1.2152,2.73285);
DrawTri(5.3118,1.40322,2.90987,4.93359,1.89141,2.9996,5.11975,1.68234,3.22376);
DrawTri(5.3118,1.40322,2.90987,4.98971,1.81348,2.93912,4.93359,1.89141,2.9996);
DrawTri(4.98971,1.81348,2.93912,5.3118,1.40322,2.90987,5.2283,1.48639,2.71831);
DrawTri(4.66512,1.60847,3.3445,4.62181,1.40307,3.49077,4.81797,1.52476,3.45567);
DrawTri(4.66512,1.60847,3.3445,4.55192,1.48558,3.22236,4.56124,1.39408,3.4378);
DrawTri(3.02982,3.64858,3.24796,2.2879,3.65209,3.78024,3.08174,3.45173,3.72216);
DrawTri(3.02982,3.64858,3.24796,2.23035,3.78289,3.48195,2.2879,3.65209,3.78024);
DrawTri(2.23035,3.78289,3.48195,3.02982,3.64858,3.24796,2.86953,3.68154,3.27919);
DrawTri(3.02301,3.65241,3.22044,2.23035,3.78289,3.48195,2.86953,3.68154,3.27919);
DrawTri(3.02301,3.65241,3.22044,2.10543,3.65209,3.20503,2.23035,3.78289,3.48195);
DrawTri(2.10543,3.65209,3.20503,3.02301,3.65241,3.22044,2.7876,3.45173,2.79489);
DrawTri(3.51894,3.15513,2.75679,3.02301,3.65241,3.22044,3.66784,3.28206,3.02595);
DrawTri(3.00009,3.36555,2.78382,3.02301,3.65241,3.22044,3.51894,3.15513,2.75679);
DrawTri(3.02301,3.65241,3.22044,3.00009,3.36555,2.78382,2.83768,3.44797,2.81674);
DrawTri(3.70132,3.15513,3.33172,3.02982,3.64858,3.24796,3.11488,3.43587,3.70128);
DrawTri(3.02982,3.64858,3.24796,3.70132,3.15513,3.33172,3.66784,3.28206,3.02595);
DrawTri(3.66784,3.28206,3.02595,3.86688,2.98851,2.90035,3.57664,3.1275,2.7806);
DrawTri(1.84458,3.61925,3.4791,2.23035,3.78289,3.48195,2.09885,3.70576,3.18908);
DrawTri(2.23035,3.78289,3.48195,1.84458,3.61925,3.4791,1.8425,3.62757,3.60498);
DrawTri(2.23035,3.78289,3.48195,1.91676,3.61925,3.70664,2.29171,3.70576,3.79707);
DrawTri(1.91676,3.61925,3.70664,2.23035,3.78289,3.48195,1.8425,3.62757,3.60498);
DrawTri(3.90288,2.98851,3.01385,3.86688,2.98851,2.90035,3.66784,3.28206,3.02595);
DrawTri(3.90288,2.98851,3.01385,3.98607,2.50167,2.80038,3.86688,2.98851,2.90035);
DrawTri(3.98607,2.50167,2.80038,3.90288,2.98851,3.01385,4.02208,2.50167,2.91388);
DrawTri(3.7342,3.12796,3.27988,3.90288,2.98851,3.01385,3.66784,3.28206,3.02595);
DrawTri(3.02982,3.64858,3.24796,3.66784,3.28206,3.02595,3.02301,3.65241,3.22044);
DrawTri(3.02982,3.64858,3.24796,3.02301,3.65241,3.22044,2.86953,3.68154,3.27919);
DrawTri(4.08648,2.8819,2.90931,4.03745,3.37141,2.9583,4.13505,3.37141,2.9583);
DrawTri(4.03745,3.37141,2.9583,4.08648,2.8819,2.90931,3.98888,2.8819,2.90931);
DrawTri(4.10769,4.44109,3.18779,4.0818,5.11578,3.72736,4.0907,5.11578,3.72736);
DrawTri(4.0818,5.11578,3.72736,4.10769,4.44109,3.18779,4.06481,4.44109,3.18779);
DrawTri(4.08255,5.23582,4.07407,4.0907,5.11578,3.72736,4.0818,5.11578,3.72736);
DrawTri(4.0907,5.11578,3.72736,4.08255,5.23582,4.07407,4.08994,5.23582,4.07407);
DrawTri(4.37802,4.3751,3.50256,4.0907,5.11578,3.72736,4.24079,5.04049,3.86989);
DrawTri(4.0907,5.11578,3.72736,4.37802,4.3751,3.50256,4.10769,4.44109,3.18779);
DrawTri(4.10769,4.44109,3.18779,4.08625,3.72519,2.94694,4.06481,4.44109,3.18779);
DrawTri(4.30055,3.63223,3.03865,4.13505,3.37141,2.9583,4.08625,3.72519,2.94694);
DrawTri(4.13505,3.37141,2.9583,4.03745,3.37141,2.9583,4.08625,3.72519,2.94694);
DrawTri(4.2719,3.65624,3.14095,4.10769,4.44109,3.18779,4.32824,4.32232,3.40715);
DrawTri(4.10769,4.44109,3.18779,4.2719,3.65624,3.14095,4.08625,3.72519,2.94694);
DrawTri(4.0907,5.11578,3.72736,4.11908,5.21235,4.06334,4.22249,5.07553,3.8701);
DrawTri(4.11908,5.21235,4.06334,4.0907,5.11578,3.72736,4.08994,5.23582,4.07407);
DrawTri(4.06481,4.44109,3.18779,3.91095,3.66995,3.1331,3.85461,4.33603,3.3993);
DrawTri(3.91095,3.66995,3.1331,4.06481,4.44109,3.18779,4.08625,3.72519,2.94694);
DrawTri(4.07657,5.2279,4.06288,4.0818,5.11578,3.72736,3.97316,5.09108,3.86964);
DrawTri(4.0818,5.11578,3.72736,4.07657,5.2279,4.06288,4.08255,5.23582,4.07407);
DrawTri(4.0818,5.11578,3.72736,3.84291,4.39429,3.45231,3.98014,5.05968,3.81964);
DrawTri(3.84291,4.39429,3.45231,4.0818,5.11578,3.72736,4.06481,4.44109,3.18779);
DrawTri(4.08625,3.72519,2.94694,4.03745,3.37141,2.9583,3.87195,3.63223,3.03865);
DrawTri(4.39573,3.83164,2.2885,4.66435,4.12474,1.46647,4.11642,3.67743,1.88288);
DrawTri(4.39573,3.83164,2.2885,4.85814,4.23625,1.71021,4.66435,4.12474,1.46647);
DrawTri(4.85814,4.23625,1.71021,4.39573,3.83164,2.2885,4.49643,3.91687,2.18675);
DrawTri(4.41644,3.83465,2.30799,4.85814,4.23625,1.71021,4.49643,3.91687,2.18675);
DrawTri(4.41644,3.83465,2.30799,5.14502,4.12474,1.83132,4.85814,4.23625,1.71021);
DrawTri(5.14502,4.12474,1.83132,4.41644,3.83465,2.30799,4.8913,3.67743,2.47105);
DrawTri(4.40007,3.1613,2.81251,4.41644,3.83465,2.30799,4.09973,3.26074,2.70938);
DrawTri(4.74857,3.52747,2.57026,4.41644,3.83465,2.30799,4.40007,3.1613,2.81251);
DrawTri(4.41644,3.83465,2.30799,4.74857,3.52747,2.57026,4.83996,3.66015,2.47918);
DrawTri(3.91963,3.1613,2.44784,4.39573,3.83164,2.2885,4.1059,3.64982,1.9131);
DrawTri(4.39573,3.83164,2.2885,3.91963,3.1613,2.44784,4.09973,3.26074,2.70938);
DrawTri(4.09973,3.26074,2.70938,4.07663,2.90802,2.83829,4.34644,3.1193,2.81679);
DrawTri(5.19531,4.20445,1.46342,4.85814,4.23625,1.71021,5.14871,4.17582,1.8549);
DrawTri(4.85814,4.23625,1.71021,5.19531,4.20445,1.46342,5.12139,4.22566,1.3634);
DrawTri(4.85814,4.23625,1.71021,5.00517,4.20445,1.3191,4.64065,4.17582,1.46926);
DrawTri(5.00517,4.20445,1.3191,4.85814,4.23625,1.71021,5.12139,4.22566,1.3634);
DrawTri(3.98178,2.90802,2.7663,4.07663,2.90802,2.83829,4.09973,3.26074,2.70938);
DrawTri(3.98178,2.90802,2.7663,4.1401,2.40108,2.85267,4.07663,2.90802,2.83829);
DrawTri(4.1401,2.40108,2.85267,3.98178,2.90802,2.7663,4.04525,2.40108,2.78068);
DrawTri(3.92977,3.11999,2.49978,3.98178,2.90802,2.7663,4.09973,3.26074,2.70938);
DrawTri(4.39573,3.83164,2.2885,4.09973,3.26074,2.70938,4.41644,3.83465,2.30799);
DrawTri(4.39573,3.83164,2.2885,4.41644,3.83465,2.30799,4.49643,3.91687,2.18675);
DrawTri(2.92546,2.67425,1.84969,2.25248,2.08938,1.65268,2.64436,2.49976,2.24575);
DrawTri(2.92546,2.67425,1.84969,2.41818,2.18704,1.3836,2.25248,2.08938,1.65268);
DrawTri(2.41818,2.18704,1.3836,2.92546,2.67425,1.84969,2.83381,2.58317,1.74452);
DrawTri(2.94416,2.67636,1.82816,2.41818,2.18704,1.3836,2.83381,2.58317,1.74452);
DrawTri(2.94416,2.67636,1.82816,2.66877,2.04893,1.21768,2.41818,2.18704,1.3836);
DrawTri(2.66877,2.04893,1.21768,2.94416,2.67636,1.82816,3.31545,2.43456,1.54449);
DrawTri(3.71674,2.73055,2.1574,2.94416,2.67636,1.82816,3.4819,2.88349,2.33681);
DrawTri(3.43205,2.52056,1.72257,2.94416,2.67636,1.82816,3.71674,2.73055,2.1574);
DrawTri(2.94416,2.67636,1.82816,3.43205,2.52056,1.72257,3.31497,2.46301,1.59129);
DrawTri(3.30065,2.77097,2.59219,2.92546,2.67425,1.84969,2.67946,2.51426,2.26427);
DrawTri(2.92546,2.67425,1.84969,3.30065,2.77097,2.59219,3.4819,2.88349,2.33681);
DrawTri(3.4819,2.88349,2.33681,3.78658,2.82937,2.55083,3.72832,2.74693,2.22263);
DrawTri(2.37669,1.80622,1.21373,2.41818,2.18704,1.3836,2.65447,2.08501,1.17678);
DrawTri(2.41818,2.18704,1.3836,2.37669,1.80622,1.21373,2.26846,1.79218,1.27703);
DrawTri(2.41818,2.18704,1.3836,2.21202,1.82222,1.3858,2.21446,2.12776,1.63657);
DrawTri(2.21202,1.82222,1.3858,2.41818,2.18704,1.3836,2.26846,1.79218,1.27703);
DrawTri(3.70444,2.83735,2.63666,3.78658,2.82937,2.55083,3.4819,2.88349,2.33681);
DrawTri(3.70444,2.83735,2.63666,4.13644,2.57897,2.82672,3.78658,2.82937,2.55083);
DrawTri(4.13644,2.57897,2.82672,3.70444,2.83735,2.63666,4.0543,2.58695,2.91256);
DrawTri(3.36651,2.7818,2.59944,3.70444,2.83735,2.63666,3.4819,2.88349,2.33681);
DrawTri(2.92546,2.67425,1.84969,3.4819,2.88349,2.33681,2.94416,2.67636,1.82816);
DrawTri(2.92546,2.67425,1.84969,2.94416,2.67636,1.82816,2.83381,2.58317,1.74452);
DrawTri(3.85439,2.7904,3.1139,4.01797,2.47518,2.98964,3.91611,2.469,2.92829);
DrawTri(4.04525,1.95826,2.99646,3.91611,2.469,2.92829,4.01797,2.47518,2.98964);
DrawTri(3.91611,2.469,2.92829,4.04525,1.95826,2.99646,3.94339,1.95207,2.93511);
DrawTri(3.91997,2.99086,3.8502,3.85439,2.7904,3.1139,3.52737,3.23564,3.64824);
DrawTri(3.85439,2.7904,3.1139,3.91997,2.99086,3.8502,4.0788,2.68747,3.33701);
DrawTri(3.22021,2.66169,4.18507,3.31745,2.30641,4.38486,3.44603,2.55959,4.37144);
DrawTri(3.31745,2.30641,4.38486,3.22021,2.66169,4.18507,3.21321,2.25366,4.33719);
DrawTri(3.19417,2.91817,3.35737,3.85439,2.7904,3.1139,3.56282,2.65614,3.02622);
DrawTri(3.85439,2.7904,3.1139,3.19417,2.91817,3.35737,3.50418,3.23775,3.63162);
DrawTri(3.22021,2.66169,4.18507,3.52737,3.23564,3.64824,3.45212,3.12448,3.74692);
DrawTri(3.5169,2.62427,4.3264,3.52737,3.23564,3.64824,3.22021,2.66169,4.18507);
DrawTri(3.52737,3.23564,3.64824,3.5169,2.62427,4.3264,3.90054,3.06629,3.96233);
DrawTri(3.50438,3.23304,3.63142,3.45212,3.12448,3.74692,3.52737,3.23564,3.64824);
DrawTri(3.50418,3.23775,3.63162,3.52737,3.23564,3.64824,3.85439,2.7904,3.1139);
DrawTri(3.02073,2.51712,3.96526,3.21321,2.25366,4.33719,3.22021,2.66169,4.18507);
DrawTri(3.21321,2.25366,4.33719,3.02073,2.51712,3.96526,3.13948,2.25352,4.2348);
DrawTri(3.06702,2.49056,3.94707,3.50438,3.23304,3.63142,3.2172,2.8584,3.39619);
DrawTri(3.06702,2.49056,3.94707,3.45212,3.12448,3.74692,3.50438,3.23304,3.63142);
DrawTri(3.45212,3.12448,3.74692,3.06702,2.49056,3.94707,3.22021,2.66169,4.18507);
DrawTri(3.85439,2.7904,3.1139,3.91611,2.469,2.92829,3.6214,2.62511,3.00998);
DrawTri(3.85439,2.7904,3.1139,4.06888,2.65285,3.28035,4.01797,2.47518,2.98964);
DrawTri(4.57559,3.6743,3.79607,5.14568,3.59198,4.50459,5.00022,3.39045,3.72233);
DrawTri(4.57559,3.6743,3.79607,4.88148,3.77788,4.57559,5.14568,3.59198,4.50459);
DrawTri(4.88148,3.77788,4.57559,4.57559,3.6743,3.79607,4.62268,3.70395,3.9531);
DrawTri(4.54977,3.6834,3.80438,4.88148,3.77788,4.57559,4.62268,3.70395,3.9531);
DrawTri(4.54977,3.6834,3.80438,4.59358,3.70424,4.7208,4.88148,3.77788,4.57559);
DrawTri(4.59358,3.70424,4.7208,4.54977,3.6834,3.80438,4.1102,3.57141,4.07087);
DrawTri(3.97032,3.27286,3.35283,4.54977,3.6834,3.80438,4.24835,3.34369,3.18427);
DrawTri(4.06956,3.48467,3.86224,4.54977,3.6834,3.80438,3.97032,3.27286,3.35283);
DrawTri(4.54977,3.6834,3.80438,4.06956,3.48467,3.86224,4.1277,3.5626,4.01973);
DrawTri(4.52215,3.16066,3.13672,4.57559,3.6743,3.79607,4.97465,3.37816,3.69101);
DrawTri(4.57559,3.6743,3.79607,4.52215,3.16066,3.13672,4.24835,3.34369,3.18427);
DrawTri(4.24835,3.34369,3.18427,4.05748,3.07525,3.00242,3.98477,3.24009,3.29472);
DrawTri(4.87285,3.62543,4.96582,4.88148,3.77788,4.57559,4.58842,3.76008,4.72662);
DrawTri(4.88148,3.77788,4.57559,4.87285,3.62543,4.96582,4.99793,3.60987,4.96016);
DrawTri(4.88148,3.77788,4.57559,5.09124,3.58102,4.88029,5.17198,3.64143,4.49809);
DrawTri(5.09124,3.58102,4.88029,4.88148,3.77788,4.57559,4.99793,3.60987,4.96016);
DrawTri(4.16642,3.0531,2.95976,4.05748,3.07525,3.00242,4.24835,3.34369,3.18427);
DrawTri(4.16642,3.0531,2.95976,3.86067,2.61377,2.90483,4.05748,3.07525,3.00242);
DrawTri(3.86067,2.61377,2.90483,4.16642,3.0531,2.95976,3.96961,2.59162,2.86217);
DrawTri(4.46413,3.14312,3.10786,4.16642,3.0531,2.95976,4.24835,3.34369,3.18427);
DrawTri(4.57559,3.6743,3.79607,4.24835,3.34369,3.18427,4.54977,3.6834,3.80438);
DrawTri(4.57559,3.6743,3.79607,4.54977,3.6834,3.80438,4.62268,3.70395,3.9531);
DrawTri(3.8817,2.3594,2.65382,3.91625,2.04864,2.86311,4.02758,2.0558,2.82149);
DrawTri(3.95819,1.53319,2.88667,4.02758,2.0558,2.82149,3.91625,2.04864,2.86311);
DrawTri(4.02758,2.0558,2.82149,3.95819,1.53319,2.88667,4.06952,1.54035,2.84505);
DrawTri(3.24455,2.47669,2.2453,3.8817,2.3594,2.65382,3.61354,2.76718,2.06011);
DrawTri(3.8817,2.3594,2.65382,3.24455,2.47669,2.2453,3.58259,2.21876,2.69233);
DrawTri(3.45754,2.16213,1.49308,3.28638,1.78212,1.44957,3.18598,2.02607,1.55551);
DrawTri(3.28638,1.78212,1.44957,3.45754,2.16213,1.49308,3.39432,1.7418,1.39817);
DrawTri(4.0846,2.50513,1.98369,3.8817,2.3594,2.65382,4.14655,2.25502,2.48151);
DrawTri(3.8817,2.3594,2.65382,4.0846,2.50513,1.98369,3.64051,2.77258,2.05225);
DrawTri(3.45754,2.16213,1.49308,3.61354,2.76718,2.06011,3.59717,2.65162,1.94123);
DrawTri(3.16917,2.09019,1.63821,3.61354,2.76718,2.06011,3.45754,2.16213,1.49308);
DrawTri(3.61354,2.76718,2.06011,3.16917,2.09019,1.63821,3.16011,2.54109,2.15949);
DrawTri(3.64113,2.76792,2.05258,3.59717,2.65162,1.94123,3.61354,2.76718,2.06011);
DrawTri(3.64051,2.77258,2.05225,3.61354,2.76718,2.06011,3.8817,2.3594,2.65382);
DrawTri(3.76939,2.05517,1.47514,3.39432,1.7418,1.39817,3.45754,2.16213,1.49308);
DrawTri(3.39432,1.7418,1.39817,3.76939,2.05517,1.47514,3.51939,1.75736,1.40401);
DrawTri(3.75821,2.02761,1.52303,3.64113,2.76792,2.05258,4.04764,2.44021,1.97835);
DrawTri(3.75821,2.02761,1.52303,3.59717,2.65162,1.94123,3.64113,2.76792,2.05258);
DrawTri(3.59717,2.65162,1.94123,3.75821,2.02761,1.52303,3.45754,2.16213,1.49308);
DrawTri(3.8817,2.3594,2.65382,4.02758,2.0558,2.82149,4.12682,2.22199,2.53788);
DrawTri(3.8817,2.3594,2.65382,3.63701,2.19102,2.72019,3.91625,2.04864,2.86311);
DrawTri(4.30582,2.54896,2.81899,4.10077,2.23369,2.80799,4.10868,2.24691,2.92606);
DrawTri(4.07506,1.72004,2.86724,4.10868,2.24691,2.92606,4.10077,2.23369,2.80799);
DrawTri(4.10868,2.24691,2.92606,4.07506,1.72004,2.86724,4.08297,1.73326,2.98531);
DrawTri(4.87742,2.65122,2.31956,4.30582,2.54896,2.81899,4.94432,2.9629,2.71099);
DrawTri(4.30582,2.54896,2.81899,4.87742,2.65122,2.31956,4.35688,2.39446,2.52873);
DrawTri(5.5426,2.36943,2.75347,5.63977,1.98392,2.62104,5.56279,2.21994,2.48254);
DrawTri(5.63977,1.98392,2.62104,5.5426,2.36943,2.75347,5.65884,1.94988,2.74103);
DrawTri(4.88732,2.72385,3.19681,4.30582,2.54896,2.81899,4.39696,2.46144,3.12682);
DrawTri(4.30582,2.54896,2.81899,4.88732,2.72385,3.19681,4.94405,2.96969,2.73878);
DrawTri(5.5426,2.36943,2.75347,4.94432,2.9629,2.71099,5.06488,2.85045,2.73497);
DrawTri(5.48727,2.2807,2.43968,4.94432,2.9629,2.71099,5.5426,2.36943,2.75347);
DrawTri(4.94432,2.9629,2.71099,5.48727,2.2807,2.43968,4.98268,2.71454,2.25995);
DrawTri(4.94363,2.96505,2.73951,5.06488,2.85045,2.73497,4.94432,2.9629,2.71099);
DrawTri(4.94405,2.96969,2.73878,4.94432,2.9629,2.71099,4.30582,2.54896,2.81899);
DrawTri(5.47244,2.27659,3.06246,5.65884,1.94988,2.74103,5.5426,2.36943,2.75347);
DrawTri(5.65884,1.94988,2.74103,5.47244,2.27659,3.06246,5.61721,1.97063,2.85831);
DrawTri(5.43022,2.24712,3.03949,4.94363,2.96505,2.73951,4.90412,2.65759,3.16619);
DrawTri(5.43022,2.24712,3.03949,5.06488,2.85045,2.73497,4.94363,2.96505,2.73951);
DrawTri(5.06488,2.85045,2.73497,5.43022,2.24712,3.03949,5.5426,2.36943,2.75347);
DrawTri(4.30582,2.54896,2.81899,4.10868,2.24691,2.92606,4.34915,2.42587,3.09353);
DrawTri(4.30582,2.54896,2.81899,4.31511,2.36824,2.57428,4.10077,2.23369,2.80799);
ctx.fillStyle = 'rgba(100,50,50,0.4)';
DrawTri(4.6421,1.55597,3.3399,4.70526,1.61911,3.44929,4.67457,1.61911,3.39614);
DrawTri(4.63651,1.50217,3.33022,4.70526,1.61911,3.44929,4.6421,1.55597,3.3399);
DrawTri(4.63651,1.50217,3.33022,4.69714,1.43596,3.43522,4.70526,1.61911,3.44929);
DrawTri(4.61319,1.48561,3.28982,4.69714,1.43596,3.43522,4.63651,1.50217,3.33022);
DrawTri(4.69714,1.43596,3.43522,4.62573,1.41808,3.31154,4.71963,1.43197,3.47417);
DrawTri(4.62573,1.41808,3.31154,4.69714,1.43596,3.43522,4.61319,1.48561,3.28982);
DrawTri(4.724,1.53401,3.48174,4.75307,1.4924,3.5321,4.73868,1.53401,3.50718);
DrawTri(4.71223,1.48376,3.46137,4.75307,1.4924,3.5321,4.724,1.53401,3.48174);
DrawTri(4.71223,1.48376,3.46137,4.76857,1.4924,3.55895,4.75307,1.4924,3.5321);
DrawTri(4.71223,1.48376,3.46137,4.77676,1.45325,3.57313,4.76857,1.4924,3.55895);
DrawTri(4.71963,1.43197,3.47417,4.77676,1.45325,3.57313,4.71223,1.48376,3.46137);
DrawTri(4.66057,1.40072,3.37188,4.71963,1.43197,3.47417,4.62573,1.41808,3.31154);
DrawTri(4.66057,1.40072,3.37188,4.77676,1.45325,3.57313,4.71963,1.43197,3.47417);
DrawTri(4.66057,1.40072,3.37188,4.76461,1.37536,3.55209,4.77676,1.45325,3.57313);
DrawTri(4.65122,1.32576,3.3557,4.76461,1.37536,3.55209,4.66057,1.40072,3.37188);
DrawTri(4.65122,1.32576,3.3557,4.77748,1.30542,3.57439,4.76461,1.37536,3.55209);
DrawTri(4.65122,1.32576,3.3557,4.79733,1.2824,3.60876,4.77748,1.30542,3.57439);
DrawTri(4.65921,1.28236,3.36952,4.79733,1.2824,3.60876,4.65122,1.32576,3.3557);
DrawTri(4.64469,1.23765,3.34438,4.79733,1.2824,3.60876,4.65921,1.28236,3.36952);
DrawTri(4.64469,1.23765,3.34438,4.79733,1.23477,3.60876,4.79733,1.2824,3.60876);
DrawTri(4.64469,1.23765,3.34438,4.76938,1.19145,3.56036,4.79733,1.23477,3.60876);
DrawTri(4.68919,1.14511,3.42145,4.76938,1.19145,3.56036,4.64469,1.23765,3.34438);
DrawTri(4.68919,1.14511,3.42145,4.75815,1.1431,3.54091,4.76938,1.19145,3.56036);
DrawTri(4.68919,1.14511,3.42145,4.76551,1.10738,3.55364,4.75815,1.1431,3.54091);
DrawTri(4.68002,1.09621,3.40557,4.76551,1.10738,3.55364,4.68919,1.14511,3.42145);
DrawTri(4.68567,1.07511,3.41536,4.76551,1.10738,3.55364,4.68002,1.09621,3.40557);
DrawTri(4.76551,1.10738,3.55364,4.68567,1.07511,3.41536,4.75815,1.07511,3.54091);
DrawTri(4.77284,1.5584,3.52075,4.68624,1.62439,3.62037,4.72832,1.62439,3.57197);
DrawTri(4.7805,1.50218,3.51194,4.68624,1.62439,3.62037,4.77284,1.5584,3.52075);
DrawTri(4.7805,1.50218,3.51194,4.69738,1.43299,3.60757,4.68624,1.62439,3.62037);
DrawTri(4.81249,1.48487,3.47514,4.69738,1.43299,3.60757,4.7805,1.50218,3.51194);
DrawTri(4.69738,1.43299,3.60757,4.79529,1.41431,3.49493,4.66654,1.42883,3.64304);
DrawTri(4.79529,1.41431,3.49493,4.69738,1.43299,3.60757,4.81249,1.48487,3.47514);
DrawTri(4.66055,1.53546,3.64993,4.62069,1.49197,3.69579,4.64041,1.53546,3.6731);
DrawTri(4.67668,1.48294,3.63138,4.62069,1.49197,3.69579,4.66055,1.53546,3.64993);
DrawTri(4.67668,1.48294,3.63138,4.59943,1.49197,3.72024,4.62069,1.49197,3.69579);
DrawTri(4.67668,1.48294,3.63138,4.5882,1.45107,3.73316,4.59943,1.49197,3.72024);
DrawTri(4.66654,1.42883,3.64304,4.5882,1.45107,3.73316,4.67668,1.48294,3.63138);
DrawTri(4.74752,1.39616,3.54988,4.66654,1.42883,3.64304,4.79529,1.41431,3.49493);
DrawTri(4.74752,1.39616,3.54988,4.5882,1.45107,3.73316,4.66654,1.42883,3.64304);
DrawTri(4.74752,1.39616,3.54988,4.60486,1.36966,3.71399,4.5882,1.45107,3.73316);
DrawTri(4.76033,1.31784,3.53514,4.60486,1.36966,3.71399,4.74752,1.39616,3.54988);
DrawTri(4.76033,1.31784,3.53514,4.58721,1.29658,3.7343,4.60486,1.36966,3.71399);
DrawTri(4.76033,1.31784,3.53514,4.56,1.27252,3.7656,4.58721,1.29658,3.7343);
DrawTri(4.74939,1.27249,3.54773,4.56,1.27252,3.7656,4.76033,1.31784,3.53514);
DrawTri(4.76929,1.22576,3.52484,4.56,1.27252,3.7656,4.74939,1.27249,3.54773);
DrawTri(4.76929,1.22576,3.52484,4.56,1.22275,3.7656,4.56,1.27252,3.7656);
DrawTri(4.76929,1.22576,3.52484,4.59832,1.17748,3.72152,4.56,1.22275,3.7656);
DrawTri(4.70828,1.12905,3.59502,4.59832,1.17748,3.72152,4.76929,1.22576,3.52484);
DrawTri(4.70828,1.12905,3.59502,4.61371,1.12695,3.70381,4.59832,1.17748,3.72152);
DrawTri(4.70828,1.12905,3.59502,4.60363,1.08963,3.71541,4.61371,1.12695,3.70381);
DrawTri(4.72085,1.07795,3.58056,4.60363,1.08963,3.71541,4.70828,1.12905,3.59502);
DrawTri(4.7131,1.05591,3.58948,4.60363,1.08963,3.71541,4.72085,1.07795,3.58056);
DrawTri(4.60363,1.08963,3.71541,4.7131,1.05591,3.58948,4.61371,1.05591,3.70381);
DrawTri(4.67263,1.64806,3.71716,4.52264,1.727,3.66784,4.59551,1.727,3.6918);
DrawTri(4.6859,1.58082,3.72152,4.52264,1.727,3.66784,4.67263,1.64806,3.71716);
DrawTri(4.6859,1.58082,3.72152,4.54192,1.49806,3.67418,4.52264,1.727,3.66784);
DrawTri(4.7413,1.56012,3.73974,4.54192,1.49806,3.67418,4.6859,1.58082,3.72152);
DrawTri(4.54192,1.49806,3.67418,4.71152,1.47571,3.72994,4.48852,1.49307,3.65662);
DrawTri(4.71152,1.47571,3.72994,4.54192,1.49806,3.67418,4.7413,1.56012,3.73974);
DrawTri(4.47814,1.62063,3.65321,4.40909,1.56861,3.63051,4.44326,1.62063,3.64174);
DrawTri(4.50607,1.55781,3.6624,4.40909,1.56861,3.63051,4.47814,1.62063,3.65321);
DrawTri(4.50607,1.55781,3.6624,4.37227,1.56861,3.61841,4.40909,1.56861,3.63051);
DrawTri(4.50607,1.55781,3.6624,4.35283,1.51968,3.61201,4.37227,1.56861,3.61841);
DrawTri(4.48852,1.49307,3.65662,4.35283,1.51968,3.61201,4.50607,1.55781,3.6624);
DrawTri(4.62878,1.454,3.70274,4.48852,1.49307,3.65662,4.71152,1.47571,3.72994);
DrawTri(4.62878,1.454,3.70274,4.35283,1.51968,3.61201,4.48852,1.49307,3.65662);
DrawTri(4.62878,1.454,3.70274,4.38168,1.42231,3.6215,4.35283,1.51968,3.61201);
DrawTri(4.65097,1.36031,3.71004,4.38168,1.42231,3.6215,4.62878,1.454,3.70274);
DrawTri(4.65097,1.36031,3.71004,4.35111,1.33488,3.61145,4.38168,1.42231,3.6215);
DrawTri(4.65097,1.36031,3.71004,4.30397,1.3061,3.59595,4.35111,1.33488,3.61145);
DrawTri(4.63201,1.30606,3.7038,4.30397,1.3061,3.59595,4.65097,1.36031,3.71004);
DrawTri(4.66648,1.25017,3.71514,4.30397,1.3061,3.59595,4.63201,1.30606,3.7038);
DrawTri(4.66648,1.25017,3.71514,4.30397,1.24657,3.59595,4.30397,1.3061,3.59595);
DrawTri(4.66648,1.25017,3.71514,4.37035,1.19242,3.61777,4.30397,1.24657,3.59595);
DrawTri(4.56081,1.13449,3.68039,4.37035,1.19242,3.61777,4.66648,1.25017,3.71514);
DrawTri(4.56081,1.13449,3.68039,4.39702,1.13198,3.62654,4.37035,1.19242,3.61777);
DrawTri(4.56081,1.13449,3.68039,4.37955,1.08734,3.6208,4.39702,1.13198,3.62654);
DrawTri(4.58259,1.07337,3.68755,4.37955,1.08734,3.6208,4.56081,1.13449,3.68039);
DrawTri(4.56916,1.047,3.68314,4.37955,1.08734,3.6208,4.58259,1.07337,3.68755);
DrawTri(4.37955,1.08734,3.6208,4.56916,1.047,3.68314,4.39702,1.047,3.62654);
DrawTri(4.28666,2.47175,2.79027,4.23859,2.56461,2.9697,4.26195,2.56461,2.88252);
DrawTri(4.29092,2.39264,2.77439,4.23859,2.56461,2.9697,4.28666,2.47175,2.79027);
DrawTri(4.29092,2.39264,2.77439,4.24477,2.29527,2.94663,4.23859,2.56461,2.9697);
DrawTri(4.30868,2.36828,2.70812,4.24477,2.29527,2.94663,4.29092,2.39264,2.77439);
DrawTri(4.24477,2.29527,2.94663,4.29913,2.26898,2.74375,4.22765,2.28941,3.01051);
DrawTri(4.29913,2.26898,2.74375,4.24477,2.29527,2.94663,4.30868,2.36828,2.70812);
DrawTri(4.22432,2.43947,3.02292,4.20219,2.37827,3.10552,4.21314,2.43947,3.06465);
DrawTri(4.23328,2.36556,2.98951,4.20219,2.37827,3.10552,4.22432,2.43947,3.02292);
DrawTri(4.23328,2.36556,2.98951,4.19039,2.37827,3.14957,4.20219,2.37827,3.10552);
DrawTri(4.23328,2.36556,2.98951,4.18416,2.3207,3.17283,4.19039,2.37827,3.14957);
DrawTri(4.22765,2.28941,3.01051,4.18416,2.3207,3.17283,4.23328,2.36556,2.98951);
DrawTri(4.27261,2.24344,2.84272,4.22765,2.28941,3.01051,4.29913,2.26898,2.74375);
DrawTri(4.27261,2.24344,2.84272,4.18416,2.3207,3.17283,4.22765,2.28941,3.01051);
DrawTri(4.27261,2.24344,2.84272,4.19341,2.20615,3.13831,4.18416,2.3207,3.17283);
DrawTri(4.27972,2.13321,2.81618,4.19341,2.20615,3.13831,4.27261,2.24344,2.84272);
DrawTri(4.27972,2.13321,2.81618,4.18361,2.1033,3.17488,4.19341,2.20615,3.13831);
DrawTri(4.27972,2.13321,2.81618,4.1685,2.06944,3.23127,4.18361,2.1033,3.17488);
DrawTri(4.27364,2.0694,2.83886,4.1685,2.06944,3.23127,4.27972,2.13321,2.81618);
DrawTri(4.28469,2.00364,2.79763,4.1685,2.06944,3.23127,4.27364,2.0694,2.83886);
DrawTri(4.28469,2.00364,2.79763,4.1685,1.99941,3.23127,4.1685,2.06944,3.23127);
DrawTri(4.28469,2.00364,2.79763,4.18977,1.93569,3.15187,4.1685,1.99941,3.23127);
DrawTri(4.25082,1.86755,2.92403,4.18977,1.93569,3.15187,4.28469,2.00364,2.79763);
DrawTri(4.25082,1.86755,2.92403,4.19832,1.86459,3.11997,4.18977,1.93569,3.15187);
DrawTri(4.25082,1.86755,2.92403,4.19272,1.81207,3.14086,4.19832,1.86459,3.11997);
DrawTri(4.2578,1.79564,2.89798,4.19272,1.81207,3.14086,4.25082,1.86755,2.92403);
DrawTri(4.2535,1.76461,2.91405,4.19272,1.81207,3.14086,4.2578,1.79564,2.89798);
DrawTri(4.19272,1.81207,3.14086,4.2535,1.76461,2.91405,4.19832,1.76461,3.11997);
DrawTri(4.23455,2.47533,3.11428,4.04091,2.57237,3.12782,4.13499,2.57237,3.12125);
DrawTri(4.25169,2.39266,3.11309,4.04091,2.57237,3.12782,4.23455,2.47533,3.11428);
DrawTri(4.25169,2.39266,3.11309,4.0658,2.29091,3.12608,4.04091,2.57237,3.12782);
DrawTri(4.3232,2.3672,3.10808,4.0658,2.29091,3.12608,4.25169,2.39266,3.11309);
DrawTri(4.0658,2.29091,3.12608,4.28475,2.26344,3.11077,3.99686,2.28478,3.1309);
DrawTri(4.28475,2.26344,3.11077,4.0658,2.29091,3.12608,4.3232,2.3672,3.10808);
DrawTri(3.98346,2.44159,3.13184,3.89432,2.37764,3.13807,3.93843,2.44159,3.13499);
DrawTri(4.01952,2.36436,3.12932,3.89432,2.37764,3.13807,3.98346,2.44159,3.13184);
DrawTri(4.01952,2.36436,3.12932,3.84679,2.37764,3.1414,3.89432,2.37764,3.13807);
DrawTri(4.01952,2.36436,3.12932,3.82168,2.31748,3.14315,3.84679,2.37764,3.1414);
DrawTri(3.99686,2.28478,3.1309,3.82168,2.31748,3.14315,4.01952,2.36436,3.12932);
DrawTri(4.17794,2.23675,3.11824,3.99686,2.28478,3.1309,4.28475,2.26344,3.11077);
DrawTri(4.17794,2.23675,3.11824,3.82168,2.31748,3.14315,3.99686,2.28478,3.1309);
DrawTri(4.17794,2.23675,3.11824,3.85894,2.19778,3.14055,3.82168,2.31748,3.14315);
DrawTri(4.20658,2.12156,3.11624,3.85894,2.19778,3.14055,4.17794,2.23675,3.11824);
DrawTri(4.20658,2.12156,3.11624,3.81946,2.0903,3.14331,3.85894,2.19778,3.14055);
DrawTri(4.20658,2.12156,3.11624,3.75861,2.05491,3.14756,3.81946,2.0903,3.14331);
DrawTri(4.18211,2.05487,3.11795,3.75861,2.05491,3.14756,4.20658,2.12156,3.11624);
DrawTri(4.22661,1.98615,3.11484,3.75861,2.05491,3.14756,4.18211,2.05487,3.11795);
DrawTri(4.22661,1.98615,3.11484,3.75861,1.98173,3.14756,3.75861,2.05491,3.14756);
DrawTri(4.22661,1.98615,3.11484,3.8443,1.91515,3.14157,3.75861,1.98173,3.14756);
DrawTri(4.09019,1.84394,3.12438,3.8443,1.91515,3.14157,4.22661,1.98615,3.11484);
DrawTri(4.09019,1.84394,3.12438,3.87873,1.84084,3.13916,3.8443,1.91515,3.14157);
DrawTri(4.09019,1.84394,3.12438,3.85618,1.78596,3.14074,3.87873,1.84084,3.13916);
DrawTri(4.1183,1.76879,3.12241,3.85618,1.78596,3.14074,4.09019,1.84394,3.12438);
DrawTri(4.10097,1.73637,3.12362,3.85618,1.78596,3.14074,4.1183,1.76879,3.12241);
DrawTri(3.85618,1.78596,3.14074,4.10097,1.73637,3.12362,3.87873,1.73637,3.13916);
DrawTri(3.92611,2.60719,3.21432,3.82142,2.72327,3.00706,3.87228,2.72327,3.10776);
DrawTri(3.93538,2.5083,3.23266,3.82142,2.72327,3.00706,3.92611,2.60719,3.21432);
DrawTri(3.93538,2.5083,3.23266,3.83488,2.38659,3.03371,3.82142,2.72327,3.00706);
DrawTri(3.97404,2.47786,3.3092,3.83488,2.38659,3.03371,3.93538,2.5083,3.23266);
DrawTri(3.83488,2.38659,3.03371,3.95325,2.35373,3.26805,3.7976,2.37926,2.95991);
DrawTri(3.95325,2.35373,3.26805,3.83488,2.38659,3.03371,3.97404,2.47786,3.3092);
DrawTri(3.79036,2.56684,2.94558,3.74217,2.49034,2.85017,3.76601,2.56684,2.89738);
DrawTri(3.80986,2.47446,2.98417,3.74217,2.49034,2.85017,3.79036,2.56684,2.94558);
DrawTri(3.80986,2.47446,2.98417,3.71647,2.49034,2.79929,3.74217,2.49034,2.85017);
DrawTri(3.80986,2.47446,2.98417,3.7029,2.41838,2.77242,3.71647,2.49034,2.79929);
DrawTri(3.7976,2.37926,2.95991,3.7029,2.41838,2.77242,3.80986,2.47446,2.98417);
DrawTri(3.8955,2.32181,3.15372,3.7976,2.37926,2.95991,3.95325,2.35373,3.26805);
DrawTri(3.8955,2.32181,3.15372,3.7029,2.41838,2.77242,3.7976,2.37926,2.95991);
DrawTri(3.8955,2.32181,3.15372,3.72304,2.27519,2.8123,3.7029,2.41838,2.77242);
DrawTri(3.91099,2.18402,3.18438,3.72304,2.27519,2.8123,3.8955,2.32181,3.15372);
DrawTri(3.91099,2.18402,3.18438,3.7017,2.14663,2.77005,3.72304,2.27519,2.8123);
DrawTri(3.91099,2.18402,3.18438,3.6688,2.1043,2.70492,3.7017,2.14663,2.77005);
DrawTri(3.89776,2.10425,3.15819,3.6688,2.1043,2.70492,3.91099,2.18402,3.18438);
DrawTri(3.92182,2.02205,3.20581,3.6688,2.1043,2.70492,3.89776,2.10425,3.15819);
DrawTri(3.92182,2.02205,3.20581,3.6688,2.01676,2.70492,3.6688,2.1043,2.70492);
DrawTri(3.92182,2.02205,3.20581,3.71512,1.93712,2.79663,3.6688,2.01676,2.70492);
DrawTri(3.84806,1.85194,3.0598,3.71512,1.93712,2.79663,3.92182,2.02205,3.20581);
DrawTri(3.84806,1.85194,3.0598,3.73374,1.84824,2.83348,3.71512,1.93712,2.79663);
DrawTri(3.84806,1.85194,3.0598,3.72155,1.78259,2.80935,3.73374,1.84824,2.83348);
DrawTri(3.86326,1.76205,3.08989,3.72155,1.78259,2.80935,3.84806,1.85194,3.0598);
DrawTri(3.85389,1.72327,3.07134,3.72155,1.78259,2.80935,3.86326,1.76205,3.08989);
DrawTri(3.72155,1.78259,2.80935,3.85389,1.72327,3.07134,3.73374,1.72327,2.83348);
ctx.fillStyle = 'rgba(255,120,120,0.4)';
DrawTri(4.56059,-0.124824,3.59049,4.53813,1.78054,3.53554,4.56746,1.78054,3.56487);
DrawTri(4.53813,1.78054,3.53554,4.56059,-0.124824,3.59049,4.51251,-0.124824,3.5424);
DrawTri(4.58893,1.78054,3.48474,4.64387,-0.124824,3.5072,4.61826,1.78054,3.51407);
DrawTri(4.64387,-0.124824,3.5072,4.58893,1.78054,3.48474,4.59579,-0.124824,3.45912);
DrawTri(4.64387,-0.124824,3.5072,4.60752,1.78054,3.55413,4.61826,1.78054,3.51407);
DrawTri(4.60752,1.78054,3.55413,4.64387,-0.124824,3.5072,4.62628,-0.124824,3.57289);
DrawTri(4.62628,-0.124824,3.57289,4.56746,1.78054,3.56487,4.60752,1.78054,3.55413);
DrawTri(4.56746,1.78054,3.56487,4.62628,-0.124824,3.57289,4.56059,-0.124824,3.59049);
DrawTri(4.51251,-0.124824,3.5424,4.54886,1.78054,3.49547,4.53813,1.78054,3.53554);
DrawTri(4.54886,1.78054,3.49547,4.51251,-0.124824,3.5424,4.53011,-0.124824,3.47672);
DrawTri(4.53011,-0.124824,3.47672,4.58893,1.78054,3.48474,4.54886,1.78054,3.49547);
DrawTri(4.58893,1.78054,3.48474,4.53011,-0.124824,3.47672,4.59579,-0.124824,3.45912);
DrawTri(4.60752,1.78054,3.55413,4.58893,1.78054,3.48474,4.61826,1.78054,3.51407);
DrawTri(4.60752,1.78054,3.55413,4.54886,1.78054,3.49547,4.58893,1.78054,3.48474);
DrawTri(4.56746,1.78054,3.56487,4.54886,1.78054,3.49547,4.60752,1.78054,3.55413);
DrawTri(4.54886,1.78054,3.49547,4.56746,1.78054,3.56487,4.53813,1.78054,3.53554);
DrawTri(4.53011,-0.124824,3.47672,4.64387,-0.124824,3.5072,4.59579,-0.124824,3.45912);
DrawTri(4.53011,-0.124824,3.47672,4.62628,-0.124824,3.57289,4.64387,-0.124824,3.5072);
DrawTri(4.53011,-0.124824,3.47672,4.56059,-0.124824,3.59049,4.62628,-0.124824,3.57289);
DrawTri(4.56059,-0.124824,3.59049,4.53011,-0.124824,3.47672,4.51251,-0.124824,3.5424);
DrawTri(4.41041,2.09897,3.68715,4.55057,1.84108,3.54698,4.44985,2.14981,3.6477);
DrawTri(4.55057,1.84108,3.54698,4.51837,1.72235,3.57918,4.61273,1.80801,3.48482);
DrawTri(4.51837,1.72235,3.57918,4.55057,1.84108,3.54698,4.41041,2.09897,3.68715);
DrawTri(4.56022,2.1352,3.53733,4.59869,2.03728,3.49886,4.59869,2.1352,3.49886);
DrawTri(4.55057,1.84108,3.54698,4.59869,2.03728,3.49886,4.56022,2.1352,3.53733);
DrawTri(4.59869,2.03728,3.49886,4.55057,1.84108,3.54698,4.61273,1.80801,3.48482);
DrawTri(4.81771,2.06836,3.27984,4.70902,1.83755,3.38853,4.85948,2.00259,3.23808);
DrawTri(4.61273,1.80801,3.48482,4.70902,1.83755,3.38853,4.81771,2.06836,3.27984);
DrawTri(4.51837,1.72235,3.57918,4.70902,1.83755,3.38853,4.61273,1.80801,3.48482);
DrawTri(4.51837,1.72235,3.57918,4.62433,1.65913,3.47322,4.70902,1.83755,3.38853);
DrawTri(4.4674,1.59695,3.63015,4.62433,1.65913,3.47322,4.51837,1.72235,3.57918);
DrawTri(4.4674,1.59695,3.63015,4.62862,1.53626,3.46894,4.62433,1.65913,3.47322);
DrawTri(4.47963,1.47791,3.61792,4.62862,1.53626,3.46894,4.4674,1.59695,3.63015);
DrawTri(4.62862,1.53626,3.46894,4.47963,1.47791,3.61792,4.5838,1.27623,3.51375);
DrawTri(4.5838,1.27623,3.51375,4.53829,1.80801,3.46824,4.55233,2.03728,3.48228);
DrawTri(4.5838,1.27623,3.51375,4.52668,1.65913,3.45663,4.53829,1.80801,3.46824);
DrawTri(4.52668,1.65913,3.45663,4.5838,1.27623,3.51375,4.5224,1.53626,3.45235);
DrawTri(4.65917,1.35887,3.58912,4.68361,1.59695,3.61357,4.72906,1.50791,3.65902);
DrawTri(4.65917,1.35887,3.58912,4.66361,1.6629,3.59356,4.68361,1.59695,3.61357);
DrawTri(4.65917,1.35887,3.58912,4.63041,1.71456,3.56036,4.66361,1.6629,3.59356);
DrawTri(4.65917,1.35887,3.58912,4.60045,1.84108,3.5304,4.63041,1.71456,3.56036);
DrawTri(4.5838,1.27623,3.51375,4.60045,1.84108,3.5304,4.65917,1.35887,3.58912);
DrawTri(4.5838,1.27623,3.51375,4.5908,2.1352,3.52075,4.60045,1.84108,3.5304);
DrawTri(4.55233,2.03728,3.48228,4.5908,2.1352,3.52075,4.5838,1.27623,3.51375);
DrawTri(4.5908,2.1352,3.52075,4.55233,2.03728,3.48228,4.55233,2.1352,3.48228);
DrawTri(4.68361,1.59695,3.61357,4.87816,1.85968,3.80811,4.87816,1.79556,3.80811);
DrawTri(4.87816,1.85968,3.80811,4.68361,1.59695,3.61357,4.66361,1.6629,3.59356);
DrawTri(4.63041,1.71456,3.56036,4.70116,2.14981,3.63111,4.74061,2.09897,3.67056);
DrawTri(4.70116,2.14981,3.63111,4.63041,1.71456,3.56036,4.60045,1.84108,3.5304);
DrawTri(4.442,1.83755,3.37195,4.53829,1.80801,3.46824,4.52668,1.65913,3.45663);
DrawTri(4.442,1.83755,3.37195,4.33331,2.06836,3.26326,4.53829,1.80801,3.46824);
DrawTri(4.33331,2.06836,3.26326,4.442,1.83755,3.37195,4.29154,2.00259,3.22149);
DrawTri(3.94133,2.03038e-016,2.96609,3.9751,2.802,2.88559,3.9751,2.802,2.94659);
DrawTri(3.9751,2.802,2.88559,3.94133,2.03038e-016,2.96609,3.94133,2.03038e-016,2.86609);
DrawTri(4.08076,2.802,2.88559,4.11453,2.03038e-016,2.96609,4.08076,2.802,2.94659);
DrawTri(4.11453,2.03038e-016,2.96609,4.08076,2.802,2.88559,4.11453,2.03038e-016,2.86609);
DrawTri(4.11453,2.03038e-016,2.96609,4.02793,2.802,2.97709,4.08076,2.802,2.94659);
DrawTri(4.02793,2.802,2.97709,4.11453,2.03038e-016,2.96609,4.02793,2.03038e-016,3.01609);
DrawTri(4.02793,2.03038e-016,3.01609,3.9751,2.802,2.94659,4.02793,2.802,2.97709);
DrawTri(3.9751,2.802,2.94659,4.02793,2.03038e-016,3.01609,3.94133,2.03038e-016,2.96609);
DrawTri(3.94133,2.03038e-016,2.86609,4.02793,2.802,2.85509,3.9751,2.802,2.88559);
DrawTri(4.02793,2.802,2.85509,3.94133,2.03038e-016,2.86609,4.02793,2.03038e-016,2.81609);
DrawTri(4.02793,2.03038e-016,2.81609,4.08076,2.802,2.88559,4.02793,2.802,2.85509);
DrawTri(4.08076,2.802,2.88559,4.02793,2.03038e-016,2.81609,4.11453,2.03038e-016,2.86609);
DrawTri(4.02793,2.802,2.97709,4.08076,2.802,2.88559,4.08076,2.802,2.94659);
DrawTri(4.02793,2.802,2.97709,4.02793,2.802,2.85509,4.08076,2.802,2.88559);
DrawTri(3.9751,2.802,2.94659,4.02793,2.802,2.85509,4.02793,2.802,2.97709);
DrawTri(4.02793,2.802,2.85509,3.9751,2.802,2.94659,3.9751,2.802,2.88559);
DrawTri(4.02793,2.03038e-016,2.81609,4.11453,2.03038e-016,2.96609,4.11453,2.03038e-016,2.86609);
DrawTri(4.02793,2.03038e-016,2.81609,4.02793,2.03038e-016,3.01609,4.11453,2.03038e-016,2.96609);
DrawTri(4.02793,2.03038e-016,2.81609,3.94133,2.03038e-016,2.96609,4.02793,2.03038e-016,3.01609);
DrawTri(3.94133,2.03038e-016,2.96609,4.02793,2.03038e-016,2.81609,3.94133,2.03038e-016,2.86609);
DrawTri(3.68464,3.27028,2.91043,3.97614,2.89104,2.91043,3.76668,3.34505,2.91043);
DrawTri(3.97614,2.89104,2.91043,3.90918,2.71643,2.91043,4.10542,2.8424,2.91043);
DrawTri(3.90918,2.71643,2.91043,3.97614,2.89104,2.91043,3.68464,3.27028,2.91043);
DrawTri(3.99622,3.32357,2.91043,4.07622,3.17957,2.91043,4.07622,3.32357,2.91043);
DrawTri(3.97614,2.89104,2.91043,4.07622,3.17957,2.91043,3.99622,3.32357,2.91043);
DrawTri(4.07622,3.17957,2.91043,3.97614,2.89104,2.91043,4.10542,2.8424,2.91043);
DrawTri(4.53172,3.22527,2.91043,4.30567,2.88584,2.91043,4.61859,3.12856,2.91043);
DrawTri(4.10542,2.8424,2.91043,4.30567,2.88584,2.91043,4.53172,3.22527,2.91043);
DrawTri(3.90918,2.71643,2.91043,4.30567,2.88584,2.91043,4.10542,2.8424,2.91043);
DrawTri(3.90918,2.71643,2.91043,4.12955,2.62347,2.91043,4.30567,2.88584,2.91043);
DrawTri(3.80318,2.53202,2.91043,4.12955,2.62347,2.91043,3.90918,2.71643,2.91043);
DrawTri(3.80318,2.53202,2.91043,4.13846,2.44276,2.91043,4.12955,2.62347,2.91043);
DrawTri(3.8286,2.35697,2.91043,4.13846,2.44276,2.91043,3.80318,2.53202,2.91043);
DrawTri(4.13846,2.44276,2.91043,3.8286,2.35697,2.91043,4.04525,2.06038,2.91043);
DrawTri(4.04525,2.06038,2.91043,4.04525,2.8424,2.81578,4.04525,3.17957,2.84498);
DrawTri(4.04525,2.06038,2.91043,4.04525,2.62347,2.79164,4.04525,2.8424,2.81578);
DrawTri(4.04525,2.62347,2.79164,4.04525,2.06038,2.91043,4.04525,2.44276,2.78274);
DrawTri(4.04525,2.18191,3.06717,4.04525,2.53202,3.11801,4.04525,2.40108,3.21254);
DrawTri(4.04525,2.18191,3.06717,4.04525,2.62901,3.07641,4.04525,2.53202,3.11801);
DrawTri(4.04525,2.18191,3.06717,4.04525,2.70497,3.00737,4.04525,2.62901,3.07641);
DrawTri(4.04525,2.18191,3.06717,4.04525,2.89104,2.94505,4.04525,2.70497,3.00737);
DrawTri(4.04525,2.06038,2.91043,4.04525,2.89104,2.94505,4.04525,2.18191,3.06717);
DrawTri(4.04525,2.06038,2.91043,4.04525,3.32357,2.92498,4.04525,2.89104,2.94505);
DrawTri(4.04525,3.17957,2.84498,4.04525,3.32357,2.92498,4.04525,2.06038,2.91043);
DrawTri(4.04525,3.32357,2.92498,4.04525,3.17957,2.84498,4.04525,3.32357,2.84498);
DrawTri(4.04525,2.53202,3.11801,4.04525,2.91839,3.52261,4.04525,2.82409,3.52261);
DrawTri(4.04525,2.91839,3.52261,4.04525,2.53202,3.11801,4.04525,2.62901,3.07641);
DrawTri(4.04525,2.70497,3.00737,4.04525,3.34505,3.15451,4.04525,3.27028,3.23655);
DrawTri(4.04525,3.34505,3.15451,4.04525,2.70497,3.00737,4.04525,2.89104,2.94505);
DrawTri(4.04525,2.88584,2.61552,4.04525,2.8424,2.81578,4.04525,2.62347,2.79164);
DrawTri(4.04525,2.88584,2.61552,4.04525,3.22527,2.38947,4.04525,2.8424,2.81578);
DrawTri(4.04525,3.22527,2.38947,4.04525,2.88584,2.61552,4.04525,3.12856,2.30261);
}
var t = 0;
// Dibuja un Bosque
function draw()
{
if (canvas.getContext)
{
ctx.fillStyle = 'rgba(255,255,255,1)';
ctx.fillRect(0,0,1000,800);
t+= 0.1;
// Bounding Box de la palmera
var min_x = 1.184250;
var min_y = -0.124824;
var min_z = 1.17678;
var max_x = 6.033;
var max_y = 5.23582;
var max_z = 4.96582;
// Quiero mirar el centro de la palmera
// LA = Look At = Objetivo = a donde apunta la camara
var LAx = (min_x + max_x) / 2;
var LAy = (min_y + max_y) / 2;
var LAz = (min_z + max_z) / 2;
// Calculo el punto de vista = la posicion del observador (camara u ojo)
// girando alrededor del centro de la palmera
var LFx = LAx + Math.sin(t) * 2;
var LFy = LAy ;
var LFz = LAz + Math.cos(t) * 2;
// Calculo la transformacion para pasar todo al espacio del camara
// La Z es la direccion hacia la camara,
// La Y es la direccion hacia arriba
// La X es la direccion hacia la derecha.
// Eje z = normalizado( LA - LF)
var Zx = LAx - LFx;
var Zy = LAy - LFy;
var Zz = LAz - LFz;
var len = Math.sqrt(Zx*Zx + Zy*Zy + Zz*Zz);
Zx /= len;
Zy /= len;
Zz /= len;
// Eje x = normalizado ( cross ( Up = (0,1,0) , Eje z))
var Xx = Zz;
var Xy = 0;
var Xz = -Zx;
len = Math.sqrt(Xx*Xx + Xy*Xy + Xz*Xz);
Xx /= len;
Xy /= len;
Xz /= len;
// cross ( Eje z , Eje x)
var Yx = Zy*Xz-Zz*Xy;
var Yy = Zz*Xx-Zx*Xz;
var Yz = Zx*Xy-Zy*Xx;
// Ya tengo las 3 direcciones, son una Base Ortonormal de R3
// la matriz creada asi es la matriz de cambio de bases.
// Armo la matriz de View: Parte de Rotacion
m11 = Xx; m12 = Yx; m13 = Zx;
m21 = Xy; m22 = Yy; m23 = Zy;
m31 = Xz; m32 = Yz; m33 = Zz;
// Parte de Translacion
// -dot (x , LA)
tras_x = - (Xx*LAx + Xy*LAy + Xz*LAz);
// -dot (y , LA)
tras_y = - (Yx*LAx + Yy*LAy + Yz*LAz);
// -dot (z , LA)
tras_z = - (Zx*LAx + Zy*LAy + Zz*LAz);
palmera();
}
}
function animate()
{
canvas = document.getElementById('mycanvas');
ctx = canvas.getContext('2d');
setInterval(draw, 100);
}
</script>
</head>
<body onload="animate();">
<canvas id="mycanvas" width="1000" height="700"></canvas>
</body>
</html>