128,16 → 128,18 |
|
double cx = 0.0; |
TVector3 vodnik_edge[4]; |
double t = 3.0; |
double t = 4.0; |
vodnik_edge[0].SetXYZ(cx, t,-t); |
vodnik_edge[1].SetXYZ(cx, t, t); |
vodnik_edge[2].SetXYZ(cx,-t, t); |
vodnik_edge[3].SetXYZ(cx,-t,-t); |
|
CSurface *surf = new CSurface(p_type, vodnik_edge, p_n1, p_n2, 0.96); |
surf->FlipN(); |
surf->SetFresnel(1); |
surf->Draw(); |
CSurface surf; |
//surf = CSurface(p_type, vodnik_edge, p_n1, p_n2, 0.96); |
surf.Set(p_type, vodnik_edge, p_n1, p_n2, 0.96); |
surf.FlipN(); |
surf.SetFresnel(1); |
surf.Draw(); |
|
CRay *ray = new CRay(cx, 0.0, 0.0, TMath::Cos(theta), 0.0, TMath::Sin(theta)); |
ray->SetColor(kRed); |
151,13 → 153,13 |
|
ray->DrawS(cx, -5.0); |
|
CRay *out = new CRay; |
out->SetColor(kBlack); |
CRay out; |
out.SetColor(kBlack); |
TVector3 *inters = new TVector3; |
surf->PropagateRay(*ray, out, inters); |
surf.PropagateRay(*ray, out, inters); |
printf(" n1 = %f, n2 = %f\n", p_n1, p_n2); |
//if(fate == 1) out->DrawS(cx, 5.0); |
out->DrawS(cx, 5.0); |
out.DrawS(cx, 5.0); |
|
CRay *incidentPolarization = new CRay; |
incidentPolarization->SetColor(kGreen); |
167,7 → 169,7 |
|
CRay *surfaceNormal = new CRay; |
surfaceNormal->SetColor(kBlue); |
surfaceNormal->Set(ray->GetR(), surf->GetN()); |
surfaceNormal->Set(ray->GetR(), surf.GetN()); |
surfaceNormal->DrawS(cx, 1.0); |
printf(" BLUE: surface normal vector\n"); |
} |