rotation

Why won't my iPad app project "start" in landscape mode out of the box?

This is a weird question inasmuch as I've definitely had projects that work fine, possibly because I've been doing something differently. But now I'm confounded. I create a new View-based iPad app with Xcode (3.2.3 fwiw). This gets me a default view controller with a default view which gets unarchived and displayed at startup. When I ...

Rotating a bitmap using matrix.

While rotating a bitmap using matrix, vertex is not stable.. Matrix matrix = new Matrix(); matrix.postRotate(mDegree,100,100); mCompasstemp = Bitmap.createBitmap(mCompPic, 0, 0, mCompPic.getWidth(), mCompPic.getHeight(), matrix, true); mCompassHud.setImageBitmap(mCompasstemp); Output of my code is like -bitmap will r...

OpenGL ES: Rotating 3d model around itself

Hi, I'm playing with OpenGL ES on iPhone and I'm trying to rotate a model by panning with the finger. I discovered the open source app Molecules that let's you do that and I'm looking at that code, but when it comes to rotate a model of mine I'm able to rotate it only around a point distant in the space (like it was in orbit as a satelli...

Creating a Swingometer on the iPhone using Core-Animation

Hi there, I'm trying to create a swingometer, a bit like the ones used in golf games, where the user holds a button to start a swing, releases at the apex to determine power, at which point the 'swing' reverses direction, and the user taps again on the way down to set the accuracy. Rather than having a bar that fills up, I would like ...

Sorting a two-dimensional toroidal array with rotations and swaps

I tried thinking of an algorithm, but couldn't do it. Here is the problem: There are 16 elements, grouped by four types (a, b, c and d). We also have four groups, A, B, C and D. In the initial state, the four groups have four random elements each, eg.: A: c, c, a, d B: b, b, a, a C: b, b, c, c D: d, d, d, a The order of elements in ...

jQuery UI - Resizable - with transform-rotation

Hi there, I have an issue with jQuery UI and the resize function. When my div have a CSS rotation (-moz-transform), the resize is strange, when i drag a border it move both side and not only one. Don't know if you understand ? And idee ? I'll make an example later. Regards, Maïs ...

How to do correct polygon rotation? ( in C# though it applies to anything )

Hi I'm using this C# code to rotate polygons in my app - they do rotate but also get skewed along the way which is not what i want to happen. All the polygons are rectangles with four corners defined as 2D Vectors, public Polygon GetRotated(float radians) { Vector origin = this.Center; Polygon ret = new Polygon(...

UINavigationController: Rotating the view of a covered controller

I have UINavigationController with two view controllers in it (C1 covered by C2). At some point the device is rotated. C2 needs to know the size of one of C1's views (C2 is a map for C1's grid and I need to draw the frame in C2's view). The bounds of C1 are updated when C1 is popped, but I need to get the updated bounds at the time of ...

Force clockwise/anticlockwise rotation for a CABasicAnimation of a UIImageView

I'm animating a pendulum which swings from 0 degrees to max 200 degrees and then back again. The problem is that if the pendulum goes over 180 degrees, it returns to 0 by the shortest route which is to continue clockwise. And I'd like it to go anticlockwise. Here's my code: ('right' is a boolean which is TRUE when the pendulum is swingin...

Rotation Not Working As I Want

Hi guys , I have the following class that rotates an image when i give it the degrees it has to rotate but it is not working as i want. The problem is this, for instance if i rotate 90 degress, the variable "currentRotationAngle" inside the rotateCrossing() is gradually set to 90 after the rotation. This happens because i increase that ...

Interpolating angles

I am trying to do a rotation of a game object by setting a start and end point and X frames to do the movement. Then interpolate start and end angle to get it done. It works well, but I am trying to do the shortest possible route as an option (as opposed to "do the longest route"). In most cases it works, but if the rotation goes above...

Rotate along Z- axis in HTML5 - Flip card

Hi All, I just came across a simple flash animation on flip card The Playing Card Effect The card has 2 images "front" image and "back" image, when clicked the card toggles with rotating along Z axis showing the front and back face accordingly. Can the same effect be achieved using HTML5 / Canvas / CSS3 ?? PS: I'm complete newbie/noob...

Need Help Animating In A Grid

Hi Guys, i really need you guys your help. I have to do animation on a 3 X 3 grid of images. My questions are : 1) How do i construct the 3 X 3 grid with the images.? This is what i did but is not working because because i get nullpointerException in this line : rail[x][y] = new JLabel(icon); import java.awt.Component; import java....

Positioning Objects Based On Row And Column Values

Hi Guys, I have a 3 X 3 grid of JLabels of images. I constructed the grid using the grid layout. I would like to move a round object which represents a car and place that object in a particular cell. So the grid will be like a background. My questions are these: 1) How can i position this object on a specific cell based on the rows a...

How to un-rectify an image in matlab?

Hi, I have rectified a pair of images (applying a rotation matrix (R) to them and then projecting it to the camera image plane), done with Fusiello method/code: (http://profs.sci.univr.it/~fusiello/demo/rect/) How can I un-rectify the image? Meaning inverse the rotation and re-project it. It would be useful, because the rectified image...

Rotating An Image In A Cell

Hi Guys, I have a 3 X 3 grid of JLabels of Images. I would like to rotate the the label in [2][2]. I know how to do rotation. my question is what should i do to be able to rotate that cell. Do i have to convert that cell into an image object or is it possible to rotate the label just like that? Thanks for your answer. EDIT import ja...

How to achieve smooth animation when using single-step rotation / How do I get the new frame size at the start of rotation?

Hi all, I'm trying to switch from two-stage rotation to one-stage rotation (to avoid the console warning, and because Apple recommend doing so because one-stage is faster). However I can't figure out how to get the new size of my view (taking into account the navigation bar, status bar, etc) early enough to perform the update of my UI ...

Some views not rotating when used with UITabBarController

I've got a UITabBarController whose view is rooted to a UIWindow. The first three view controllers are derived from base class A (which inherits UIViewController). The latter two view controllers are derived base class B (which inherits UITableViewController) for 5 view controllers total. The first three view controllers will not rota...

How to resize UIScrollView on rotation?

For my project I've created an UIScrollView with an UIImage inside. The Scroll View is as big as the window frame (tab bar application). What I want is to resize the UIScrollView again when the user rotates the device. How can I do that? ...

Nested UIViewController does not respond to device rotation.

Hello, I'm developing an app using a fork of LeavesViewController that changes to a two-page orientation when the device turns to landscape. When using the Leaves controller alone, everything works fine. When using the Leaves controller inside the view of my main UIViewController, it never gets any of the device rotation messages (how...