Why is the relationship between FOV (Field of View) and radius in data rendering expressed using sin sin instead of tan tan?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.7k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
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]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read render_cond.py and the displayed Python/NumPy calculation first. Trace how FOV, radius, and canvas bounds are used, then compare the sine and tangent formulations against the reported rendered-image behavior. Done means documenting the geometric reason and correcting the formula if the repository confirms an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- computer-graphics
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100