 Timestamp:
 May 27, 2009, 7:04:35 AM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libpipi/trunk/examples/img2twit.cpp
r3529 r3530 493 493 *r = int2midrange(pt % RANGE_B, RANGE_B); pt /= RANGE_B; 494 494 } 495 }496 497 static inline float clip(float x, int modulo)498 {499 float mul = (float)modulo + 0.9999;500 int round = (int)(x * mul);501 return (float)round / (float)modulo;502 495 } 503 496 … … 664 657 for(x = rx; x < rx + rw; x++) 665 658 { 666 K::Point_2 m((float)x * dw * RANGE_X / p>w + dw * RANGE_X, 667 (float)y * dh * RANGE_Y / p>h + dh * RANGE_Y); 659 float myx = (float)x * dw * RANGE_X / p>w; 660 float myy = (float)y * dh * RANGE_Y / p>h; 661 662 K::Point_2 m(myx + dw * RANGE_X, myy + dh * RANGE_Y); 668 663 Point_coordinate_vector coords; 669 664 CGAL::Triple< … … 696 691 //float k = (*it).second * (0.60f + fs); 697 692 //float k = pow((*it).second, (1.0f + fs)); 693 694 // Try to attenuate peak artifacts 695 //k /= (0.1 * (RANGE_X * RANGE_X + RANGE_Y * RANGE_Y) 696 // + (myx  fx) * (myx  fx) + (myy  fy) * (myy  fy)); 697 698 // Cute circles 699 //k = 1.0 / (0.015 * (RANGE_X * RANGE_X + RANGE_Y * RANGE_Y) 700 // + (myx  fx) * (myx  fx) + (myy  fy) * (myy  fy)); 698 701 699 702 r += k * fr;
Note: See TracChangeset
for help on using the changeset viewer.