Monday, October 31, 2016

FAQ for Cross-Parameterization

1.    The program crashed, why?
Ans: This is a research program, so I am sorry that it is not problem-free and it doesn't handle all the error well. Therefore, it will be great that if you screen capture the problem and send me an email with the data you are using, then I will check and let you know how to resolve it.
However, there is a common error in the inputs. The input models must be manifold, watertight, having same topology, and preferably free from degenerated and intersecting facets. Generally, my suggestion is to load the mesh into ReMESH (http://remesh.sourceforge.net/) to check for any geometric problems of your model. For example, I let ReMESH to fix the geometry problems at the time opening the model, remove the small shells, and close the holes, so that the model only has 1 shell and 0 boundary or genus. Although there are degenerated and intersecting facets (suggest to remove them as well in practice), cross-para can be run successfully.

2.  How to place the feature points?
Ans: As mentioned in my papers, the feature points are used to construct the Voronoi diagram and build the base domain by tracing shortest paths. Therefore, they are preferred to be specified as uniform as possible, although this is not a necessary requirement. Particularly for the cylindrical shapes, which is quite ambiguous for path tracing, it is suggested that at least 2 or 3 feature points are specified along a circle to resolve the ambiguity. However, how to update the feature points to improve the mapping quality is case-by-case. It will be better that if you screen capture the problems or send me the files with a description telling where I should look at, then I can give you more specific advises. I am also working on a new method to place the feature points automatically, please stay tuned.

Friday, May 15, 2015

Customized Batch for LEd

LEd Pre-Config.rar: User1 is the customized batch for compiling pdf through tex->dvi->ps->pdf. It runs bibtex also, and it cleans the output files at the end.

Preparing Chinese in LaTeX

\usepackage{CJKutf8}

\begin{CJK}{UTF8}{bsmi}
中文
\input{ChinesePage}
\end{CJK}

You may need a UTF8 text editor to edit Chinese. LEd cannot do it, but you may use other text editor (e.g., notepad++) to edit Chinese, and then use \input{} to include the words.
Use gbsn instead of bsmi for simplified Chinese.

Determine the class of an object at run time

For simplicity, in order to check the class of an derived object is the class I want by a parent object, we can use the code like this:

#include <typeinfo>
if (!strcmp(typeid(*obj).name(), "class MyClass")) printf("It is MyClass!\n");

more details on typeid Reference

error MSB8031: Building an MFC project for a non-Unicode character set is deprecated. You must change the project property to Unicode or download an additional library.

It dues to the MFC support for multi-byte character set (MBCS) is deprecated in Visual Studio 2013, and it can be solved by installing the Multibyte MFC Library for Visual Studio 2013 in
http://www.microsoft.com/en-us/download/confirmation.aspx?id=40770

more details on Visual C++ Team Blog

fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt.

This error appear because you have installed higher version of Visual C++ while compiling a lower version (e.g., VC2010).
One easy way to solve this problem (for VC2010) is to rename C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe

more details on howtofix

Get today date in dd/mm/yyyy

#include <time.h>

time_t now = time( &now ) ;
struct tm* local_time = new tm( ) ;
local_time = localtime( &now ) ;
char buffer[20] = { '\0' } ;
strftime( buffer, BUFSIZ, "%d/%m/%Y", local_time ) ;
delete local_time;

more details on strftime Reference