logo       

Apparent Radius Preservation on Scale: msg#01033

Subject: Apparent Radius Preservation on Scale
In my star charts, I'm allowing users to make use of the Adobe SVG 
Viewer's built-in scaling facilities (Shift/Cntl-Shift-click, "Zoom 
In" and "Zoom Out" in the context menu). When the user sooms in, I 
want all my stars to spatially scale, but I want the apparent radius 
of the circles to remain visually the same.

I seemed to make sense to me to trap the SVGZoom event from the <svg> 
element, obtain the currentScale, and scream through the <circle> 
elements, resetting their "r" attributes to a new calculation based 
on the current scale factor.

I calculate the "r" attribute for a star as 15.0 minus the visual 
magnitude for that star. If the visual magnitude is 8.8, then the 
radius for the circle is set to 15.0 - 8.8, or 6.2. When I trap the 
zoom event, and find that the new scale factor is 2.0, it seems to me 
that I ought to be able to reset the star's radius to the same 
equation (15.0 - 8.8), but then divide it by the new scale factor. If 
the scale factor is 2.0, then I end up with (15.0 - 8.8) / 2, or 3.1. 
The radius gets set to exactly half of what it was at the original 
1.0 scale.

Now it seemed like that would work. The radiuses scale down as the 
view scales up, and vice versa. But it's not working. As I scale the 
view up, the radiuses get smaller, but they get too small. It almost 
seems as if my setting the new radiuses works independently of the 
current scale factor. According to my math, I should be seeing 
absolutely no change in the apparentr diameter of a star as I zoom 
into it, because I am mathematically working in opposition to the 
scaling. But it's not happening.

Am I thinking wrongly about this problem?

-Christopher




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
web.pylons.gene...    hurd.l4/2002-10...    kernel.commits....    user-groups.lin...    yellowdog.gener...    java.drools.use...    security.openva...    package-managem...    linux.debian.us...    qnx.openqnx.dev...    genealogy.gramp...    file-systems.if...    voip.wengophone...    tex.context/200...    ietf.smime/2003...    audio.csound.de...    culture.region....    xfree86.devel/2...    mobile.kannel.u...    distributed.con...    education.engli...    org.user-groups...    bug-tracking.gn...    recreation.bicy...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe