GeometryCollective / boundary-first-flattening

MIT License
768 stars 96 forks source link

What function actually computes the UV coordinates? #22

Closed lukkio88 closed 5 years ago

lukkio88 commented 6 years ago

Hi, I find your technique interesting and I'd like to understand a bit better your code. Can you please point out the specific source file and if possible the specific function that actually perform the UV construction?

Regards

rohan-sawhney commented 6 years ago

There are a couple of functions that compute UV coordinates - here's one of them: https://github.com/GeometryCollective/boundary-first-flattening/blob/23d8448a817f5175ebffd79f233076444b3a8d5e/project/include/Bff.h#L19 It might be a little difficult to understand what's happening by just looking at the source code, this website contains a link to the paper and talks that explain how BFF works: https://geometrycollective.github.io/boundary-first-flattening/

lukkio88 commented 6 years ago

I read your paper (beautiful work by the way, thumbs up!). I just want to get an insight about some implementation details, if you could also point out the actual dependencies necessary to make your algorithm work. For example I assume everything GUI related isn't necessary, do you make use of the glm library for some of the math involved or do you solely rely on the LABLAS library?

rohan-sawhney commented 6 years ago

Thanks! The two main dependencies are a mesh data structure and a linear algebra package. For this codebase, I rolled out my own mesh class and wrapped SuiteSparse & BLAS for linear algebra. It shouldn't be too difficult to replace these dependencies for your own (e.g. open mesh, eigen etc) without major changes to Bff.cpp. I plan to separate the algorithm and GUI into their own separate libraries and build a command line tool for the next version.

lukkio88 commented 6 years ago

It's ok I already had a look at some of your source code. I prefer if it is self-contained, it's easier to build probably. But just to summarize the main sources are in the folders linear-algebra, mesh and project, is this all I need to build a wrapper that eventually runs your algorithm?

rohan-sawhney commented 6 years ago

Yes, thats correct

lukkio88 commented 6 years ago

Hi again, out of curiosity what is the class Spline.h for? in your viewer folder, is it just for visualization purpose? Or is it used throughout the algorithm?