Skip to content

Why is the relationship between FOV (Field of View) and radius in data rendering expressed using sin ⁡ sin instead of tan ⁡ tan? #242

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

Open
kangyiyang opened this issue Apr 15, 2025 · 0 comments

Comments

@kangyiyang
Copy link

kangyiyang commented Apr 15, 2025

Thank you for your efforts, but I have a question. In render_cond.py, why is the relationship between FOV (Field of View) and radius in data rendering expressed using sin instead of tan?
I tried using the tangent function, but I noticed that part of the rendered image extends beyond the canvas. Could you explain why this is happening? I believe the formula should represent the correct relationship with the tangent. If there is any mistake, I would appreciate your correction.

fov_min, fov_max = 10, 70
radius_min = np.sqrt(3) / 2 / np.sin(fov_max / 360 * np.pi)
radius_max = np.sqrt(3) / 2 / np.sin(fov_min / 360 * np.pi)
k_min = 1 / radius_max**2
k_max = 1 / radius_min**2
ks = np.random.uniform(k_min, k_max, (1000000,))
radius = [1 / np.sqrt(k) for k in ks]
fov = [2 * np.arcsin(np.sqrt(3) / 2 / r) for r in radius]
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

1 participant