• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Scaling and Rounding error

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic