PAN, ZOOM, ROTATE CENTER, WIDTH, AND HEIGHT RELATIONSHIPS

By normalizing a layer to the screen via a choice of scale, a relationship between the screen and the layer is established. This affects the functions of pan, zoom, rotate center and as well as a layer’s width and height. Knowing the relationship means more effective use of the program, taking out some of the guesswork of presenting images to best effect. It is important to understand that ProShow/Photopia works using percents as a reference point for many of its functions. I will discuss each function mentioned above in turn.

Position (Pan)
Scaling normalizes a layer to the screen by establishing a known relationship between the two. That relationship has to do with the size along at least one axis for both the layer and screen. By normalizing the layer, it establishes that at least one axis has the same size as corresponding screen axis and the other axis is proportionally sized. Therefore, when a layer is repositioned, it has actually moved a percent of the distance from screen center to a screen side. Therefore, Pan actually represents an offset from the layer’s center’s from the screen’s center. So, for example, if the layer is moved to a pan of 20,30 (pan-x=20 and pan-y=30), it has been offset to the right of screen center (along the x-axis) by 20% and down (along the y-axis) by 30%.

Size (Zoom). A layer starts its existence at 100% zoom (a normalization process by-product). The Zoom function adjusts a layer’s size that was established during normalization. Therefore, if a layer has a zoom of 50, it has a size that is one-half of its default size. Unless the layer has the same aspect as the show, a fit to frame scaled layer has a different width and/or height when using the fill frame scale.

People have long wondered why their really small images were not imported at their actual size and why their really large images actually fit on the screen. They were unaware of what scaling was doing to their images. Most users simply used the default scale value (usually the setting of Fit to Frame), never changed it, and never gave it a second thought.

Rotate Center
Default Rotate Center. A layer’s rotate center is a point around which the layer rotates (or tilts). ProShow/Photopia allows the user to enter any rotate center value desired. It is worthy to note that the functions of rotate, vertical tilt, and horizontal tilt, are all a form of rotation. However, each rotates around a different axis. The feature known as rotate, which has existed since the program’s beginnings, represents a layer rotating around a Z-axis (which extends into and out of the screen and perpendicular to the screens plane). The tilt functions are representative of a rotation around the X-axis (for vertical tilt) or the Y-axis (for horizontal tilt).

Through ProShow Version 3, a layer only rotated about its center. Beginning with ProShow Version 4 (including all versions of Photopia), that is no longer the case. While entering a rotate center value is very easy, selecting a specific rotation point relative to the screen is not. The value is layer-centric — that is, relative to the layer itself. No matter how large or small the layer is or where it is positioned, a rotate center of 50,50 (for example) is always the layer’s lower right corner. If the Rotate Center chosen is not a layer’s corner or side, it is left to the user to figure out where on the screen it is actually located.

The layer-centric rotate center varies with the layer’s perception of its distance from screen center. The smaller a layer becomes, the further from screen center it thinks it is. Therefore, the smaller the layer gets, the rotate center value required to rotate around screen center gets larger. For instance, select a layer that has the same aspect as the screen.  Placed the layer at pan = -50 and give it a zoom of 100. Give it a rotate center of 50 to keep it at screen center.  The layer sees its layer center as being on the left screen edge. Reduce zoom to 50. The rotate center stays at 50 but the layer’s left side is now located halfway between the screen center and the left screen side. To place the rotate center back to screen center, change its value to 100.

That establishes a relationship we can use. We now know that rotate center and zoom are inversely related. Pan remained unchanged. So, we can safely assume a direct relationship between rotate center and pan. Pan represents an offset from screen center. Therefore, the layer-centric Rotate Center must represent an offset from layer center which is an offset from screen center. So, the default Rotate Center represents a layers relative distance to screen center. Therefore, we can ascertain the following relationships between pan, zoom, and rotate center:

R = 100P/Z  Equation 1

where the values of P refers to the Pan value, Z refers to the Zoom value, and R refers to the Rotate Center. Note that the zoom value is being converted from a percent value to a decimal representation. In ProShow/Photopia, the value of Zoom is a percent which means per 100. For these equations, we need to convert the per 100 value to a decimal value by dividing it by 100.

User Defined Rotate Center Using an Effective Pan. To use of an arbitrary screen location around which to rotate a layer, we need to make some adjustments to Equation 1 so that the result is also not related to the screen center. We need to replace the default Equation 1 Pan with an Effective Pan. The solution is to subtract the layer’s actual location from the screen location values around which the layer will rotate. Since this is the basic idea, when it is applied to a screen axis, we need to use axis specific values. So, the layer’s pan-x is subtracted from the screen-x value and the layer’s pan-y is subtracted from the screen’s y value. The basic Effective Pan, Pe, is defined as

Pe = S – P   Equation 2

where S represents the screen location and P represents the layers’ pan settings.

Rotate Center Description
Figure 4 Rotate Center Description

So, assume we want to rotate a layer (which has the same aspect as the screen) around a screen location of 35,-20, is positioned at -20,0 and has a zoom of 100%. Our effective pan-x becomes 35 – (-20) = 55. Our rotate center-x is then calculated as (55/100)100 = 55/1 = 55. For the rotate center-y value, the effective pan-y is Pey = -20 – 0 = -20. The Rotate Center-y is then calculated as (-20/100)100 = -20/1 = -20. So, our rotate center is 55,-20.

When the layer aspect is different from the screen’s, the unnormalized axis values vary according to the ratio of the screen aspect divided by the layer aspect. That is, a percent. I refer to this as a correction factor (F) which is represented by the following equation:

F =  (Sx/Sy)/(Lx/Ly)          Equation 3

where Sx and Sy refer to the show’s X and Y axes; Lx and Ly refer to the layer’s X and Y axes.

So, rotate center varies with changes to a layer’s size, aspect, and/or position. When the layer has the same aspect as the screen, the correction factor value reduces to 1, thereby simplifying calculations. Refer to the ProShow/Photopia Equations for the relationships between pan, zoom, rotate center, show aspect, and the layer aspect. Refer to Figure 4 to help explain Effective Pan defined in Equation 2. Pex is a layer’s effective Pan-X value and Pey is the layer’s effective Pan-Y value. An arbitrary rotate center value uses the Effective Pan value  The location of the layer (point A) and the location of the arbitrary rotate center (point C) are the positions in which we are interested. Replace Pan with Effective Pan in the ProShow/Photopia Equations. This arbitrary rotate center technique makes it easy to calculate a rotate center used by multiple layers.

When Photodex provided the ability to rotate a layer around other than the layer’s center, rotating the layer at other than a layer’s side or corner was apparently never really considered. So, Photodex never provided the user with a feature to easily select an arbitrary, user selected rotate center. To date, Photopia’s Director and Creator do not do so either. Yes, it is possible to select a rotate center anywhere on the screen. However, it is difficult to select a specific rotation point without doing some significant calculations. Change the layer’s position, aspect, or size and your rotate center is no longer valid. Returning to that original rotate center is very difficult if you have no idea how Rotate Center is calculated. That nugget of information is left to the user to determine. Most people have no idea what defines rotate center – they simply want to use it. However, the current implementation limits Rotate Center’s effectiveness to simple situations only.

Until I discovered the relationship between pan, zoom, rotate center, and the screen and layer aspects, nobody outside of Photodex realized any rotate center relationships with existed at all. This legacy approach is maintained by Photopia. Not knowing relationships makes it rather difficult to make effective use of rotate center’s functionality.

Refer to Figure 4 and use the following LAYER assumptions: it has a 3:2 aspect, has a zoom of 35%, has a pan of -25, -15, and uses the Fill Frame scale. The arbitrary rotate center location is 20,-35.  In this case, F is no longer 1 since the layer has a different aspect than the show and is calculated as (16/9)/(3:2) = 1.18519. The relevant equation for Rotate Center-X is 100Pex/Zx. Its value is calculated as 100(20-(-25))/35 = 128.57. The Rotate Center-Y equation is 100(Pey/Zy)/F. It is calculated as 100((-35-(-15))/35)/((16/9)/(3/2)) = -48.21. So, the Rotate Center values are 128.57,-48.21.

WIDTH AND HEIGHT DISCUSSION
Pan, Zoom and Rotate Center are all inter-dependent. Knowing two of these values allows you to calculate the third value. So, for instance, let us assume you wanted to know a layer’s width but you only have the pan and rotate center values. You know that rotate center equals pan (or effective pan) times 100 divided by zoom or:

R = 100P/Z   Equation 4

Doing some rearranging and solving for zoom, we get the following equation:

Z=100P/R   Equation 5

Where R=Rotate Center, P=Pan, Z=Zoom, and W=Width. So, if W=Z (width equals the zoom value) then we also know that W=P/R (width equals the value of pan divided by rotate center). The same relationship exists for the calculation of height (H). Substitute the value H or W for the value Z in the equation being used.

Refer to the ProShow/Photopia Equations page for all of the equations associated with the scales used by ProShow for width and height. This is important for those situations where the layer’s aspect is not the same as the show’s aspect.

Knowing these equations is useful when we need to backtrack some of the work we may have done. All releases of ProShow through Version 6 have had decimal values of zoom represented as whole numbers in the zoom value box. Why this is so is anyone’s guess. But it makes things a bit more difficult for us when we try to figure out what non-whole number value of zoom value we actually used. With Photopia, a decimal value of zoom is often displayed.

When the pan and rotate center values are known we can calculate the actual zoom value we used on our layer. Or, we could calculate it from our layer’s width or height, if we (for some reason) knew what each of them were. The ProShow/Photopia Equations show all of the relationships. This can be useful in any number of situations.

131213-1215 © Copyright 2013-2020 Dale Fenimore All Rights Reserved
1402020-0730, 140525-0825, 200706

5 thoughts on “PAN, ZOOM, ROTATE CENTER, WIDTH, AND HEIGHT RELATIONSHIPS”

  1. I have written to you once or twice before concerning layer placement when the photo is a different aspect than the show, and you and your equations have been enormously helpful. Perhaps you can help me further. My pictures have a 3/2 aspect, the show is 16/9. I am using Fill Frame. Say the zoom is 50%. I wish to place the layer exactly in the bottom left corner of the frame. The horizontal pan works perfectly at 25. Vertical Pan I calculate at 25(.84375) = 21.09, .84375 being the show aspect divided by the layer aspect. This has worked perfectly for me for many months, until yesterday. The placement (vertically) now is close, though hardly exact. Photodex was not helpful, I’m wondering if maybe you have an idea of what’s not quite right. I appreciate any advice.
    -Andy Denning

    Like

    1. Your image is probably NOT exactly 3:2, but close. So, the height or the width may vary from what you may expect … not by much but enough to make things hinky now and then. For simplicity, you’ll want to crop it to 3:2 in ProShow. Basically, you need to know the width and height. The freebie worksheet below can provide that info as necessary. At F2F, the layer width is 100% of the show width at 100% zoom. At 50% that’s 50. The layer center placed at 25 will then place the layer right edge at the show right edge … since there is 25% of the layer on either side of the layer center. If the layer is still at vertical center, the bottom edge of the layer is situated at 21.09. So, since 50 – 21.09 = 28.91, to gget the layer lower edge aligned against the screen’s lower edge, you will need to use a pan-y of 28.91. For the left corner, the pan values would be -25, 28.91. For upper right, that would be 25,-28.91. The key is remembering the screen coordinates (50% on any side of screen center) and the layer’s height and width given for the given scale and zoom. Then it’s a relatively simple case of add or subtract to get the info you need to do what you want to do. Hope that helps.

      The basic worksheet Link:
      http://fenimorephotovideos.com/freebies.html

      Like

  2. I’ve spent some time working with your rotation center equations and have had very encouraging success with the math. I wanted to thank you for making your findings available to me. It was quite a thrill to have several layers sharing a single rotation point, having them move in such lockstep.
    -Andy Denning

    Like

    1. THANX! I’m glad things are working for you. When I discovered the relationships between the various functions, that was a major (and very unexpected) surprise. Each of the discoveries that followed were a thrill: discovering what was previously unknown. Not knowing what you aren’t supposed to know about (or be able to do with) the program, necessity is the mother of invention. It’s a real and satisfying thrill to make a discovery.

      Keep on Keepin’ on! There’s a lot of hidden capability in ProShow … it’s just that Photodex hasn’t provided the architecture yet. What’s interesting too, is that some of these capabilities are hidden in plain sight (like the capability that exists with the rotate center function). To take advantage, you just have to figure it out.

      Like

Leave a comment