stla / cgalMeshes

R6 based utilities for 3D meshes.
12 stars 1 forks source link

Orthographic projections of 3D mesh along arbitrary directions #5

Open Rafael-Ayala opened 1 year ago

Rafael-Ayala commented 1 year ago

Hello,

Firstly, thanks a lot for this excellent package!

I am currently trying to get orthographic projections of 3D meshes along arbitrary directions in order to calculate the surface area as seen from different directions. I believe this would be possible to do with the CGAL library.

I am wondering if there is currently any way to do this from R with the operations you provide in this package? This would be extremely helpful!

Thanks a lot in advance

Best wishes,

Rafa

stla commented 1 year ago

Hello,

I didn't find in the CGAL documentation. Do you have a link?

Rafael-Ayala commented 1 year ago

Hello,

There is not a direct transformation for such projection I believe, but I think it can be obtained following the steps in this code example https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjChvTwyOL8AhVKCYgKHZqHCfoQFnoECBQQAQ&url=http%3A%2F%2Facg.cs.tau.ac.il%2Fcgal-arrangement-book%2Fexamples%2Fchapter-8%2Fpolyhedron_projection.cpp&usg=AOvVaw0L1J6sa_oskUyFQUG4h0dx

Is there any way to implement this from the functionalities exposed in cgalMeshes?

Thanks!

stla commented 1 year ago

It's surely not difficult to implement a projection with R but for the surface I don't know.

This link does not work.

Rafael-Ayala commented 1 year ago

My apologies, the correct link can be found at the end of this thread https://github.com/CGAL/cgal/discussions/6472 , the file called "polyhedron_projection.cpp". Once again, thank you so much for looking into this!