Post by pixelboystm on Sept 26, 2022 19:27:03 GMT
Hello I am at my second attempt at implementing the ray tracer this time using rust. Now at the end of CHapter 11 I tried rendering the spehre inside a sphere but had some issuses. Looking at this thread i found the debug output and added it to my ray tracer whisch schows only difference in color but not in anythign different and therefore i am a bit lost.
The original debug:
== remaining 1 ==
n1: 1.5
n2: 1
eyev: v(0.6371,-0.6371,0.4337)
normalv: v(0.5732,-0.5732,0.5856)
under point: p(-0.5733,0.5733,-0.5856)
n_ratio: 1.5
cos_i: 0.9843875779711537
sin2_t: 0.06970746675619283
cos_t: 0.9645167355955039
refract direction: v(-0.6622,0.6622,-0.3508)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 1 ==
n1: 1.0000034
n2: 1.5
eyev: v(-0.1449,0.1449,-0.9788)
normalv: v(0.2423,-0.2423,-0.9395)
under point: p(-0.1212,0.1212,0.4698)
n_ratio: 0.6666689333333333
cos_i: 0.8493497525679515
sin2_t: 0.12382528547998457
cos_t: 0.9360420474102727
refract direction: v(0.0070,-0.0070,1.0000)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 2 ==
n1: 1.5
n2: 1.0000034
eyev: v(-0.2772,0.2772,-0.9200)
normalv: v(-0.4884,0.4884,-0.7231)
under point: p(-0.2442,0.2442,-0.3615)
n_ratio: 1.49999490001734
cos_i: 0.9360155818910421
sin2_t: 0.2787164732534013
cos_t: 0.8492841260418086
refract direction: v(0.1449,-0.1449,0.9788)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 3 ==
n1: 1.5
n2: 1
eyev: v(0.4854,-0.4854,0.7271)
normalv: v(0.3874,-0.3874,0.8366)
under point: p(-0.3874,0.3874,-0.8367)
n_ratio: 1.5
cos_i: 0.984390724110604
sin2_t: 0.06969353014125149
cos_t: 0.9645239602305111
refract direction: v(-0.5298,0.5298,-0.6623)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 1 ==
n1: 1.0000034
n2: 1.5
eyev: v(0.4866,-0.4866,0.7256)
normalv: v(0.1426,-0.1426,0.9794)
under point: p(-0.0713,0.0713,-0.4898)
n_ratio: 0.6666689333333333
cos_i: 0.8495136704509465
sin2_t: 0.12370151837357306
cos_t: 0.9361081570130809
refract direction: v(-0.3771,0.3771,-0.8459)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 1 ==
n1: 1.5
n2: 1
eyev: v(-0.7033,0.7033,0.1032)
normalv: v(-0.7052,0.7052,-0.0734)
under point: p(0.7053,-0.7053,0.0734)
n_ratio: 1.5
cos_i: 0.984403306680672
sin2_t: 0.06963779204135742
cos_t: 0.9645528538958571
refract direction: v(0.6939,-0.6939,-0.1924)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 2 ==
n1: 1.0000034
n2: 1.5
eyev: v(-0.6756,0.6756,0.2953)
normalv: v(-0.6840,0.6840,-0.2533)
under point: p(0.3421,-0.3421,0.1267)
n_ratio: 0.6666689333333333
cos_i: 0.8494481221743096
sin2_t: 0.12375101382906421
cos_t: 0.936081719814534
refract direction: v(0.7033,-0.7033,-0.1032)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 1 ==
n1: 1.5
n2: 1.0000034
eyev: v(-0.4605,0.4605,0.7588)
normalv: v(-0.2422,0.2422,0.9395)
under point: p(-0.1211,0.1211,0.4696)
n_ratio: 1.49999490001734
cos_i: 0.936042047410272
sin2_t: 0.2786049978127631
cos_t: 0.8493497525679494
refract direction: v(0.5564,-0.5564,-0.6171)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 2 ==
n1: 1.5
n2: 1
eyev: v(0.2461,-0.2461,-0.9375)
normalv: v(0.3589,-0.3589,-0.8616)
under point: p(-0.3590,0.3590,0.8617)
n_ratio: 1.5
cos_i: 0.9843970166741242
sin2_t: 0.06966565551693923
cos_t: 0.9645384100610306
refract direction: v(-0.1854,0.1854,0.9650)
refracted color: v(0.6692,0.6692,0.6692)
/\
dis one
== remaining 3 ==
n1: 1.0000034
n2: 1.5
eyev: v(0.1120,-0.1120,-0.9874)
normalv: v(0.4636,-0.4636,-0.7551)
under point: p(-0.2319,0.2319,0.3776)
n_ratio: 0.6666689333333333
cos_i: 0.8493825426089872
sin2_t: 0.12380052908867871
cos_t: 0.936055271290815
refract direction: v(-0.2461,0.2461,0.9375)
refracted color: v(0.5782,0.5782,0.5782)
== remaining 4 ==
n1: 1.5
n2: 1.0000034
eyev: v(-0.0265,0.0265,-0.9993)
normalv: v(-0.2734,0.2734,-0.9222)
under point: p(-0.1367,0.1367,-0.4610)
n_ratio: 1.49999490001734
cos_i: 0.9360288114367313
sin2_t: 0.27866074946444747
cos_t: 0.8493169317372358
refract direction: v(-0.1120,0.1120,0.9874)
refracted color: v(0.4995,0.4995,0.4995)
== remaining 5 ==
n1: 1
n2: 1.5
eyev: v(0.0373,-0.0373,-0.9986)
normalv: v(-0.1504,0.1504,-0.9771)
under point: p(-0.1504,0.1504,-0.9770)
n_ratio: 0.6666666666666666
cos_i: 0.9645311833669982
sin2_t: 0.030968709472292525
cos_t: 0.9843938696109944
refract direction: v(0.0265,-0.0265,0.9993)
refracted color: v(0.4316,0.4316,0.4316)
n1: 1.5
n2: 1
eyev: v(0.6371,-0.6371,0.4337)
normalv: v(0.5732,-0.5732,0.5856)
under point: p(-0.5733,0.5733,-0.5856)
n_ratio: 1.5
cos_i: 0.9843875779711537
sin2_t: 0.06970746675619283
cos_t: 0.9645167355955039
refract direction: v(-0.6622,0.6622,-0.3508)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 1 ==
n1: 1.0000034
n2: 1.5
eyev: v(-0.1449,0.1449,-0.9788)
normalv: v(0.2423,-0.2423,-0.9395)
under point: p(-0.1212,0.1212,0.4698)
n_ratio: 0.6666689333333333
cos_i: 0.8493497525679515
sin2_t: 0.12382528547998457
cos_t: 0.9360420474102727
refract direction: v(0.0070,-0.0070,1.0000)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 2 ==
n1: 1.5
n2: 1.0000034
eyev: v(-0.2772,0.2772,-0.9200)
normalv: v(-0.4884,0.4884,-0.7231)
under point: p(-0.2442,0.2442,-0.3615)
n_ratio: 1.49999490001734
cos_i: 0.9360155818910421
sin2_t: 0.2787164732534013
cos_t: 0.8492841260418086
refract direction: v(0.1449,-0.1449,0.9788)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 3 ==
n1: 1.5
n2: 1
eyev: v(0.4854,-0.4854,0.7271)
normalv: v(0.3874,-0.3874,0.8366)
under point: p(-0.3874,0.3874,-0.8367)
n_ratio: 1.5
cos_i: 0.984390724110604
sin2_t: 0.06969353014125149
cos_t: 0.9645239602305111
refract direction: v(-0.5298,0.5298,-0.6623)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 1 ==
n1: 1.0000034
n2: 1.5
eyev: v(0.4866,-0.4866,0.7256)
normalv: v(0.1426,-0.1426,0.9794)
under point: p(-0.0713,0.0713,-0.4898)
n_ratio: 0.6666689333333333
cos_i: 0.8495136704509465
sin2_t: 0.12370151837357306
cos_t: 0.9361081570130809
refract direction: v(-0.3771,0.3771,-0.8459)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 1 ==
n1: 1.5
n2: 1
eyev: v(-0.7033,0.7033,0.1032)
normalv: v(-0.7052,0.7052,-0.0734)
under point: p(0.7053,-0.7053,0.0734)
n_ratio: 1.5
cos_i: 0.984403306680672
sin2_t: 0.06963779204135742
cos_t: 0.9645528538958571
refract direction: v(0.6939,-0.6939,-0.1924)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 2 ==
n1: 1.0000034
n2: 1.5
eyev: v(-0.6756,0.6756,0.2953)
normalv: v(-0.6840,0.6840,-0.2533)
under point: p(0.3421,-0.3421,0.1267)
n_ratio: 0.6666689333333333
cos_i: 0.8494481221743096
sin2_t: 0.12375101382906421
cos_t: 0.936081719814534
refract direction: v(0.7033,-0.7033,-0.1032)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 1 ==
n1: 1.5
n2: 1.0000034
eyev: v(-0.4605,0.4605,0.7588)
normalv: v(-0.2422,0.2422,0.9395)
under point: p(-0.1211,0.1211,0.4696)
n_ratio: 1.49999490001734
cos_i: 0.936042047410272
sin2_t: 0.2786049978127631
cos_t: 0.8493497525679494
refract direction: v(0.5564,-0.5564,-0.6171)
refracted color: v(0.0000,0.0000,0.0000)
== remaining 2 ==
n1: 1.5
n2: 1
eyev: v(0.2461,-0.2461,-0.9375)
normalv: v(0.3589,-0.3589,-0.8616)
under point: p(-0.3590,0.3590,0.8617)
n_ratio: 1.5
cos_i: 0.9843970166741242
sin2_t: 0.06966565551693923
cos_t: 0.9645384100610306
refract direction: v(-0.1854,0.1854,0.9650)
refracted color: v(0.6692,0.6692,0.6692)
/\
dis one
== remaining 3 ==
n1: 1.0000034
n2: 1.5
eyev: v(0.1120,-0.1120,-0.9874)
normalv: v(0.4636,-0.4636,-0.7551)
under point: p(-0.2319,0.2319,0.3776)
n_ratio: 0.6666689333333333
cos_i: 0.8493825426089872
sin2_t: 0.12380052908867871
cos_t: 0.936055271290815
refract direction: v(-0.2461,0.2461,0.9375)
refracted color: v(0.5782,0.5782,0.5782)
== remaining 4 ==
n1: 1.5
n2: 1.0000034
eyev: v(-0.0265,0.0265,-0.9993)
normalv: v(-0.2734,0.2734,-0.9222)
under point: p(-0.1367,0.1367,-0.4610)
n_ratio: 1.49999490001734
cos_i: 0.9360288114367313
sin2_t: 0.27866074946444747
cos_t: 0.8493169317372358
refract direction: v(-0.1120,0.1120,0.9874)
refracted color: v(0.4995,0.4995,0.4995)
== remaining 5 ==
n1: 1
n2: 1.5
eyev: v(0.0373,-0.0373,-0.9986)
normalv: v(-0.1504,0.1504,-0.9771)
under point: p(-0.1504,0.1504,-0.9770)
n_ratio: 0.6666666666666666
cos_i: 0.9645311833669982
sin2_t: 0.030968709472292525
cos_t: 0.9843938696109944
refract direction: v(0.0265,-0.0265,0.9993)
refracted color: v(0.4316,0.4316,0.4316)
=== remaining 1 ===
n1: 1.5
n2: 1
eyev: v(0.6371295342661772/-0.6371295342661772/0.43374175857476527)
normalv: v(0.5731984527513724/-0.5731984527513724/0.5855655962630196)
under point: p(-0.5732557725966474/0.5732557725966474/-0.5856241528226458)
n_ratio: 1.5
cos_i: 0.9843875779711537
sin2_t: 0.06970746675619283
cost_t: 0.9645167355955039
refracted direction: v(-0.6621796469943086/0.6621796469943086/-0.3507652066739078)
refracted color: Rgb(0/0/0)
=== remaining 1 ===
n1: 1.0000034
n2: 1.5
eyev: v(-0.14486000842009744/0.14486000842009744/-0.9787906599069389)
normalv: v(0.24227967246860135/-0.24227967246860135/-0.9394685309349188)
under point: p(-0.12116406420154753/0.12116406420154753/0.4698282123205529)
n_ratio: 0.6666689333333333
cos_i: 0.8493497525679515
sin2_t: 0.12382528547998457
cost_t: 0.9360420474102727
refracted direction: v(0.006976959643392441/-0.006976959643392441/0.999951320849305)
refracted color: Rgb(0/0/0)
=== remaining 2 ===
n1: 1.5
n2: 1.0000034
eyev: v(-0.2772020641816775/0.2772020641816775/-0.919955450675105)
normalv: v(-0.48841686833921133/0.48841686833921133/-0.7231168131383997)
under point: p(-0.24415959248277175/0.24415959248277175/-0.361486094887886)
n_ratio: 1.49999490001734
cos_i: 0.9360155818910421
sin2_t: 0.2787164732534013
cost_t: 0.8492841260418086
refracted direction: v(0.14486000842009744/-0.14486000842009744/0.9787906599069389)
refracted color: Rgb(0/0/0)
=== remaining 3 ===
n1: 1.5
n2: 1
eyev: v(0.4854296415989615/-0.4854296415989615/0.7271286860757239)
normalv: v(0.38736229786687393/-0.38736229786687393/0.8366008010889008)
under point: p(-0.3874010340966606/0.3874010340966606/-0.8366844611690096)
n_ratio: 1.5
cos_i: 0.984390724110604
sin2_t: 0.06969353014125149
cost_t: 0.9645239602305111
refracted direction: v(-0.5297909006455112/0.5297909006455112/-0.6623014443487488)
refracted color: Rgb(0/0/0)
=== remaining 1 ===
n1: 1.0000034
n2: 1.5
eyev: v(0.4865501034953934/-0.4865501034953934/0.7256293775594016)
normalv: v(0.1426378822122182/-0.1426378822122182/0.9794431423599977)
under point: p(-0.07133320489433032/0.07133320489433032/-0.4898195154942348)
n_ratio: 0.6666689333333333
cos_i: 0.8495136704509465
sin2_t: 0.12370151837357306
cost_t: 0.9361081570130809
refracted direction: v(-0.3771101616477079/0.3771101616477079/-0.8459171661363065)
refracted color: Rgb(0/0/0)
=== remaining 1 ===
n1: 1.5
n2: 1
eyev: v(-0.7033312837570341/0.7033312837570341/0.10319985744837484)
normalv: v(-0.7051995812829299/0.7051995812829299/-0.07339687402581126)
under point: p(0.7052701012410582/-0.7052701012410582/0.07340421371321382)
n_ratio: 1.5
cos_i: 0.984403306680672
sin2_t: 0.06963779204135742
cost_t: 0.9645528538958571
refracted direction: v(0.6938979948010523/-0.6938979948010523/-0.1923828101004813)
refracted color: Rgb(0/0/0)
=== remaining 2 ===
n1: 1.0000034
n2: 1.5
eyev: v(-0.6755735920916219/0.6755735920916219/0.29529755050939066)
normalv: v(-0.6840463032706213/0.6840463032706213/-0.25330082898323564)
under point: p(0.34209155626563775/-0.34209155626563775/0.12667574457451616)
n_ratio: 0.6666689333333333
cos_i: 0.8494481221743096
sin2_t: 0.12375101382906421
cost_t: 0.936081719814534
refracted direction: v(0.7033312837570341/-0.7033312837570341/-0.10319985744837484)
refracted color: Rgb(0/0/0)
=== remaining 1 ===
n1: 1.5
n2: 1.0000034
eyev: v(-0.4605205278807205/0.4605205278807205/0.7588423332952139)
normalv: v(-0.24224952180995343/0.24224952180995343/0.9394840809538487)
under point: p(-0.12110053595279568/0.12110053595279568/0.4696480920688288)
n_ratio: 1.49999490001734
cos_i: 0.936042047410272
sin2_t: 0.2786049978127631
cost_t: 0.8493497525679494
refracted direction: v(0.5564005634649736/-0.5564005634649736/-0.6171197824990855)
refracted color: Rgb(0/0/0)
=== remaining 2 ===
n1: 1.5
n2: 1
eyev: v(0.2461132461401461/-0.2461132461401461/-0.9374734877044362)
normalv: v(0.35891706397500767/-0.35891706397500767/-0.8616014637726195)
under point: p(-0.3589529556814052/0.3589529556814052/0.8616876239189968)
n_ratio: 1.5
cos_i: 0.9843970166741242
sin2_t: 0.06966565551693923
cost_t: 0.9645384100610306
refracted direction: v(-0.1853838329247963/0.1853838329247963/0.9650210717804157)
refracted color: Rgb(0.7873450103885125/0.7873450103885125/0.7873450103885125)
/\
||
||
=== remaining 3 ===
n1: 1.0000034
n2: 1.5
eyev: v(0.11200242464520596/-0.11200242464520596/-0.9873757712984403)
normalv: v(0.46361679056746763/-0.46361679056746763/-0.7550622113493972)
under point: p(-0.23185475696279056/0.23185475696279056/0.37760661189583355)
n_ratio: 0.6666689333333333
cos_i: 0.8493825426089872
sin2_t: 0.12380052908867871
cost_t: 0.936055271290815
refracted direction: v(-0.2461132461401461/0.2461132461401461/0.9374734877044362)
refracted color: Rgb(0.6802660508278446/0.6802660508278446/0.6802660508278446)
=== remaining 4 ===
n1: 1.5
n2: 1.0000034
eyev: v(-0.02645089737072017/0.02645089737072017/-0.9993001051018494)
normalv: v(-0.2734320422167267/0.2734320422167267/-0.9222092151883869)
under point: p(-0.13668867790414163/0.13668867790414163/-0.4610123866726745)
n_ratio: 1.49999490001734
cos_i: 0.9360288114367313
sin2_t: 0.27866074946444747
cost_t: 0.8493169317372358
refracted direction: v(-0.11200242464520596/0.11200242464520596/0.9873757712984403)
refracted color: Rgb(0.5877047090852611/0.5877047090852611/0.5877047090852611)
=== remaining 5 ===
n1: 1
n2: 1.5
eyev: v(0.03733084416743292/-0.03733084416743292/-0.9986054356689101)
normalv: v(-0.15038715621763504/0.15038715621763504/-0.9771220018449821)
under point: p(-0.15037211750201293/0.15037211750201293/-0.9770242896447953)
n_ratio: 0.6666666666666666
cos_i: 0.9645311833669982
sin2_t: 0.030968709472292525
cost_t: 0.9843938696109944
refracted direction: v(0.02645089737072017/-0.02645089737072017/0.9993001051018494)
refracted color: Rgb(0.5077377686161333/0.5077377686161333/0.5077377686161333)
n1: 1.5
n2: 1
eyev: v(0.6371295342661772/-0.6371295342661772/0.43374175857476527)
normalv: v(0.5731984527513724/-0.5731984527513724/0.5855655962630196)
under point: p(-0.5732557725966474/0.5732557725966474/-0.5856241528226458)
n_ratio: 1.5
cos_i: 0.9843875779711537
sin2_t: 0.06970746675619283
cost_t: 0.9645167355955039
refracted direction: v(-0.6621796469943086/0.6621796469943086/-0.3507652066739078)
refracted color: Rgb(0/0/0)
=== remaining 1 ===
n1: 1.0000034
n2: 1.5
eyev: v(-0.14486000842009744/0.14486000842009744/-0.9787906599069389)
normalv: v(0.24227967246860135/-0.24227967246860135/-0.9394685309349188)
under point: p(-0.12116406420154753/0.12116406420154753/0.4698282123205529)
n_ratio: 0.6666689333333333
cos_i: 0.8493497525679515
sin2_t: 0.12382528547998457
cost_t: 0.9360420474102727
refracted direction: v(0.006976959643392441/-0.006976959643392441/0.999951320849305)
refracted color: Rgb(0/0/0)
=== remaining 2 ===
n1: 1.5
n2: 1.0000034
eyev: v(-0.2772020641816775/0.2772020641816775/-0.919955450675105)
normalv: v(-0.48841686833921133/0.48841686833921133/-0.7231168131383997)
under point: p(-0.24415959248277175/0.24415959248277175/-0.361486094887886)
n_ratio: 1.49999490001734
cos_i: 0.9360155818910421
sin2_t: 0.2787164732534013
cost_t: 0.8492841260418086
refracted direction: v(0.14486000842009744/-0.14486000842009744/0.9787906599069389)
refracted color: Rgb(0/0/0)
=== remaining 3 ===
n1: 1.5
n2: 1
eyev: v(0.4854296415989615/-0.4854296415989615/0.7271286860757239)
normalv: v(0.38736229786687393/-0.38736229786687393/0.8366008010889008)
under point: p(-0.3874010340966606/0.3874010340966606/-0.8366844611690096)
n_ratio: 1.5
cos_i: 0.984390724110604
sin2_t: 0.06969353014125149
cost_t: 0.9645239602305111
refracted direction: v(-0.5297909006455112/0.5297909006455112/-0.6623014443487488)
refracted color: Rgb(0/0/0)
=== remaining 1 ===
n1: 1.0000034
n2: 1.5
eyev: v(0.4865501034953934/-0.4865501034953934/0.7256293775594016)
normalv: v(0.1426378822122182/-0.1426378822122182/0.9794431423599977)
under point: p(-0.07133320489433032/0.07133320489433032/-0.4898195154942348)
n_ratio: 0.6666689333333333
cos_i: 0.8495136704509465
sin2_t: 0.12370151837357306
cost_t: 0.9361081570130809
refracted direction: v(-0.3771101616477079/0.3771101616477079/-0.8459171661363065)
refracted color: Rgb(0/0/0)
=== remaining 1 ===
n1: 1.5
n2: 1
eyev: v(-0.7033312837570341/0.7033312837570341/0.10319985744837484)
normalv: v(-0.7051995812829299/0.7051995812829299/-0.07339687402581126)
under point: p(0.7052701012410582/-0.7052701012410582/0.07340421371321382)
n_ratio: 1.5
cos_i: 0.984403306680672
sin2_t: 0.06963779204135742
cost_t: 0.9645528538958571
refracted direction: v(0.6938979948010523/-0.6938979948010523/-0.1923828101004813)
refracted color: Rgb(0/0/0)
=== remaining 2 ===
n1: 1.0000034
n2: 1.5
eyev: v(-0.6755735920916219/0.6755735920916219/0.29529755050939066)
normalv: v(-0.6840463032706213/0.6840463032706213/-0.25330082898323564)
under point: p(0.34209155626563775/-0.34209155626563775/0.12667574457451616)
n_ratio: 0.6666689333333333
cos_i: 0.8494481221743096
sin2_t: 0.12375101382906421
cost_t: 0.936081719814534
refracted direction: v(0.7033312837570341/-0.7033312837570341/-0.10319985744837484)
refracted color: Rgb(0/0/0)
=== remaining 1 ===
n1: 1.5
n2: 1.0000034
eyev: v(-0.4605205278807205/0.4605205278807205/0.7588423332952139)
normalv: v(-0.24224952180995343/0.24224952180995343/0.9394840809538487)
under point: p(-0.12110053595279568/0.12110053595279568/0.4696480920688288)
n_ratio: 1.49999490001734
cos_i: 0.936042047410272
sin2_t: 0.2786049978127631
cost_t: 0.8493497525679494
refracted direction: v(0.5564005634649736/-0.5564005634649736/-0.6171197824990855)
refracted color: Rgb(0/0/0)
=== remaining 2 ===
n1: 1.5
n2: 1
eyev: v(0.2461132461401461/-0.2461132461401461/-0.9374734877044362)
normalv: v(0.35891706397500767/-0.35891706397500767/-0.8616014637726195)
under point: p(-0.3589529556814052/0.3589529556814052/0.8616876239189968)
n_ratio: 1.5
cos_i: 0.9843970166741242
sin2_t: 0.06966565551693923
cost_t: 0.9645384100610306
refracted direction: v(-0.1853838329247963/0.1853838329247963/0.9650210717804157)
refracted color: Rgb(0.7873450103885125/0.7873450103885125/0.7873450103885125)
/\
||
||
=== remaining 3 ===
n1: 1.0000034
n2: 1.5
eyev: v(0.11200242464520596/-0.11200242464520596/-0.9873757712984403)
normalv: v(0.46361679056746763/-0.46361679056746763/-0.7550622113493972)
under point: p(-0.23185475696279056/0.23185475696279056/0.37760661189583355)
n_ratio: 0.6666689333333333
cos_i: 0.8493825426089872
sin2_t: 0.12380052908867871
cost_t: 0.936055271290815
refracted direction: v(-0.2461132461401461/0.2461132461401461/0.9374734877044362)
refracted color: Rgb(0.6802660508278446/0.6802660508278446/0.6802660508278446)
=== remaining 4 ===
n1: 1.5
n2: 1.0000034
eyev: v(-0.02645089737072017/0.02645089737072017/-0.9993001051018494)
normalv: v(-0.2734320422167267/0.2734320422167267/-0.9222092151883869)
under point: p(-0.13668867790414163/0.13668867790414163/-0.4610123866726745)
n_ratio: 1.49999490001734
cos_i: 0.9360288114367313
sin2_t: 0.27866074946444747
cost_t: 0.8493169317372358
refracted direction: v(-0.11200242464520596/0.11200242464520596/0.9873757712984403)
refracted color: Rgb(0.5877047090852611/0.5877047090852611/0.5877047090852611)
=== remaining 5 ===
n1: 1
n2: 1.5
eyev: v(0.03733084416743292/-0.03733084416743292/-0.9986054356689101)
normalv: v(-0.15038715621763504/0.15038715621763504/-0.9771220018449821)
under point: p(-0.15037211750201293/0.15037211750201293/-0.9770242896447953)
n_ratio: 0.6666666666666666
cos_i: 0.9645311833669982
sin2_t: 0.030968709472292525
cost_t: 0.9843938696109944
refracted direction: v(0.02645089737072017/-0.02645089737072017/0.9993001051018494)
refracted color: Rgb(0.5077377686161333/0.5077377686161333/0.5077377686161333)
Hpefully one of you guys can help me! Tahnks in advance.