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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
end
|
||||||
@@ -1,27 +1,47 @@
|
|||||||
structure AsciiDot =
|
structure AsciiDot =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
]
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,99 +1,227 @@
|
|||||||
structure AsciiEight =
|
structure AsciiEight =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
]
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,87 +1,197 @@
|
|||||||
structure AsciiFour =
|
structure AsciiFour =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 6.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 6.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 6.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.266666650772)) + (endX * 0.266666650772)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
]
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,63 +1,137 @@
|
|||||||
structure AsciiHash =
|
structure AsciiHash =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
end
|
||||||
@@ -1,27 +1,47 @@
|
|||||||
structure AsciiMinus =
|
structure AsciiMinus =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
]
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,87 +1,197 @@
|
|||||||
structure AsciiNine =
|
structure AsciiNine =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
]
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,63 +1,137 @@
|
|||||||
structure AsciiOne =
|
structure AsciiOne =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
end
|
||||||
@@ -1,171 +1,407 @@
|
|||||||
structure AsciiPercent =
|
structure AsciiPercent =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,27 +1,47 @@
|
|||||||
structure AsciiPipe =
|
structure AsciiPipe =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 13.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 13.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
]
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,39 +1,77 @@
|
|||||||
structure AsciiPlus =
|
structure AsciiPlus =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
end
|
||||||
@@ -1,75 +1,167 @@
|
|||||||
structure AsciiSeven =
|
structure AsciiSeven =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
end
|
||||||
@@ -1,87 +1,197 @@
|
|||||||
structure AsciiSix =
|
structure AsciiSix =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
]
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,99 +1,227 @@
|
|||||||
structure AsciiThree =
|
structure AsciiThree =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
end
|
||||||
@@ -1,111 +1,257 @@
|
|||||||
structure AsciiTwo =
|
structure AsciiTwo =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,75 +1,168 @@
|
|||||||
structure AsciiZero =
|
structure AsciiZero =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
]
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
|
||||||
232
fonts/caret.sml
232
fonts/caret.sml
@@ -1,75 +1,167 @@
|
|||||||
structure Caret =
|
structure Caret =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.866666674614)) + (endY * 0.866666674614)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.866666674614)) + (endY * 0.866666674614)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.866666674614)) + (endY * 0.866666674614)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
|
||||||
106
fonts/colon.sml
106
fonts/colon.sml
@@ -1,39 +1,77 @@
|
|||||||
structure Colon =
|
structure Colon =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.599999964237)) + (endY * 0.599999964237)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.599999964237)) + (endY * 0.599999964237)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
|
||||||
148
fonts/comma.sml
148
fonts/comma.sml
@@ -1,51 +1,107 @@
|
|||||||
structure Comma =
|
structure Comma =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.333333313465)) + (endY * 0.333333313465)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.199999928474)) + (endY * 0.199999928474)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.0666666030884)) + (endY * 0.0666666030884)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.0666666030884)) + (endY * 0.0666666030884)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.40000000596)) + (endX * 0.40000000596)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 12.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.133333325386)) + (endY * 0.133333325386)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666698456)) + (endX * 0.466666698456)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.0666666030884)) + (endY * 0.0666666030884)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
end
|
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
|
end
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
$(SML_LIB)/basis/basis.mlb
|
$(SML_LIB)/basis/basis.mlb
|
||||||
|
|
||||||
ann
|
ann
|
||||||
"allowVectorExps true"
|
"allowVectorExps true"
|
||||||
in
|
in
|
||||||
@@ -14,29 +13,26 @@ in
|
|||||||
ascii-seven.sml
|
ascii-seven.sml
|
||||||
ascii-eight.sml
|
ascii-eight.sml
|
||||||
ascii-nine.sml
|
ascii-nine.sml
|
||||||
|
ascii-space.sml
|
||||||
ampersand.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
|
asterisk.sml
|
||||||
|
ascii-at.sml
|
||||||
backtick.sml
|
backtick.sml
|
||||||
bracket-closed.sml
|
backward-slash.sml
|
||||||
bracket-open.sml
|
|
||||||
caret.sml
|
caret.sml
|
||||||
colon.sml
|
colon.sml
|
||||||
comma.sml
|
comma.sml
|
||||||
curly-brace-closed.sml
|
|
||||||
curly-brace-open.sml
|
|
||||||
dollar.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-a.sml
|
||||||
lower-case-b.sml
|
lower-case-b.sml
|
||||||
lower-case-c.sml
|
lower-case-c.sml
|
||||||
@@ -63,18 +59,20 @@ in
|
|||||||
lower-case-x.sml
|
lower-case-x.sml
|
||||||
lower-case-y.sml
|
lower-case-y.sml
|
||||||
lower-case-z.sml
|
lower-case-z.sml
|
||||||
|
ascii-minus.sml
|
||||||
|
ascii-percent.sml
|
||||||
|
ascii-pipe.sml
|
||||||
|
ascii-plus.sml
|
||||||
question-mark.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
|
quotes-single.sml
|
||||||
semi-colon.sml
|
ascii-tilde.sml
|
||||||
slash-backwards.sml
|
|
||||||
slash-forwards.sml
|
|
||||||
square-bracket-closed.sml
|
|
||||||
square-bracket-open.sml
|
|
||||||
tilde.sml
|
|
||||||
underscore.sml
|
underscore.sml
|
||||||
|
unknown.sml
|
||||||
upper-case-a.sml
|
upper-case-a.sml
|
||||||
upper-case-b.sml
|
upper-case-b.sml
|
||||||
upper-case-c.sml
|
upper-case-c.sml
|
||||||
@@ -101,10 +99,6 @@ in
|
|||||||
upper-case-x.sml
|
upper-case-x.sml
|
||||||
upper-case-y.sml
|
upper-case-y.sml
|
||||||
upper-case-z.sml
|
upper-case-z.sml
|
||||||
|
|
||||||
ascii-equals.sml
|
|
||||||
space.sml
|
|
||||||
unknown-char.sml
|
|
||||||
in
|
in
|
||||||
cozette-ascii.sml
|
cozette-ascii.sml
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,38 +1,38 @@
|
|||||||
structure CozetteAscii =
|
structure CozetteAscii =
|
||||||
struct
|
struct
|
||||||
val asciiTable = #[
|
val asciiTable = #[
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
AsciiSpace.lerp,
|
AsciiSpace.lerp,
|
||||||
ExclamationMark.lerp,
|
ExclamationMark.lerp,
|
||||||
QuotesDouble.lerp,
|
QuotesDouble.lerp,
|
||||||
@@ -41,14 +41,14 @@ struct
|
|||||||
AsciiPercent.lerp,
|
AsciiPercent.lerp,
|
||||||
Ampersand.lerp,
|
Ampersand.lerp,
|
||||||
QuotesSingle.lerp,
|
QuotesSingle.lerp,
|
||||||
BracketOpen.lerp,
|
LeftParen.lerp,
|
||||||
BracketClosed.lerp,
|
RightParen.lerp,
|
||||||
Asterisk.lerp,
|
Asterisk.lerp,
|
||||||
AsciiPlus.lerp,
|
AsciiPlus.lerp,
|
||||||
Comma.lerp,
|
Comma.lerp,
|
||||||
AsciiMinus.lerp,
|
AsciiMinus.lerp,
|
||||||
AsciiDot.lerp,
|
AsciiDot.lerp,
|
||||||
SlashForwards.lerp,
|
ForwardSlash.lerp,
|
||||||
AsciiZero.lerp,
|
AsciiZero.lerp,
|
||||||
AsciiOne.lerp,
|
AsciiOne.lerp,
|
||||||
AsciiTwo.lerp,
|
AsciiTwo.lerp,
|
||||||
@@ -61,9 +61,9 @@ struct
|
|||||||
AsciiNine.lerp,
|
AsciiNine.lerp,
|
||||||
Colon.lerp,
|
Colon.lerp,
|
||||||
Semicolon.lerp,
|
Semicolon.lerp,
|
||||||
AngleBracketOpen.lerp,
|
LeftAngledBracket.lerp,
|
||||||
AsciiEquals.lerp,
|
AsciiEquals.lerp,
|
||||||
AngleBracketClosed.lerp,
|
RightAngledBracket.lerp,
|
||||||
QuestionMark.lerp,
|
QuestionMark.lerp,
|
||||||
AsciiAt.lerp,
|
AsciiAt.lerp,
|
||||||
UpperCaseA.lerp,
|
UpperCaseA.lerp,
|
||||||
@@ -92,9 +92,9 @@ struct
|
|||||||
UpperCaseX.lerp,
|
UpperCaseX.lerp,
|
||||||
UpperCaseY.lerp,
|
UpperCaseY.lerp,
|
||||||
UpperCaseZ.lerp,
|
UpperCaseZ.lerp,
|
||||||
SquareBracketOpen.lerp,
|
LeftBracket.lerp,
|
||||||
SlashBackwards.lerp,
|
BackwardSlash.lerp,
|
||||||
SquareBracketClosed.lerp,
|
RightBracket.lerp,
|
||||||
Caret.lerp,
|
Caret.lerp,
|
||||||
Underscore.lerp,
|
Underscore.lerp,
|
||||||
Backtick.lerp,
|
Backtick.lerp,
|
||||||
@@ -124,130 +124,137 @@ struct
|
|||||||
LowerCaseX.lerp,
|
LowerCaseX.lerp,
|
||||||
LowerCaseY.lerp,
|
LowerCaseY.lerp,
|
||||||
LowerCaseZ.lerp,
|
LowerCaseZ.lerp,
|
||||||
CurlyBraceOpen.lerp,
|
LeftBrace.lerp,
|
||||||
AsciiPipe.lerp,
|
AsciiPipe.lerp,
|
||||||
CurlyBraceClosed.lerp,
|
RightBrace.lerp,
|
||||||
AsciiTilde.lerp,
|
AsciiTilde.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.lerp,
|
Unknown.lerp,
|
||||||
UnknownChar.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
|
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
|
|
||||||
358
fonts/dollar.sml
358
fonts/dollar.sml
@@ -1,111 +1,257 @@
|
|||||||
structure Dollar =
|
structure Dollar =
|
||||||
struct
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
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, 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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
]
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 9.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 5.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.0)) + (endY * 0.0)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 3.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.666666686535)) + (endY * 0.666666686535)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 11.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.066666662693)) + (endY * 0.066666662693)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 4.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.133333355188)) + (endY * 0.133333355188)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 7.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.466666638851)) + (endY * 0.466666638851)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.33333337307)) + (endY * 0.33333337307)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.400000035763)) + (endY * 0.400000035763)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 6.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 3.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 8.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.733333349228)) + (endY * 0.733333349228)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 2.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.799999952316)) + (endY * 0.799999952316)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 1.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.266666680574)) + (endY * 0.266666680574)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
end
|
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
|
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
|
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
|
let
|
||||||
val startX = Real32.fromInt startX
|
val halfWidth = windowWidth / 2.0
|
||||||
val startY = Real32.fromInt startY
|
val halfHeight = windowHeight / 2.0
|
||||||
val endY = windowHeight - startY
|
|
||||||
val startY = windowHeight - (startY + drawHeight)
|
|
||||||
val endX = startX + drawWidth
|
|
||||||
val windowHeight = windowHeight / 2.0
|
|
||||||
val windowWidth = windowWidth / 2.0
|
|
||||||
in
|
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,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.66666662693)) + (endX * 0.66666662693)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.599999964237)) + (endX * 0.599999964237)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 10.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 1.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.533333361149)) + (endX * 0.533333361149)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.466666668653)) + (endX * 0.466666668653)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 0.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.533333361149)) + (endY * 0.533333361149)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
yToNdc (yOffset, 5.000000000000000, scale, halfHeight),
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.200000017881)) + (endY * 0.200000017881)) / windowHeight) - 1.0, r, g, b,
|
0.000000000000000,
|
||||||
(((startX * (1.0 - 0.333333313465)) + (endX * 0.333333313465)) / windowWidth) - 1.0,
|
xToNdc (xOffset, 2.000000000000000, scale, halfWidth),
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b,
|
yToNdc (yOffset, 4.000000000000000, scale, halfHeight),
|
||||||
(((startX * (1.0 - 0.399999976158)) + (endX * 0.399999976158)) / windowWidth) - 1.0,
|
0.000000000000000,
|
||||||
(((startY * (1.0 - 0.600000023842)) + (endY * 0.600000023842)) / windowHeight) - 1.0, r, g, b
|
0.000000000000000,
|
||||||
]
|
0.000000000000000,
|
||||||
end
|
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
|
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