kaanaksit / odak

Scientific computing library for optics, computer graphics and visual perception.
https://kaanaksit.com/odak
Mozilla Public License 2.0
176 stars 52 forks source link

Fix bug in 'intersect_w_triangle_batch' #95

Closed yaio4109 closed 5 months ago

yaio4109 commented 8 months ago

Make the function return the correct number of intersection points between the triangle and the ray.

yaio4109 commented 8 months ago

Adding more ray generating methods in raytracing module

yaio4109 commented 8 months ago

when testing function create_ray_from_grid_w_luminous_angle, but the Pytest failed the test. Becuase function rotate_points use different datatype in odak/learn/tools/transformation.py (ndarray) and odak/tools/transformation.py (tensor).

If you guys want to switch all the code with torch, I can help🫡.

kaanaksit commented 8 months ago

Thank you, @yaio4109 , for your continued support.

I am happy to incorporate these in the repository:

However, these need revision in order to merge your code in the repository:

Unfortunately, these create an issue. odak is designed to be a development platform but it is also an educational platform where a graduate student can read its code to develop their basic understanding on the matter both on old school Pythonic computations with Numpy and modern Pythonic computations with torch on the GPUs. Simply, put, we use Numpy when it is under odak and we use Torch when it is under odak.learn. I am unsure how to resolve this issue at this point and this is one of the reasons why I didn't merge this pull request.

yaio4109 commented 5 months ago

@kaanaksit, Sorry for late revision. I recall the original python code with numpy in raytracing module and move the function with torch into learn module.

kaanaksit commented 5 months ago

There were too many commits and I wanted to make sure that I have followed your updates as I merge it in the repository. Along the way, I had to delete the history and merge all your commits into a single commit to see what has really changed. The current version in the repository contains all your updates.

Thank you for your valuable contributions to odak! I would be happy to meet you if you have some availability for me. Please reach out to me using kaanaksit@kaanaksit.com. Thanks!