• Post Reply Bookmark Topic Watch Topic
  • New Topic

Scaling and Rounding error  RSS feed

 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I hava GUI (java applet) where I draw a map .
The rectangular area is divided in to tiny rectangular boxes with 1 pixel space in between them. the co ordinates of each rectangle is calculated via a recursive function which does the job.
When the GUI window is resized ie increased or decreased (but there is a minimum size) I have to scale the co ordiantes of each of the rectangle .I don't want to recalcualte them becasue the position of the ploted areas will be completley changed, I want to do it by keeping the 1 pixel space between them.
but I am facing a lot of rounding error problems in the scaling and my map looks too acward somtimes.

I think this problem can be visualized as a mathametical problem and can be a theoritical solution.
is there any mathematical gurus.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!