Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is Eq. (2) - (6) in the paper defined in the code? #67

Open
bchao1 opened this issue Jul 3, 2024 · 1 comment
Open

Where is Eq. (2) - (6) in the paper defined in the code? #67

bchao1 opened this issue Jul 3, 2024 · 1 comment

Comments

@bchao1
Copy link

bchao1 commented Jul 3, 2024

No description provided.

@niujinshuchong
Copy link
Member

Hi, they are in the old version of code. You can find it here:

// transform camera center and ray to gaussian's local coordinate system
// current center is zero
float3 cam_pos_local = {view2gaussian_j[12], view2gaussian_j[13], view2gaussian_j[14]};
float3 ray_local = transformPoint4x3_without_t(ray_point, view2gaussian_j);
// scale the ray_local and cam_pos_local
double3 ray_local_scaled = { ray_local.x / scale_j.x, ray_local.y / scale_j.y, ray_local.z / scale_j.z };
double3 cam_pos_local_scaled = { cam_pos_local.x / scale_j.x, cam_pos_local.y / scale_j.y, cam_pos_local.z / scale_j.z };
// compute the minimal value
// use AA, BB, CC so that the name is unique
double AA = ray_local_scaled.x * ray_local_scaled.x + ray_local_scaled.y * ray_local_scaled.y + ray_local_scaled.z * ray_local_scaled.z;
double BB = 2 * (ray_local_scaled.x * cam_pos_local_scaled.x + ray_local_scaled.y * cam_pos_local_scaled.y + ray_local_scaled.z * cam_pos_local_scaled.z);
double CC = cam_pos_local_scaled.x * cam_pos_local_scaled.x + cam_pos_local_scaled.y * cam_pos_local_scaled.y + cam_pos_local_scaled.z * cam_pos_local_scaled.z;
.

But there are redundant computations so we merge it for efficiency. You can check here #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants