~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/geomstat/geom/gstat_ln2.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2 **/
  3 #include <tina/sys.h>
  4 #include <tina/math.h>
  5 #include <tina/mathfuncs.h>
  6 #include <tina/vision.h>
  7 #include <tina/visionfuncs.h>
  8 
  9 Basis2 *line2_basis(Line2 * line)
 10 {
 11     Basis2 *b;
 12     Basis2 *basis2_alloc();
 13 
 14     b = basis2_alloc();
 15     vec2_basis(line->v, &b->ex, &b->ey);
 16     return (b);
 17 }
 18 
 19 void    line2_correct(Line2 * line, Basis2 * basis, Vector * x)
 20 {
 21     Vec2    up = {Vec2_id};
 22     double  x0 = vector_getf(x, 0);
 23     double  x1 = vector_getf(x, 1);
 24 
 25     line->p = vec2_sum(line->p, vec2_times(x0, basis->ex));
 26     up = vec2_sum(basis->ey, vec2_times(x1, basis->ex));
 27     vec2_basis(up, &basis->ex, &basis->ey);
 28 
 29     line->v = basis->ex;
 30     line->p1 = vec2_proj_on_line(line->p1, line->p, line->v);
 31     line->p2 = vec2_proj_on_line(line->p2, line->p, line->v);
 32 }
 33 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.