Subversion Repositories gelsvn

Rev

Rev 406 | Rev 412 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 406 Rev 411
Line 429... Line 429...
429
}
429
}
430
 
430
 
431
 
431
 
432
char* console_partial_reconstruct(std::vector<std::string> &args)
432
char* console_partial_reconstruct(std::vector<std::string> &args)
433
{
433
{
434
	if(wantshelp(args)) 
434
  if(args.size() != 3)
435
	{
-
 
436
		theConsole.Printf("usage: haramonics.partial_reconstruct <e0> <e1> <s>");
435
		theConsole.Printf("usage: haramonics.partial_reconstruct <e0> <e1> <s>");
-
 
436
 
-
 
437
  if(wantshelp(args)) 
-
 
438
	{
437
		theConsole.Printf("Reconstruct from projections onto eigenvectors. The two first arguments indicate");
439
		theConsole.Printf("Reconstruct from projections onto eigenvectors. The two first arguments indicate");
438
		theConsole.Printf("the eigenvector interval that we reconstruct from. The last argument is the ");
440
		theConsole.Printf("the eigenvector interval that we reconstruct from. The last argument is the ");
439
		theConsole.Printf("scaling factor. Thus, for a vertex, v, the formula for computing the position, p, is:");
441
		theConsole.Printf("scaling factor. Thus, for a vertex, v, the formula for computing the position, p, is:");
440
		theConsole.Printf("for (i=e0; i<=e1;++i) p += proj[i] * Q[i][v] * s;");
442
		theConsole.Printf("for (i=e0; i<=e1;++i) p += proj[i] * Q[i][v] * s;");
441
		theConsole.Printf("where proj[i] is the 3D vector containing the x, y, and z projections of the mesh onto");
443
		theConsole.Printf("where proj[i] is the 3D vector containing the x, y, and z projections of the mesh onto");
442
		theConsole.Printf("eigenvector i. Q[i][v] is the v'th coordinate of the i'th eigenvector.");
444
		theConsole.Printf("eigenvector i. Q[i][v] is the v'th coordinate of the i'th eigenvector.");
443
		theConsole.Printf("Note that if vertex coordinates are not first reset, the result is probably unexpected.");
445
		theConsole.Printf("Note that if vertex coordinates are not first reset, the result is probably unexpected.");
444
		return "";
-
 
445
	}
446
	}
-
 
447
 
-
 
448
  if(args.size() != 3)
-
 
449
		return "";
-
 
450
 
446
	int E0,E1;
451
  int E0,E1;
447
	float scale;
452
	float scale;
448
	istringstream a0(args[0]);
453
	istringstream a0(args[0]);
449
	a0 >> E0;
454
	a0 >> E0;
450
	istringstream a1(args[1]);
455
	istringstream a1(args[1]);
451
	a1 >> E1;
456
	a1 >> E1;