Commit 4cdae863 authored by Phillip Lino Rall's avatar Phillip Lino Rall
Browse files

changing transformation of inner planes in lenses, not working currently. FIX

parent fa6e44fa
......@@ -161,7 +161,7 @@ D3vector transform_right_lens_inner_quad ( double t1, double t2, double* pointer
// }
//return D3vector (0 , 0 , fabs((t1-0)*(t2-0)*(t1-1)*(t2-1)) * 10);
return D3vector (0 , 0 , z * 10);
return D3vector (0 , 0 , z);
return R_global_data*D3vector ( x,y,z);
}
......@@ -200,9 +200,6 @@ D3vector transform_left_lens_inner_quad ( double t1, double t2, double* pointer_
double z = 0;
z = offsetZ_global_data
+sign*(( sqrt(pow(curvatureRight_global_data,2)- actualY*actualY-actualX*actualX) //pow(r_global_data,2) * (t*t + (1-t)*(1-t)))
+sign*(- curvatureRight_global_data + (thickness_global_data-z_right_inner_global_data)) ));
z = offsetZ_global_data+sign*(-1*( sqrt(pow(curvatureLeft_global_data,2)-actualRadius)
- sign* (curvatureLeft_global_data - z_left_inner_global_data)) );
......@@ -216,11 +213,6 @@ D3vector transform_left_lens_inner_quad ( double t1, double t2, double* pointer_
cout << " stop "<<endl;
}
}
// if (( t1 == 0 && t2 == 0.5)||( t1 == 1 && t2 == 0.5)||( t1 == 0.5 && t2 == 0)||( t1 == 0.5 && t2 == 1))
// {
// cout << "z " << z << endl;
// cout << endl;
// }
return D3vector (0 , 0 , z);
return R_global_data*D3vector ( x,y,z);
......@@ -290,15 +282,6 @@ D3vector transform_right_lens_diag_SW_quad ( double t1, double t2, double* point
double sign = (curvatureRight_global_data > 0) ? 1 : ((curvatureRight_global_data < 0) ? -1 : 0) ;
double z = offsetZ_global_data+
sign*(-1*( sqrt(pow(curvatureRight_global_data,2)-
((x+actualX)*(x+actualX)+(y+actualY)*(y+actualY)) ) // pow(r_global_data * (1-t) + R_global_data * t,2)) //now direct with x²+y²
+sign *(-curvatureRight_global_data
+( (1-t)*z_left_inner_global_data //z_inner doesn't work anymore
+ t * z_left_outer_global_data))));
z = -z;
z = offsetZ_global_data+
sign*( ( sqrt(pow(curvatureRight_global_data,2)-
((x+actualX)*(x+actualX)+(y+actualY)*(y+actualY)))
+ sign*(-curvatureRight_global_data +( (1-t)*(thickness_global_data-z_right_inner_global_data) + t * (thickness_global_data-z_right_outer_global_data)))));
......@@ -420,6 +403,55 @@ D3vector transform_left_lens_diag_NE_quad ( double t1, double t2, double* pointe
return R_global_data*D3vector ( x,y,z);
}
D3vector transform_inner_quad_NE( double t1, double t2, double* pointer_global_data) {
double R_global_data = pointer_global_data[0];
double r_global_data = pointer_global_data[1];
double curvatureLeft_global_data = pointer_global_data[2];
double curvatureRight_global_data = pointer_global_data[3];
double thickness_global_data = pointer_global_data[4];
double offsetZ_global_data = pointer_global_data[5];
double z_left_inner_global_data = pointer_global_data[6];
double z_left_outer_global_data = pointer_global_data[7];
double z_right_inner_global_data = pointer_global_data[8];
double z_right_outer_global_data = pointer_global_data[9];
double temp = t1;
t1 = t2;
t2 = temp;
double t = t2;
double x = ( sin ( t1*0.5*M_PI )-t1);
x = x*t2;
double y = (cos ( t1*0.5*M_PI )- ( 1-t1 )) ;
y = y*t2;
double actualX = 0 + r_global_data * t1 + 0 * t2 + (R_global_data-r_global_data) * t1 * t2;
double actualY = r_global_data - r_global_data * t1 + (R_global_data-r_global_data) * t2 - (R_global_data-r_global_data) * t1 * t2;
double sign = (curvatureRight_global_data > 0) ? 1 : ((curvatureRight_global_data < 0) ? -1 : 0) ;
double radiusSquared = r_global_data + t2 * (R_global_data-r_global_data);
FALSCHE LOL
double z = offsetZ_global_data+
sign*( ( sqrt(pow(curvatureRight_global_data,2)-
radiusSquared)
+ sign*(-curvatureRight_global_data +( (1-t)*(thickness_global_data-z_right_inner_global_data) + t * (thickness_global_data-z_right_outer_global_data)))));
if (( t1 == 0 && t2 == 0)||( t1 == 1 && t2 == 0)||( t1 == 0 && t2 == 1)||( t1 == 1 && t2 == 1))
{
if ( fabs(x) > 1e-10 || fabs(y) > 1e-10 || fabs(z) > 1e-10)
{
cout << "stop "<<endl;
}
}
return D3vector ( 0 ,0 ,z);
}
D3vector transform_right_lens_diag_NE_quad ( double t1, double t2, double* pointer_global_data) {
double R_global_data = pointer_global_data[0];
double r_global_data = pointer_global_data[1];
......@@ -961,7 +993,7 @@ LensQuadrangle::LensQuadrangle(double Radius, double radius, double thickness, d
//inner block: corner ids: 0 2 4 6 8 10 12 14
Set_transformation_face(0,2,4,6,transform_left_lens_inner_quad); // z=0 plane
Set_transformation_face(0,2,8,10,transform_quadrangle_NULL);
Set_transformation_face(0,2,8,10,transform_inner_quad_NE); //transform_inner_quad_NE transform_inner_quad_NW transform_inner_quad_SW transform_inner_quad_SE
Set_transformation_face(2,4,10,12,transform_quadrangle_NULL);
Set_transformation_face(4,6,12,14,transform_quadrangle_NULL);
Set_transformation_face(0,6,8,14,transform_quadrangle_NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment