remove old font files
This commit is contained in:
10
fonts/0.dsc
10
fonts/0.dsc
@@ -1,10 +0,0 @@
|
||||
x ~0.0666666701436 y ~0.199999943376 x ~0.0666666701436 y 0.0666666701436 x 0.0666666701436 y 0.0666666701436
|
||||
x 0.0666666701436 y 0.0666666701436 x 0.0666666701436 y ~0.199999943376 x ~0.0666666701436 y ~0.199999943376
|
||||
x ~0.200000017881 y 0.466666638851 x 0.199999943376 y 0.466666638851 x 0.199999943376 y 0.333333343267
|
||||
x 0.199999943376 y 0.333333343267 x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y 0.466666638851
|
||||
x 0.333333283663 y 0.333333343267 x 0.199999943376 y 0.333333343267 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x 0.333333283663 y ~0.466666638851 x 0.333333283663 y 0.333333343267
|
||||
x 0.199999943376 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.599999964237
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y 0.333333343267
|
||||
x ~0.333333343267 y 0.333333343267 x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y ~0.466666638851
|
||||
@@ -1,8 +0,0 @@
|
||||
x ~0.333333343267 y 0.0666666701436 x ~0.333333343267 y 0.200000017881 x ~0.200000017881 y 0.200000017881
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.333333343267 x ~0.0666666701436 y 0.333333343267 x ~0.0666666701436 y 0.200000017881
|
||||
x ~0.0666666701436 y 0.200000017881 x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y 0.333333343267
|
||||
x 0.0666666701436 y 0.466666638851 x 0.0666666701436 y ~0.466666638851 x ~0.0666666701436 y ~0.466666638851
|
||||
x ~0.0666666701436 y ~0.466666638851 x ~0.0666666701436 y 0.466666638851 x 0.0666666701436 y 0.466666638851
|
||||
x 0.333333283663 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y ~0.599999964237
|
||||
x ~0.333333343267 y ~0.599999964237 x 0.333333283663 y ~0.599999964237 x 0.333333283663 y ~0.466666638851
|
||||
16
fonts/2.dsc
16
fonts/2.dsc
@@ -1,16 +0,0 @@
|
||||
x ~0.333333343267 y 0.200000017881 x ~0.333333343267 y 0.333333343267 x ~0.200000017881 y 0.333333343267
|
||||
x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y 0.200000017881 x ~0.333333343267 y 0.200000017881
|
||||
x ~0.200000017881 y 0.466666638851 x 0.199999943376 y 0.466666638851 x 0.199999943376 y 0.333333343267
|
||||
x 0.199999943376 y 0.333333343267 x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y 0.466666638851
|
||||
x 0.333333283663 y 0.333333343267 x 0.199999943376 y 0.333333343267 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x 0.333333283663 y 0.0666666701436 x 0.333333283663 y 0.333333343267
|
||||
x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.0666667371988 x 0.0666666701436 y ~0.0666667371988
|
||||
x 0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x 0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y ~0.199999943376 x ~0.0666666701436 y ~0.199999943376
|
||||
x ~0.0666666701436 y ~0.199999943376 x ~0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y ~0.0666667371988
|
||||
x ~0.0666666701436 y ~0.199999943376 x ~0.0666666701436 y ~0.333333283663 x ~0.200000017881 y ~0.333333283663
|
||||
x ~0.200000017881 y ~0.333333283663 x ~0.200000017881 y ~0.199999943376 x ~0.0666666701436 y ~0.199999943376
|
||||
x ~0.200000017881 y ~0.333333283663 x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851
|
||||
x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y ~0.333333283663 x ~0.200000017881 y ~0.333333283663
|
||||
x 0.333333283663 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y ~0.599999964237
|
||||
x ~0.333333343267 y ~0.599999964237 x 0.333333283663 y ~0.599999964237 x 0.333333283663 y ~0.466666638851
|
||||
14
fonts/3.dsc
14
fonts/3.dsc
@@ -1,14 +0,0 @@
|
||||
x ~0.333333343267 y 0.200000017881 x ~0.333333343267 y 0.333333343267 x ~0.200000017881 y 0.333333343267
|
||||
x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y 0.200000017881 x ~0.333333343267 y 0.200000017881
|
||||
x ~0.200000017881 y 0.466666638851 x 0.199999943376 y 0.466666638851 x 0.199999943376 y 0.333333343267
|
||||
x 0.199999943376 y 0.333333343267 x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y 0.466666638851
|
||||
x 0.333333283663 y 0.333333343267 x 0.199999943376 y 0.333333343267 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x 0.333333283663 y 0.0666666701436 x 0.333333283663 y 0.333333343267
|
||||
x ~0.0666666701436 y 0.0666666701436 x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.0666667371988 x ~0.0666666701436 y ~0.0666667371988 x ~0.0666666701436 y 0.0666666701436
|
||||
x 0.333333283663 y ~0.0666667371988 x 0.333333283663 y ~0.466666638851 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.0666667371988 x 0.333333283663 y ~0.0666667371988
|
||||
x ~0.333333343267 y ~0.333333283663 x ~0.200000017881 y ~0.333333283663 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y ~0.333333283663
|
||||
x 0.199999943376 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.599999964237
|
||||
x ~0.200000017881 y ~0.599999964237 x 0.199999943376 y ~0.599999964237 x 0.199999943376 y ~0.466666638851
|
||||
12
fonts/4.dsc
12
fonts/4.dsc
@@ -1,12 +0,0 @@
|
||||
x 0.0666666701436 y 0.333333343267 x ~0.0666666701436 y 0.333333343267 x ~0.0666666701436 y 0.200000017881
|
||||
x ~0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.333333343267
|
||||
x ~0.0666666701436 y 0.200000017881 x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y 0.200000017881
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436 x ~0.333333343267 y ~0.0666667371988
|
||||
x ~0.333333343267 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y 0.0666666701436
|
||||
x ~0.333333343267 y ~0.0666667371988 x ~0.333333343267 y ~0.199999943376 x ~0.466666668653 y ~0.199999943376
|
||||
x ~0.466666668653 y ~0.199999943376 x ~0.466666668653 y ~0.0666667371988 x ~0.333333343267 y ~0.0666667371988
|
||||
x ~0.466666668653 y ~0.333333283663 x ~0.466666668653 y ~0.199999943376 x 0.333333283663 y ~0.199999943376
|
||||
x 0.333333283663 y ~0.333333283663 x 0.333333283663 y ~0.199999943376 x ~0.466666668653 y ~0.333333283663
|
||||
x 0.0666666701436 y 0.466666638851 x 0.0666666701436 y ~0.599999964237 x 0.199999943376 y ~0.599999964237
|
||||
x 0.199999943376 y ~0.599999964237 x 0.199999943376 y 0.466666638851 x 0.0666666701436 y 0.466666638851
|
||||
12
fonts/5.dsc
12
fonts/5.dsc
@@ -1,12 +0,0 @@
|
||||
x ~0.333333343267 y ~0.333333283663 x ~0.200000017881 y ~0.333333283663 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y ~0.333333283663
|
||||
x ~0.200000017881 y ~0.599999964237 x 0.199999943376 y ~0.599999964237 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.599999964237
|
||||
x 0.333333283663 y ~0.466666638851 x 0.333333283663 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y ~0.466666638851 x 0.333333283663 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436
|
||||
x ~0.333333343267 y 0.0666666701436 x ~0.333333343267 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y 0.333333343267 x ~0.333333343267 y 0.333333343267
|
||||
x ~0.333333343267 y 0.333333343267 x ~0.333333343267 y 0.0666666701436 x ~0.200000017881 y 0.0666666701436
|
||||
x 0.333333283663 y 0.333333343267 x 0.333333283663 y 0.466666638851 x ~0.333333343267 y 0.466666638851
|
||||
x ~0.333333343267 y 0.466666638851 x ~0.333333343267 y 0.333333343267 x 0.333333283663 y 0.333333343267
|
||||
12
fonts/6.dsc
12
fonts/6.dsc
@@ -1,12 +0,0 @@
|
||||
x 0.199999943376 y 0.466666638851 x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.333333343267
|
||||
x ~0.0666666701436 y 0.333333343267 x 0.199999943376 y 0.333333343267 x 0.199999943376 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.333333343267 x ~0.0666666701436 y 0.200000017881 x ~0.200000017881 y 0.200000017881
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y 0.333333343267 x ~0.0666666701436 y 0.333333343267
|
||||
x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y 0.200000017881 x ~0.200000017881 y 0.200000017881
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851
|
||||
x ~0.200000017881 y 0.0666666701436 x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y 0.0666666701436
|
||||
x 0.333333283663 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x 0.333333283663 y ~0.466666638851 x 0.333333283663 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.599999964237
|
||||
x ~0.200000017881 y ~0.599999964237 x 0.199999943376 y ~0.599999964237 x 0.199999943376 y ~0.466666638851
|
||||
10
fonts/7.dsc
10
fonts/7.dsc
@@ -1,10 +0,0 @@
|
||||
x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.333333283663 x ~0.0666666701436 y ~0.333333283663
|
||||
x ~0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237
|
||||
x ~0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y ~0.0666667371988
|
||||
x 0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.333333283663
|
||||
x 0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y 0.200000017881 x 0.199999943376 y 0.200000017881
|
||||
x 0.199999943376 y 0.200000017881 x 0.199999943376 y ~0.0666667371988 x 0.0666666701436 y ~0.0666667371988
|
||||
x 0.333333283663 y 0.200000017881 x 0.333333283663 y 0.333333343267 x 0.199999943376 y 0.333333343267
|
||||
x 0.199999943376 y 0.333333343267 x 0.199999943376 y 0.200000017881 x 0.333333283663 y 0.200000017881
|
||||
x 0.333333283663 y 0.333333343267 x 0.333333283663 y 0.466666638851 x ~0.333333343267 y 0.466666638851
|
||||
x ~0.333333343267 y 0.466666638851 x ~0.333333343267 y 0.333333343267 x 0.333333283663 y 0.333333343267
|
||||
14
fonts/8.dsc
14
fonts/8.dsc
@@ -1,14 +0,0 @@
|
||||
x ~0.333333343267 y 0.0666666701436 x ~0.333333343267 y 0.333333343267 x ~0.200000017881 y 0.333333343267
|
||||
x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.466666638851 x 0.199999943376 y 0.466666638851 x 0.199999943376 y 0.333333343267
|
||||
x 0.199999943376 y 0.333333343267 x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y 0.466666638851
|
||||
x 0.333333283663 y 0.333333343267 x 0.333333283663 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x 0.199999943376 y 0.333333343267 x 0.333333283663 y 0.333333343267
|
||||
x ~0.200000017881 y 0.0666666701436 x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y 0.0666666701436
|
||||
x 0.333333283663 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x 0.333333283663 y ~0.466666638851 x 0.333333283663 y ~0.0666667371988
|
||||
x ~0.333333343267 y ~0.0666667371988 x ~0.333333343267 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.0666667371988 x ~0.333333343267 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.599999964237
|
||||
x ~0.200000017881 y ~0.599999964237 x 0.199999943376 y ~0.599999964237 x 0.199999943376 y ~0.466666638851
|
||||
12
fonts/9.dsc
12
fonts/9.dsc
@@ -1,12 +0,0 @@
|
||||
x ~0.200000017881 y ~0.599999964237 x 0.0666666701436 y ~0.599999964237 x 0.0666666701436 y ~0.466666638851
|
||||
x 0.0666666701436 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.599999964237
|
||||
x 0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.333333283663 x 0.199999943376 y ~0.333333283663
|
||||
x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.333333283663 x 0.0666666701436 y ~0.466666638851
|
||||
x 0.333333283663 y ~0.333333283663 x 0.199999943376 y ~0.333333283663 x 0.199999943376 y 0.333333343267
|
||||
x 0.199999943376 y 0.333333343267 x 0.333333283663 y 0.333333343267 x 0.333333283663 y ~0.333333283663
|
||||
x 0.199999943376 y ~0.199999943376 x ~0.200000017881 y ~0.199999943376 x ~0.200000017881 y ~0.0666667371988
|
||||
x ~0.200000017881 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y ~0.199999943376
|
||||
x ~0.333333343267 y ~0.0666667371988 x ~0.333333343267 y 0.333333343267 x ~0.200000017881 y 0.333333343267
|
||||
x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y ~0.0666667371988 x ~0.333333343267 y ~0.0666667371988
|
||||
x 0.199999943376 y 0.333333343267 x 0.199999943376 y 0.466666638851 x ~0.200000017881 y 0.466666638851
|
||||
x ~0.200000017881 y 0.466666638851 x ~0.200000017881 y 0.333333343267 x 0.199999943376 y 0.333333343267
|
||||
@@ -1,20 +0,0 @@
|
||||
x 0.333333283663 y 0.0666666701436 x 0.333333283663 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y 0.0666666701436 x 0.333333283663 y 0.0666666701436
|
||||
x 0.333333283663 y ~0.599999964237 x 0.333333283663 y ~0.466666638851 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.599999964237 x 0.333333283663 y ~0.599999964237
|
||||
x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y ~0.466666638851 x 0.0666666701436 y ~0.466666638851
|
||||
x 0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.0666666701436 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x 0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.599999964237
|
||||
x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988
|
||||
x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y 0.0666666701436 x ~0.0666666701436 y 0.0666666701436
|
||||
x ~0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988
|
||||
x ~0.0666666701436 y ~0.0666667371988 x ~0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.200000017881
|
||||
x 0.0666666701436 y 0.200000017881 x 0.0666666701436 y ~0.0666667371988 x ~0.0666666701436 y ~0.0666667371988
|
||||
x 0.199999943376 y 0.200000017881 x 0.199999943376 y 0.466666638851 x 0.0666666701436 y 0.466666638851
|
||||
x 0.0666666701436 y 0.466666638851 x 0.0666666701436 y 0.200000017881 x 0.199999943376 y 0.200000017881
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.200000017881 x ~0.200000017881 y 0.200000017881
|
||||
x 0.0666666701436 y 0.599999964237 x ~0.0666666701436 y 0.599999964237 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.466666638851 x 0.0666666701436 y 0.466666638851 x 0.0666666701436 y 0.599999964237
|
||||
@@ -1,135 +1,317 @@
|
||||
structure Ampersand =
|
||||
structure Ampersand =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y 0.200000017881 x ~0.0666666701436 y 0.200000017881
|
||||
x ~0.0666666701436 y 0.200000017881 x ~0.0666666701436 y 0.333333343267 x ~0.200000017881 y 0.333333343267
|
||||
x ~0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.0666666701436
|
||||
x 0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y 0.200000017881
|
||||
x 0.0666666701436 y 0.0666666701436 x 0.0666666701436 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y 0.0666666701436 x 0.0666666701436 y 0.0666666701436
|
||||
x 0.333333283663 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y ~0.199999943376
|
||||
x 0.199999943376 y ~0.199999943376 x 0.333333283663 y ~0.199999943376 x 0.333333283663 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.199999943376 x 0.0666666701436 y ~0.199999943376 x 0.0666666701436 y ~0.333333283663
|
||||
x 0.0666666701436 y ~0.333333283663 x 0.199999943376 y ~0.333333283663 x 0.199999943376 y ~0.199999943376
|
||||
x 0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.466666638851
|
||||
x ~0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.333333283663
|
||||
x ~0.0666666701436 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.599999964237
|
||||
x ~0.200000017881 y ~0.599999964237 x ~0.0666666701436 y ~0.599999964237 x ~0.0666666701436 y ~0.466666638851
|
||||
@@ -1,99 +0,0 @@
|
||||
structure AngleBracketClosed =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
@@ -1,14 +0,0 @@
|
||||
x 0.199999943376 y 0.333333343267 x 0.0666666701436 y 0.333333343267 x 0.0666666701436 y 0.200000017881
|
||||
x 0.0666666701436 y 0.200000017881 x 0.199999943376 y 0.200000017881 x 0.199999943376 y 0.333333343267
|
||||
x 0.0666666701436 y 0.200000017881 x ~0.0666666701436 y 0.200000017881 x ~0.0666666701436 y 0.0666666701436
|
||||
x ~0.0666666701436 y 0.0666666701436 x 0.0666666701436 y 0.0666666701436 x 0.0666666701436 y 0.200000017881
|
||||
x ~0.0666666701436 y 0.0666666701436 x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y ~0.0666667371988
|
||||
x ~0.200000017881 y ~0.0666667371988 x ~0.0666666701436 y ~0.0666667371988 x ~0.0666666701436 y 0.0666666701436
|
||||
x ~0.333333343267 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y ~0.199999943376
|
||||
x ~0.200000017881 y ~0.199999943376 x ~0.333333343267 y ~0.199999943376 x ~0.333333343267 y ~0.0666667371988
|
||||
x ~0.200000017881 y ~0.199999943376 x ~0.200000017881 y ~0.333333283663 x ~0.0666666701436 y ~0.333333283663
|
||||
x ~0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.199999943376 x ~0.200000017881 y ~0.199999943376
|
||||
x ~0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.466666638851
|
||||
x 0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.333333283663
|
||||
x 0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.599999964237 x 0.199999943376 y ~0.599999964237
|
||||
x 0.199999943376 y ~0.599999964237 x 0.199999943376 y ~0.466666638851 x 0.0666666701436 y ~0.466666638851
|
||||
@@ -1,99 +0,0 @@
|
||||
structure AngleBracketOpen =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
@@ -1,99 +1,227 @@
|
||||
structure AsciiAt =
|
||||
structure AsciiAt =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,27 +1,47 @@
|
||||
structure AsciiDot =
|
||||
structure AsciiDot =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,99 +1,227 @@
|
||||
structure AsciiEight =
|
||||
structure AsciiEight =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
structure AsciiEquals =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
@@ -1,87 +1,197 @@
|
||||
structure AsciiFive =
|
||||
structure AsciiFive =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,87 +1,197 @@
|
||||
structure AsciiFour =
|
||||
structure AsciiFour =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 6.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 6.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 6.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,63 +1,137 @@
|
||||
structure AsciiHash =
|
||||
structure AsciiHash =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,27 +1,47 @@
|
||||
structure AsciiMinus =
|
||||
structure AsciiMinus =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,87 +1,197 @@
|
||||
structure AsciiNine =
|
||||
structure AsciiNine =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,63 +1,137 @@
|
||||
structure AsciiOne =
|
||||
structure AsciiOne =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,171 +1,407 @@
|
||||
structure AsciiPercent =
|
||||
structure AsciiPercent =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,27 +1,47 @@
|
||||
structure AsciiPipe =
|
||||
structure AsciiPipe =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 13.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 13.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 13.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,39 +1,77 @@
|
||||
structure AsciiPlus =
|
||||
structure AsciiPlus =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,75 +1,167 @@
|
||||
structure AsciiSeven =
|
||||
structure AsciiSeven =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,87 +1,197 @@
|
||||
structure AsciiSix =
|
||||
structure AsciiSix =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,99 +1,227 @@
|
||||
structure AsciiThree =
|
||||
structure AsciiThree =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,111 +1,257 @@
|
||||
structure AsciiTwo =
|
||||
structure AsciiTwo =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,75 +1,168 @@
|
||||
structure AsciiZero =
|
||||
structure AsciiZero =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight): Real32.real
|
||||
vector =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
x 0.333333283663 y ~0.199999943376 x 0.333333283663 y ~0.0666667371988 x ~0.333333343267 y ~0.0666667371988
|
||||
x ~0.333333343267 y ~0.0666667371988 x ~0.333333343267 y ~0.199999943376 x 0.333333283663 y ~0.199999943376
|
||||
x 0.199999943376 y 0.200000017881 x 0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.0666666701436
|
||||
x 0.0666666701436 y 0.0666666701436 x 0.199999943376 y 0.0666666701436 x 0.199999943376 y 0.200000017881
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y 0.0666666701436 x ~0.0666666701436 y 0.0666666701436
|
||||
x ~0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y 0.200000017881 x ~0.200000017881 y 0.200000017881
|
||||
x 0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y ~0.333333283663
|
||||
x ~0.0666666701436 y ~0.333333283663 x 0.0666666701436 y ~0.333333283663 x 0.0666666701436 y 0.0666666701436
|
||||
x 0.199999943376 y ~0.333333283663 x 0.0666666701436 y ~0.333333283663 x 0.0666666701436 y ~0.466666638851
|
||||
x 0.0666666701436 y ~0.466666638851 x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.333333283663
|
||||
x ~0.0666666701436 y ~0.333333283663 x ~0.200000017881 y ~0.333333283663 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.0666666701436 y ~0.466666638851 x ~0.0666666701436 y ~0.333333283663
|
||||
@@ -1,87 +1,197 @@
|
||||
structure Asterisk =
|
||||
structure Asterisk =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
14
fonts/at.dsc
14
fonts/at.dsc
@@ -1,14 +0,0 @@
|
||||
x 0.199999943376 y ~0.333333283663 x 0.0666666701436 y ~0.333333283663 x 0.0666666701436 y ~0.199999943376
|
||||
x 0.0666666701436 y ~0.199999943376 x 0.199999943376 y ~0.199999943376 x 0.199999943376 y ~0.333333283663
|
||||
x ~0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y ~0.0666667371988
|
||||
x 0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y ~0.333333283663 x ~0.0666666701436 y ~0.333333283663
|
||||
x ~0.0666666701436 y 0.0666666701436 x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.0666667371988 x ~0.0666666701436 y ~0.0666667371988 x ~0.0666666701436 y 0.0666666701436
|
||||
x 0.333333283663 y ~0.333333283663 x 0.333333283663 y 0.333333343267 x 0.199999943376 y 0.333333343267
|
||||
x 0.199999943376 y 0.333333343267 x 0.199999943376 y ~0.333333283663 x 0.333333283663 y ~0.333333283663
|
||||
x 0.199999943376 y 0.466666638851 x ~0.200000017881 y 0.466666638851 x ~0.200000017881 y 0.333333343267
|
||||
x ~0.200000017881 y 0.333333343267 x 0.199999943376 y 0.333333343267 x 0.199999943376 y 0.466666638851
|
||||
x 0.333333283663 y ~0.599999964237 x 0.333333283663 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.599999964237 x 0.333333283663 y ~0.599999964237
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y 0.333333343267 x ~0.333333343267 y 0.333333343267
|
||||
x ~0.333333343267 y 0.333333343267 x ~0.333333343267 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851
|
||||
@@ -1,4 +0,0 @@
|
||||
x 0.0666666701436 y 0.333333343267 x 0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.333333343267 x 0.0666666701436 y 0.333333343267
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.599999964237 x ~0.200000017881 y 0.599999964237
|
||||
x ~0.200000017881 y 0.599999964237 x ~0.200000017881 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
@@ -1,39 +1,77 @@
|
||||
structure Backtick =
|
||||
structure Backtick =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
x ~0.200000017881 y 0.599999964237 x ~0.0666666701436 y 0.599999964237 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.200000017881 y 0.466666638851 x ~0.200000017881 y 0.599999964237
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.200000017881
|
||||
x 0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
x 0.199999943376 y 0.200000017881 x 0.199999943376 y ~0.466666638851 x 0.0666666701436 y ~0.466666638851
|
||||
x 0.0666666701436 y ~0.466666638851 x 0.0666666701436 y 0.200000017881 x 0.199999943376 y 0.200000017881
|
||||
x 0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.733333289623 x ~0.0666666701436 y ~0.733333289623
|
||||
x ~0.0666666701436 y ~0.733333289623 x ~0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.466666638851
|
||||
x ~0.0666666701436 y ~0.733333289623 x ~0.200000017881 y ~0.733333289623 x ~0.200000017881 y ~0.866666674614
|
||||
x ~0.200000017881 y ~0.866666674614 x ~0.0666666701436 y ~0.866666674614 x ~0.0666666701436 y ~0.733333289623
|
||||
@@ -1,75 +0,0 @@
|
||||
structure BracketClosed =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
x 0.199999943376 y 0.599999964237 x 0.199999943376 y 0.466666638851 x 0.0666666701436 y 0.466666638851
|
||||
x 0.0666666701436 y 0.466666638851 x 0.0666666701436 y 0.599999964237 x 0.199999943376 y 0.599999964237
|
||||
x 0.0666666701436 y 0.466666638851 x 0.0666666701436 y 0.200000017881 x ~0.0666666701436 y 0.200000017881
|
||||
x ~0.0666666701436 y 0.200000017881 x ~0.0666666701436 y 0.466666638851 x 0.0666666701436 y 0.466666638851
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.0666666701436 y 0.200000017881 x ~0.0666666701436 y ~0.466666638851
|
||||
x ~0.0666666701436 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y 0.200000017881
|
||||
x 0.0666666701436 y ~0.466666638851 x ~0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.733333289623
|
||||
x 0.0666666701436 y ~0.733333289623 x ~0.0666666701436 y ~0.733333289623 x ~0.0666666701436 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.733333289623 x 0.0666666701436 y ~0.733333289623 x 0.0666666701436 y ~0.866666674614
|
||||
x 0.0666666701436 y ~0.866666674614 x 0.199999943376 y ~0.866666674614 x 0.199999943376 y ~0.733333289623
|
||||
@@ -1,75 +0,0 @@
|
||||
structure BracketOpen =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
x 0.0666666701436 y 0.599999964237 x 0.199999943376 y 0.599999964237 x 0.199999943376 y 0.466666638851
|
||||
x 0.199999943376 y 0.466666638851 x 0.0666666701436 y 0.466666638851 x 0.0666666701436 y 0.599999964237
|
||||
x 0.333333283663 y 0.333333343267 x 0.333333283663 y 0.466666638851 x 0.199999943376 y 0.466666638851
|
||||
x 0.199999943376 y 0.466666638851 x 0.199999943376 y 0.333333343267 x 0.333333283663 y 0.333333343267
|
||||
x ~0.333333343267 y 0.333333343267 x ~0.333333343267 y 0.466666638851 x ~0.200000017881 y 0.466666638851
|
||||
x ~0.200000017881 y 0.466666638851 x ~0.200000017881 y 0.333333343267 x ~0.333333343267 y 0.333333343267
|
||||
x ~0.200000017881 y 0.466666638851 x ~0.200000017881 y 0.599999964237 x ~0.0666666701436 y 0.599999964237
|
||||
x ~0.0666666701436 y 0.599999964237 x ~0.0666666701436 y 0.466666638851 x ~0.200000017881 y 0.466666638851
|
||||
x 0.0666666701436 y 0.599999964237 x 0.0666666701436 y 0.733333289623 x ~0.0666666701436 y 0.733333289623
|
||||
x ~0.0666666701436 y 0.733333289623 x ~0.0666666701436 y 0.599999964237 x 0.0666666701436 y 0.599999964237
|
||||
236
fonts/caret.sml
236
fonts/caret.sml
@@ -1,75 +1,167 @@
|
||||
structure Caret =
|
||||
structure Caret =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.866666674614)) + (endY * 0.866666674614)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.866666674614)) + (endY * 0.866666674614)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.866666674614)) + (endY * 0.866666674614)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
x ~0.200000017881 y 0.200000017881 x 0.0666666701436 y 0.200000017881 x 0.0666666701436 y ~0.0666667371988
|
||||
x 0.0666666701436 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y 0.200000017881
|
||||
x ~0.200000017881 y ~0.333333283663 x 0.0666666701436 y ~0.333333283663 x 0.0666666701436 y ~0.599999964237
|
||||
x 0.0666666701436 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.333333283663
|
||||
x 0.0666666701436 y ~0.599999964237 x ~0.0666666701436 y ~0.599999964237 x ~0.0666666701436 y ~0.733333289623
|
||||
x ~0.0666666701436 y ~0.733333289623 x 0.0666666701436 y ~0.733333289623 x 0.0666666701436 y ~0.599999964237
|
||||
x ~0.0666666701436 y ~0.733333289623 x ~0.200000017881 y ~0.733333289623 x ~0.200000017881 y ~0.866666674614
|
||||
x ~0.200000017881 y ~0.866666674614 x ~0.0666666701436 y ~0.866666674614 x ~0.0666666701436 y ~0.733333289623
|
||||
@@ -1,4 +0,0 @@
|
||||
x ~0.199999973178 y 0.199999928474 x 0.0666667073965 y 0.199999928474 x 0.0666667073965 y ~0.0666667073965
|
||||
x ~0.199999973178 y ~0.0666667073965 x 0.0666667073965 y ~0.0666667073965 x ~0.199999973178 y 0.199999928474
|
||||
x 0.0666667073965 y ~0.333333343267 x ~0.199999973178 y ~0.333333343267 x ~0.199999973178 y ~0.600000143051
|
||||
x ~0.199999973178 y ~0.600000143051 x 0.0666667073965 y ~0.600000143051 x 0.0666667073965 y ~0.333333343267
|
||||
110
fonts/colon.sml
110
fonts/colon.sml
@@ -1,39 +1,77 @@
|
||||
structure Colon =
|
||||
structure Colon =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.599999964237)) + (endY * 0.599999964237)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.599999964237)) + (endY * 0.599999964237)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.599999964237)) + (endY * 0.599999964237)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
x ~0.199999973178 y ~0.333333343267 x 0.0666667073965 y ~0.333333343267 x 0.0666667073965 y ~0.600000143051
|
||||
x 0.0666667073965 y ~0.600000143051 x ~0.199999973178 y ~0.600000143051 x ~0.199999973178 y ~0.333333343267
|
||||
x 0.0666667073965 y ~0.600000143051 x 0.0666667073965 y ~0.733333349228 x ~0.066666610539 y ~0.733333349228
|
||||
x ~0.066666610539 y ~0.733333349228 x ~0.066666610539 y ~0.600000143051 x 0.0666667073965 y ~0.600000143051
|
||||
x ~0.066666610539 y ~0.866666793823 x ~0.199999973178 y ~0.866666793823 x ~0.199999973178 y ~0.733333349228
|
||||
x ~0.199999973178 y ~0.733333349228 x ~0.066666610539 y ~0.733333349228 x ~0.066666610539 y ~0.866666793823
|
||||
152
fonts/comma.sml
152
fonts/comma.sml
@@ -1,51 +1,107 @@
|
||||
structure Comma =
|
||||
structure Comma =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0666666030884)) + (endY * 0.0666666030884)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0666666030884)) + (endY * 0.0666666030884)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0666666030884)) + (endY * 0.0666666030884)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
$(SML_LIB)/basis/basis.mlb
|
||||
|
||||
ann
|
||||
"allowVectorExps true"
|
||||
in
|
||||
@@ -14,29 +13,26 @@ in
|
||||
ascii-seven.sml
|
||||
ascii-eight.sml
|
||||
ascii-nine.sml
|
||||
|
||||
ascii-space.sml
|
||||
ampersand.sml
|
||||
angle-bracket-closed.sml
|
||||
angle-bracket-open.sml
|
||||
ascii-at.sml
|
||||
ascii-dot.sml
|
||||
ascii-hash.sml
|
||||
ascii-minus.sml
|
||||
ascii-percent.sml
|
||||
ascii-pipe.sml
|
||||
ascii-plus.sml
|
||||
asterisk.sml
|
||||
ascii-at.sml
|
||||
backtick.sml
|
||||
bracket-closed.sml
|
||||
bracket-open.sml
|
||||
backward-slash.sml
|
||||
caret.sml
|
||||
colon.sml
|
||||
comma.sml
|
||||
curly-brace-closed.sml
|
||||
curly-brace-open.sml
|
||||
dollar.sml
|
||||
exclamation-mark.sml
|
||||
|
||||
quotes-double.sml
|
||||
equals.sml
|
||||
exclamation_mark.sml
|
||||
forward-slash.sml
|
||||
ascii-dot.sml
|
||||
ascii-hash.sml
|
||||
left-angled-bracket.sml
|
||||
left-brace.sml
|
||||
left-bracket.sml
|
||||
left-paren.sml
|
||||
lower-case-a.sml
|
||||
lower-case-b.sml
|
||||
lower-case-c.sml
|
||||
@@ -63,18 +59,20 @@ in
|
||||
lower-case-x.sml
|
||||
lower-case-y.sml
|
||||
lower-case-z.sml
|
||||
|
||||
ascii-minus.sml
|
||||
ascii-percent.sml
|
||||
ascii-pipe.sml
|
||||
ascii-plus.sml
|
||||
question-mark.sml
|
||||
quotes-double.sml
|
||||
right-angled-bracket.sml
|
||||
right-brace.sml
|
||||
right-bracket.sml
|
||||
right-paren.sml
|
||||
semicolon.sml
|
||||
quotes-single.sml
|
||||
semi-colon.sml
|
||||
slash-backwards.sml
|
||||
slash-forwards.sml
|
||||
square-bracket-closed.sml
|
||||
square-bracket-open.sml
|
||||
tilde.sml
|
||||
ascii-tilde.sml
|
||||
underscore.sml
|
||||
|
||||
unknown.sml
|
||||
upper-case-a.sml
|
||||
upper-case-b.sml
|
||||
upper-case-c.sml
|
||||
@@ -101,10 +99,6 @@ in
|
||||
upper-case-x.sml
|
||||
upper-case-y.sml
|
||||
upper-case-z.sml
|
||||
|
||||
ascii-equals.sml
|
||||
space.sml
|
||||
unknown-char.sml
|
||||
in
|
||||
cozette-ascii.sml
|
||||
end
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
structure CozetteAscii =
|
||||
struct
|
||||
val asciiTable = #[
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
AsciiSpace.lerp,
|
||||
ExclamationMark.lerp,
|
||||
QuotesDouble.lerp,
|
||||
@@ -41,14 +41,14 @@ struct
|
||||
AsciiPercent.lerp,
|
||||
Ampersand.lerp,
|
||||
QuotesSingle.lerp,
|
||||
BracketOpen.lerp,
|
||||
BracketClosed.lerp,
|
||||
LeftParen.lerp,
|
||||
RightParen.lerp,
|
||||
Asterisk.lerp,
|
||||
AsciiPlus.lerp,
|
||||
Comma.lerp,
|
||||
AsciiMinus.lerp,
|
||||
AsciiDot.lerp,
|
||||
SlashForwards.lerp,
|
||||
ForwardSlash.lerp,
|
||||
AsciiZero.lerp,
|
||||
AsciiOne.lerp,
|
||||
AsciiTwo.lerp,
|
||||
@@ -61,9 +61,9 @@ struct
|
||||
AsciiNine.lerp,
|
||||
Colon.lerp,
|
||||
Semicolon.lerp,
|
||||
AngleBracketOpen.lerp,
|
||||
LeftAngledBracket.lerp,
|
||||
AsciiEquals.lerp,
|
||||
AngleBracketClosed.lerp,
|
||||
RightAngledBracket.lerp,
|
||||
QuestionMark.lerp,
|
||||
AsciiAt.lerp,
|
||||
UpperCaseA.lerp,
|
||||
@@ -92,9 +92,9 @@ struct
|
||||
UpperCaseX.lerp,
|
||||
UpperCaseY.lerp,
|
||||
UpperCaseZ.lerp,
|
||||
SquareBracketOpen.lerp,
|
||||
SlashBackwards.lerp,
|
||||
SquareBracketClosed.lerp,
|
||||
LeftBracket.lerp,
|
||||
BackwardSlash.lerp,
|
||||
RightBracket.lerp,
|
||||
Caret.lerp,
|
||||
Underscore.lerp,
|
||||
Backtick.lerp,
|
||||
@@ -124,130 +124,137 @@ struct
|
||||
LowerCaseX.lerp,
|
||||
LowerCaseY.lerp,
|
||||
LowerCaseZ.lerp,
|
||||
CurlyBraceOpen.lerp,
|
||||
LeftBrace.lerp,
|
||||
AsciiPipe.lerp,
|
||||
CurlyBraceClosed.lerp,
|
||||
RightBrace.lerp,
|
||||
AsciiTilde.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp,
|
||||
UnknownChar.lerp
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp,
|
||||
Unknown.lerp
|
||||
]
|
||||
|
||||
fun make (chr, posX, posY, scale, windowWidth, windowHeight, r, g, b) =
|
||||
let
|
||||
val chrFun = Vector.sub (asciiTable, Char.ord chr)
|
||||
in
|
||||
chrFun (posX, posY, scale, windowWidth, windowHeight)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
x ~0.333333343267 y 0.599999964237 x ~0.0666666701436 y 0.599999964237 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.333333343267 y 0.466666638851 x ~0.333333343267 y 0.599999964237
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y ~0.0666667371988
|
||||
x 0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
x 0.333333283663 y ~0.0666667371988 x 0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y ~0.199999943376
|
||||
x 0.0666666701436 y ~0.199999943376 x 0.333333283663 y ~0.199999943376 x 0.333333283663 y ~0.0666667371988
|
||||
x 0.0666666701436 y ~0.199999943376 x 0.0666666701436 y ~0.733333289623 x ~0.0666666701436 y ~0.733333289623
|
||||
x ~0.0666666701436 y ~0.733333289623 x ~0.0666666701436 y ~0.199999943376 x 0.0666666701436 y ~0.199999943376
|
||||
x ~0.0666666701436 y ~0.733333289623 x ~0.333333343267 y ~0.733333289623 x ~0.333333343267 y ~0.866666674614
|
||||
x ~0.333333343267 y ~0.866666674614 x ~0.0666666701436 y ~0.866666674614 x ~0.0666666701436 y ~0.733333289623
|
||||
@@ -1,75 +0,0 @@
|
||||
structure CurlyBraceClosed =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
x 0.199999943376 y 0.599999964237 x ~0.0666666701436 y 0.599999964237 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.466666638851 x 0.199999943376 y 0.466666638851 x 0.199999943376 y 0.599999964237
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988
|
||||
x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.466666668653 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y ~0.199999943376
|
||||
x ~0.200000017881 y ~0.199999943376 x ~0.466666668653 y ~0.199999943376 x ~0.466666668653 y ~0.0666667371988
|
||||
x ~0.200000017881 y ~0.199999943376 x ~0.0666666701436 y ~0.199999943376 x ~0.0666666701436 y ~0.733333289623
|
||||
x ~0.0666666701436 y ~0.733333289623 x ~0.200000017881 y ~0.733333289623 x ~0.200000017881 y ~0.199999943376
|
||||
x ~0.0666666701436 y ~0.733333289623 x 0.199999943376 y ~0.733333289623 x 0.199999943376 y ~0.866666674614
|
||||
x 0.199999943376 y ~0.866666674614 x ~0.0666666701436 y ~0.866666674614 x ~0.0666666701436 y ~0.733333289623
|
||||
@@ -1,75 +0,0 @@
|
||||
structure CurlyBraceOpen =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
@@ -1,16 +0,0 @@
|
||||
x 0.333333283663 y 0.200000017881 x 0.199999943376 y 0.200000017881 x 0.199999943376 y 0.333333343267
|
||||
x 0.199999943376 y 0.333333343267 x 0.333333283663 y 0.333333343267 x 0.333333283663 y 0.200000017881
|
||||
x 0.199999943376 y 0.466666638851 x ~0.200000017881 y 0.466666638851 x ~0.200000017881 y 0.333333343267
|
||||
x ~0.200000017881 y 0.333333343267 x 0.199999943376 y 0.333333343267 x 0.199999943376 y 0.466666638851
|
||||
x ~0.333333343267 y 0.333333343267 x ~0.200000017881 y 0.333333343267 x ~0.200000017881 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436 x ~0.333333343267 y 0.333333343267
|
||||
x ~0.200000017881 y 0.0666666701436 x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y 0.0666666701436
|
||||
x 0.199999943376 y ~0.0666667371988 x 0.333333283663 y ~0.0666667371988 x 0.333333283663 y ~0.466666638851
|
||||
x 0.333333283663 y ~0.466666638851 x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.599999964237
|
||||
x ~0.333333343267 y ~0.333333283663 x ~0.200000017881 y ~0.333333283663 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y ~0.333333283663
|
||||
x 0.0666666701436 y ~0.733333289623 x 0.0666666701436 y 0.599999964237 x ~0.0666666701436 y 0.599999964237
|
||||
x ~0.0666666701436 y 0.599999964237 x ~0.0666666701436 y ~0.733333289623 x 0.0666666701436 y ~0.733333289623
|
||||
360
fonts/dollar.sml
360
fonts/dollar.sml
@@ -1,111 +1,257 @@
|
||||
structure Dollar =
|
||||
structure Dollar =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
x 0.0666667073965 y ~0.333333343267 x ~0.199999973178 y ~0.333333343267 x ~0.199999973178 y ~0.600000143051
|
||||
x ~0.199999973178 y ~0.600000143051 x 0.0666667073965 y ~0.600000143051 x 0.0666667073965 y ~0.333333343267
|
||||
@@ -1,4 +0,0 @@
|
||||
x 0.333333283663 y ~0.333333283663 x 0.333333283663 y ~0.199999943376 x ~0.333333343267 y ~0.199999943376
|
||||
x ~0.333333343267 y ~0.199999943376 x ~0.333333343267 y ~0.333333283663 x 0.333333283663 y ~0.333333283663
|
||||
x 0.333333283663 y ~0.0666667371988 x ~0.333333343267 y ~0.0666667371988 x ~0.333333343267 y 0.0666666701436
|
||||
x ~0.333333343267 y 0.0666666701436 x 0.333333283663 y 0.0666666701436 x 0.333333283663 y ~0.0666667371988
|
||||
@@ -1,4 +0,0 @@
|
||||
x 0.0666666701436 y ~0.599999964237 x 0.0666666701436 y ~0.466666638851 x ~0.0666666701436 y ~0.466666638851
|
||||
x ~0.0666666701436 y ~0.466666638851 x ~0.0666666701436 y ~0.599999964237 x 0.0666666701436 y ~0.599999964237
|
||||
x 0.0666666701436 y ~0.333333283663 x 0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y ~0.333333283663 x 0.0666666701436 y ~0.333333283663
|
||||
@@ -1,39 +0,0 @@
|
||||
structure ExclamationMark =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
@@ -1,8 +0,0 @@
|
||||
x 0.333333283663 y ~0.333333283663 x 0.333333283663 y ~0.199999943376 x ~0.333333343267 y ~0.199999943376
|
||||
x ~0.333333343267 y ~0.199999943376 x ~0.333333343267 y ~0.333333283663 x 0.333333283663 y ~0.333333283663
|
||||
x 0.333333283663 y 0.0666666701436 x 0.333333283663 y 0.200000017881 x ~0.333333343267 y 0.200000017881
|
||||
x ~0.333333343267 y 0.200000017881 x ~0.333333343267 y 0.0666666701436 x 0.333333283663 y 0.0666666701436
|
||||
x 0.199999943376 y ~0.599999964237 x 0.199999943376 y 0.466666638851 x 0.0666666701436 y 0.466666638851
|
||||
x 0.0666666701436 y 0.466666638851 x 0.0666666701436 y ~0.599999964237 x 0.199999943376 y ~0.599999964237
|
||||
x ~0.0666666701436 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y 0.466666638851
|
||||
x ~0.200000017881 y 0.466666638851 x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y ~0.599999964237
|
||||
@@ -1,10 +0,0 @@
|
||||
x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.466666638851 x 0.0666666701436 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.599999964237 x 0.0666666701436 y ~0.599999964237 x 0.0666666701436 y ~0.466666638851
|
||||
x ~0.333333343267 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436 x ~0.333333343267 y ~0.466666638851
|
||||
x ~0.200000017881 y 0.200000017881 x 0.199999943376 y 0.200000017881 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y 0.200000017881
|
||||
x 0.0666666701436 y ~0.333333283663 x 0.199999943376 y ~0.333333283663 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x 0.0666666701436 y ~0.466666638851 x 0.0666666701436 y ~0.333333283663
|
||||
x 0.199999943376 y 0.200000017881 x 0.199999943376 y ~0.599999964237 x 0.333333283663 y ~0.599999964237
|
||||
x 0.333333283663 y ~0.599999964237 x 0.333333283663 y 0.200000017881 x 0.199999943376 y 0.200000017881
|
||||
@@ -1,75 +1,167 @@
|
||||
structure LowerCaseA =
|
||||
structure LowerCaseA =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
x ~0.200000017881 y ~0.599999964237 x 0.199999943376 y ~0.599999964237 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.599999964237
|
||||
x 0.333333283663 y ~0.466666638851 x 0.333333283663 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.466666638851 x 0.333333283663 y ~0.466666638851
|
||||
x 0.199999943376 y 0.0666666701436 x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y 0.200000017881
|
||||
x ~0.200000017881 y 0.200000017881 x 0.199999943376 y 0.200000017881 x 0.199999943376 y 0.0666666701436
|
||||
x ~0.200000017881 y ~0.599999964237 x ~0.333333343267 y ~0.599999964237 x ~0.333333343267 y 0.599999964237
|
||||
x ~0.333333343267 y 0.599999964237 x ~0.200000017881 y 0.599999964237 x ~0.200000017881 y ~0.599999964237
|
||||
@@ -1,63 +1,137 @@
|
||||
structure LowerCaseB =
|
||||
structure LowerCaseB =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
x 0.199999943376 y 0.200000017881 x ~0.200000017881 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y 0.200000017881 x 0.199999943376 y 0.200000017881
|
||||
x 0.333333283663 y 0.0666666701436 x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.0666667371988 x 0.333333283663 y ~0.0666667371988 x 0.333333283663 y 0.0666666701436
|
||||
x ~0.333333343267 y 0.0666666701436 x ~0.333333343267 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436
|
||||
x ~0.200000017881 y ~0.599999964237 x 0.199999943376 y ~0.599999964237 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x ~0.200000017881 y ~0.466666638851 x ~0.200000017881 y ~0.599999964237
|
||||
x 0.333333283663 y ~0.333333283663 x 0.199999943376 y ~0.333333283663 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x 0.333333283663 y ~0.466666638851 x 0.333333283663 y ~0.333333283663
|
||||
@@ -1,75 +1,167 @@
|
||||
structure LowerCaseC =
|
||||
structure LowerCaseC =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
x 0.199999943376 y 0.200000017881 x ~0.200000017881 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y 0.200000017881 x 0.199999943376 y 0.200000017881
|
||||
x ~0.333333343267 y 0.0666666701436 x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y 0.0666666701436
|
||||
x ~0.200000017881 y ~0.466666638851 x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.599999964237
|
||||
x 0.199999943376 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.599999964237 x 0.333333283663 y ~0.599999964237 x 0.333333283663 y 0.599999964237
|
||||
x 0.333333283663 y 0.599999964237 x 0.199999943376 y 0.599999964237 x 0.199999943376 y ~0.599999964237
|
||||
@@ -1,63 +1,137 @@
|
||||
structure LowerCaseD =
|
||||
structure LowerCaseD =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
x ~0.200000017881 y ~0.199999943376 x 0.199999943376 y ~0.199999943376 x 0.199999943376 y ~0.0666667371988
|
||||
x 0.199999943376 y ~0.0666667371988 x ~0.200000017881 y ~0.0666667371988 x ~0.200000017881 y ~0.199999943376
|
||||
x 0.333333283663 y ~0.199999943376 x 0.333333283663 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.199999943376 x 0.333333283663 y ~0.199999943376
|
||||
x ~0.200000017881 y 0.200000017881 x 0.199999943376 y 0.200000017881 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y 0.200000017881
|
||||
x 0.333333283663 y ~0.333333283663 x 0.199999943376 y ~0.333333283663 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x 0.333333283663 y ~0.466666638851 x 0.333333283663 y ~0.333333283663
|
||||
x 0.199999943376 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.599999964237
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851
|
||||
x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y 0.0666666701436 x ~0.200000017881 y 0.0666666701436
|
||||
@@ -1,87 +1,197 @@
|
||||
structure LowerCaseE =
|
||||
structure LowerCaseE =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
x ~0.333333343267 y 0.0666666701436 x ~0.333333343267 y 0.200000017881 x 0.199999943376 y 0.200000017881
|
||||
x 0.199999943376 y 0.200000017881 x 0.199999943376 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436
|
||||
x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.0666666701436 y 0.599999964237 x 0.333333283663 y 0.599999964237
|
||||
x 0.333333283663 y 0.599999964237 x 0.333333283663 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
@@ -1,51 +1,107 @@
|
||||
structure LowerCaseF =
|
||||
structure LowerCaseF =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
x 0.199999943376 y 0.200000017881 x ~0.200000017881 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y 0.200000017881 x 0.199999943376 y 0.200000017881
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.333333343267 y ~0.466666638851 x ~0.333333343267 y 0.0666666701436
|
||||
x ~0.200000017881 y ~0.466666638851 x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.599999964237
|
||||
x 0.199999943376 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.466666638851
|
||||
x 0.333333283663 y 0.200000017881 x 0.333333283663 y ~0.866666674614 x 0.199999943376 y ~0.866666674614
|
||||
x 0.199999943376 y ~0.866666674614 x 0.199999943376 y 0.200000017881 x 0.333333283663 y 0.200000017881
|
||||
x 0.199999943376 y ~0.866666674614 x ~0.200000017881 y ~0.866666674614 x ~0.200000017881 y ~1
|
||||
x ~0.200000017881 y ~1 x 0.199999943376 y ~1 x 0.199999943376 y ~0.866666674614
|
||||
@@ -1,75 +1,167 @@
|
||||
structure LowerCaseG =
|
||||
structure LowerCaseG =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 13.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 13.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 13.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x 0.199999943376 y 0.200000017881 x ~0.200000017881 y 0.200000017881
|
||||
x 0.333333283663 y 0.0666666701436 x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.599999964237
|
||||
x 0.199999943376 y ~0.599999964237 x 0.333333283663 y ~0.599999964237 x 0.333333283663 y 0.0666666701436
|
||||
x ~0.333333343267 y 0.599999964237 x ~0.200000017881 y 0.599999964237 x ~0.200000017881 y ~0.599999964237
|
||||
x ~0.200000017881 y ~0.599999964237 x ~0.333333343267 y ~0.599999964237 x ~0.333333343267 y 0.599999964237
|
||||
@@ -1,51 +1,107 @@
|
||||
structure LowerCaseH =
|
||||
structure LowerCaseH =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
x ~0.0666666701436 y 0.466666638851 x ~0.200000017881 y 0.466666638851 x ~0.200000017881 y 0.333333343267
|
||||
x ~0.200000017881 y 0.333333343267 x ~0.0666666701436 y 0.333333343267 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.333333343267 y 0.200000017881 x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.0666666701436 x ~0.333333343267 y 0.0666666701436 x ~0.333333343267 y 0.200000017881
|
||||
x ~0.0666666701436 y 0.200000017881 x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y ~0.466666638851
|
||||
x ~0.200000017881 y ~0.466666638851 x ~0.0666666701436 y ~0.466666638851 x ~0.0666666701436 y 0.200000017881
|
||||
x ~0.0666666701436 y ~0.599999964237 x 0.199999943376 y ~0.599999964237 x 0.199999943376 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x ~0.0666666701436 y ~0.466666638851 x ~0.0666666701436 y ~0.599999964237
|
||||
@@ -1,63 +1,137 @@
|
||||
structure LowerCaseI =
|
||||
structure LowerCaseI =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
x 0.0666666701436 y 0.466666638851 x 0.0666666701436 y 0.333333343267 x 0.199999943376 y 0.333333343267
|
||||
x 0.199999943376 y 0.333333343267 x 0.199999943376 y 0.466666638851 x 0.0666666701436 y 0.466666638851
|
||||
x ~0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.0666666701436
|
||||
x 0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y 0.200000017881
|
||||
x 0.199999943376 y 0.200000017881 x 0.0666666701436 y 0.200000017881 x 0.0666666701436 y ~0.733333289623
|
||||
x 0.0666666701436 y ~0.733333289623 x 0.199999943376 y ~0.733333289623 x 0.199999943376 y 0.200000017881
|
||||
x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y ~0.733333289623 x ~0.0666666701436 y ~0.733333289623
|
||||
x ~0.0666666701436 y ~0.733333289623 x ~0.0666666701436 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237
|
||||
x 0.0666666701436 y ~0.733333289623 x 0.0666666701436 y ~0.866666674614 x ~0.0666666701436 y ~0.866666674614
|
||||
x ~0.0666666701436 y ~0.866666674614 x ~0.0666666701436 y ~0.733333289623 x 0.0666666701436 y ~0.733333289623
|
||||
@@ -1,75 +1,137 @@
|
||||
structure LowerCaseJ =
|
||||
structure LowerCaseJ =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
x 0.333333283663 y ~0.599999964237 x 0.199999943376 y ~0.466666638851 x 0.333333283663 y ~0.466666638851
|
||||
x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.599999964237 x 0.333333283663 y ~0.599999964237
|
||||
x 0.199999943376 y ~0.466666638851 x 0.0666666701436 y ~0.333333283663 x 0.199999943376 y ~0.333333283663
|
||||
x 0.0666666701436 y ~0.333333283663 x 0.0666666701436 y ~0.466666638851 x 0.199999943376 y ~0.466666638851
|
||||
x 0.333333283663 y 0.200000017881 x 0.199999943376 y 0.200000017881 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x 0.333333283663 y 0.0666666701436 x 0.333333283663 y 0.200000017881
|
||||
x 0.199999943376 y 0.0666666701436 x 0.0666666701436 y 0.0666666701436 x 0.0666666701436 y ~0.0666667371988
|
||||
x 0.0666666701436 y ~0.0666667371988 x 0.199999943376 y ~0.0666667371988 x 0.199999943376 y 0.0666666701436
|
||||
x 0.0666666701436 y ~0.199999943376 x 0.0666666701436 y ~0.0666667371988 x ~0.0666666701436 y ~0.199999943376
|
||||
x ~0.0666666701436 y ~0.199999943376 x ~0.0666666701436 y ~0.0666667371988 x 0.0666666701436 y ~0.0666667371988
|
||||
x 0.0666666701436 y ~0.199999943376 x ~0.200000017881 y ~0.199999943376 x ~0.200000017881 y ~0.333333283663
|
||||
x ~0.200000017881 y ~0.333333283663 x 0.0666666701436 y ~0.333333283663 x 0.0666666701436 y ~0.199999943376
|
||||
x ~0.200000017881 y ~0.599999964237 x ~0.333333343267 y ~0.599999964237 x ~0.333333343267 y 0.599999964237
|
||||
x ~0.333333343267 y 0.599999964237 x ~0.200000017881 y 0.599999964237 x ~0.200000017881 y ~0.599999964237
|
||||
@@ -1,99 +1,227 @@
|
||||
structure LowerCaseK =
|
||||
structure LowerCaseK =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
x ~0.0666666701436 y 0.599999964237 x ~0.200000017881 y 0.466666638851 x ~0.0666666701436 y 0.466666638851
|
||||
x ~0.200000017881 y 0.466666638851 x ~0.200000017881 y 0.599999964237 x ~0.0666666701436 y 0.599999964237
|
||||
x ~0.0666666701436 y 0.599999964237 x 0.0666666701436 y 0.599999964237 x 0.0666666701436 y ~0.599999964237
|
||||
x 0.0666666701436 y ~0.599999964237 x ~0.0666666701436 y ~0.599999964237 x ~0.0666666701436 y 0.599999964237
|
||||
x 0.0666666701436 y ~0.466666638851 x 0.199999943376 y ~0.466666638851 x 0.199999943376 y ~0.599999964237
|
||||
x 0.199999943376 y ~0.599999964237 x 0.0666666701436 y ~0.599999964237 x 0.0666666701436 y ~0.466666638851
|
||||
@@ -1,51 +1,107 @@
|
||||
structure LowerCaseL =
|
||||
structure LowerCaseL =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
x 0.333333283663 y ~0.599999964237 x 0.333333283663 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.599999964237 x 0.333333283663 y ~0.599999964237
|
||||
x 0.0666666701436 y 0.200000017881 x 0.0666666701436 y 0.0666666701436 x 0.199999943376 y 0.200000017881
|
||||
x 0.0666666701436 y 0.0666666701436 x 0.199999943376 y 0.0666666701436 x 0.199999943376 y 0.200000017881
|
||||
x 0.0666666701436 y ~0.599999964237 x 0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y 0.0666666701436
|
||||
x ~0.0666666701436 y 0.0666666701436 x ~0.0666666701436 y ~0.599999964237 x 0.0666666701436 y ~0.599999964237
|
||||
x ~0.0666666701436 y 0.0666666701436 x ~0.200000017881 y 0.0666666701436 x ~0.200000017881 y 0.200000017881
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.0666666701436 y 0.200000017881 x ~0.0666666701436 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y ~0.599999964237 x ~0.333333343267 y ~0.599999964237
|
||||
x ~0.333333343267 y ~0.599999964237 x ~0.333333343267 y 0.200000017881 x ~0.200000017881 y 0.200000017881
|
||||
@@ -1,75 +1,167 @@
|
||||
structure LowerCaseM =
|
||||
structure LowerCaseM =
|
||||
struct
|
||||
fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =
|
||||
fun xToNdc (xOffset, xpos, scale, halfWidth) =
|
||||
((xpos * scale + xOffset) - halfWidth) / halfWidth
|
||||
|
||||
fun yToNdc (yOffset, ypos, scale, halfHeight) =
|
||||
~(((ypos * scale + yOffset) - halfHeight) / halfHeight)
|
||||
|
||||
fun lerp (xOffset: Real32.real, yOffset, scale, windowWidth, windowHeight) =
|
||||
let
|
||||
val startX = Real32.fromInt startX
|
||||
val startY = Real32.fromInt startY
|
||||
val endY = windowHeight - startY
|
||||
val startY = windowHeight - (startY + drawHeight)
|
||||
val endX = startX + drawWidth
|
||||
val windowHeight = windowHeight / 2.0
|
||||
val windowWidth = windowWidth / 2.0
|
||||
val halfWidth = windowWidth / 2.0
|
||||
val halfHeight = windowHeight / 2.0
|
||||
in
|
||||
#[ (((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b
|
||||
]
|
||||
end
|
||||
end
|
||||
#[
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||
0.000000000000000,
|
||||
0.000000000000000,
|
||||
0.000000000000000
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
x 0.333333283663 y ~0.599999964237 x 0.333333283663 y 0.0666666701436 x 0.199999943376 y 0.0666666701436
|
||||
x 0.199999943376 y 0.0666666701436 x 0.199999943376 y ~0.599999964237 x 0.333333283663 y ~0.599999964237
|
||||
x 0.199999943376 y 0.200000017881 x ~0.200000017881 y 0.200000017881 x ~0.200000017881 y 0.0666666701436
|
||||
x ~0.200000017881 y 0.0666666701436 x 0.199999943376 y 0.0666666701436 x 0.199999943376 y 0.200000017881
|
||||
x ~0.200000017881 y 0.200000017881 x ~0.333333343267 y 0.200000017881 x ~0.333333343267 y ~0.599999964237
|
||||
x ~0.333333343267 y ~0.599999964237 x ~0.200000017881 y ~0.599999964237 x ~0.200000017881 y 0.200000017881
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user