rotation

Table View rotate, but not properly (shape change)

Hello everyone, Here is the thing. I have a ViewController which contain a view in full window. And the program run in landscape mode. I want to put an UITableView over the full screen view but only on right half part of the screen. So I add a UITableView in my view controller, I used the Interface Builder in order to set the Table...

How to resolve this rotation problem?

Hey there For sure this is very trivial math stuff for some of you. But: When I rotate a view, lets say starting at 0 degrees and rotating forward 0.1, 1, 10, 100, 150, 160, 170, 179, 179,999, and keeping on rotating in the same direction, this happens, to say it loud and clear: BANG !!!! BAAAAAAAAANNNNNGGGG!!!! -179,9999, -170, -150,...

Flash AS3: How to gradually limit rotation of an object influenced by y position of mouse

Hi, I have created a flash app in which there is a circle with circles plotted along it's circumference, it is rotated when the mouse is moved up or down. The rotation is drawn directly from the y position of the mouse pointer. What I would like to do is grade the movement some how so that the further down the mouse pointer goes the les...

WPF Rotate 3D sphere to arbitratry position

If I have a sphere that is being rotate by the users mouse, how could I (at any time, say via a button) apply some rotation transformation on the Camera so that a specific spot on the Sphere is facing the User? Currently I'm implementing a trackball approach that moves the camera around when the user clicks and drags, and I would like t...

Resizing UINavigationBar on rotation

I have a subclass of UIViewController which handles a UIView. The viewcontroller is presented modally (it slides up from the bottom of the screen). At the top of the view, i have added a navigation bar. Note that this bar is not handled by a navigation controller. I want to get the navbar to shrink in height when the view rotates to lan...

Rotate around a specific point in Java3D

I'm importing 2 models in Java3D, scaling them down and then rotating one of them using a RotationInterpolator However, this rotates the object around the origin. I want to rotate the object around ITS centre, not the scene's. Put simply, I want it to spin in place. How do I rotate around a specific point? TransformGroup rotateThe...

How to rotate about the center of screen using quaternions in opengl?

I am trying implement arcball/trackball rotation but I have a problem with the center of rotation. I want the center to be the center of my screen no matter what. Let me explain what I have done so far. I've created a quaterion (rotation axis: vector_start x vector_end, angle: vector_start * vector_end) From that quaternion...

Chain of connected points and rotation matrices

Thanks for looking at this. I apologize for this rather lengthy build-up but I thought it is needed to clarify things. I have a chain of connected atoms, say a polymer which has rigid bonds and bond angles. With rigid bonds we get the condition that the distance between two immediate neighbours [eg. 2-3,3-4,etc.] is always fixed and the...

UITableView in UINavigationController gets under Navigation Bar after rotation

This is Portrait: This is Landscape I've tried this on rotation with no success: self.tableView.autoresizesSubviews = YES; self.tableView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; ...

UIScrollView won't autorotate

My app design requires the same scrolling functionality found in the iPhone's native Photos app when browsing photos in full screen. Specifically: Each view snaps into place as the view is swiped Scrolling happens in only one direction Rotating the iPhone rotates the entire scrolling region as well such that the frame of each subview (...

How to rotate text drawn by Quartz on iPhone

I want to draw some texts using Quartz. Now the app draws , but I want it to show as "0123456789". Is there any way to show its normal orientation? Here is my code: //set image view drawImage = [[UIImageView alloc] initWithImage:nil]; drawImage.frame = self.view.frame; [self.view addSubview:drawImage]; UIGraphicsBeginImageCont...

WPF - KeyFrame animation not working

Hi, I've got a KeyFrame Animation storyboard and a separate rotation transformation in my Window.Resources. The rotation transformation works as I can alter the angle and see the content rotate. I know the storyboard is being called, because it took me a few goes to get the PropertyPath right after I clicked on the button. However no...

how to do 3D rotation around center in AS3 using matrix3D?

I am trying to rotate a Sprite in three dimensions around its centerpoint, and I am struggling to understand some of the behavior of matrix3D. Ive overridden the set rotationX, rotationY, and rotationZ methods of the Sprite as follows: override public function set rotationX (_rotationX:Number) : void { this.transform.matrix3D.pr...

Can someone Explain this jQuery code?

This code is taken from http://wilq32.googlepages.com/wilq32.rollimage222, and is supposed to animate an image rotation. I can't figure out the structure exactly, and how to train it to do what I want, for example - make div X rotate div Y on hover (instead of rotating itself), or adding other functions such as fade to the animation. $...

Rotation Question

I have lot of points (which together form a 3d ellipse) in a given frame (X, Y, Z) and then I have vector (u,v,w). What I want is to orient the ellipse along the vector (u,v,w) . Anyone has useful thoughts on how to go about doing that? ...

Eyeball rotation

Hello, I'm developing a interactive eye follower. I want to rotate 2 spheres according to mouse movement. These spheres are representing the eyeballs.What is the best way to do this? I need to find the vector which points to the direction of the mouse current position, but i don't know how to find the rotation matrix for ball rotation. ...

How to find the x,y coordinates of a rotated vector

Hi all, I found the best way of calculating the width and height of the bounding box of a vector post-rotation from a different stack overflow post. This worked great. My problem now is calculating the new x,y coordinates of the rotated vector's bounding box. Here is the my javascript. The newWidth, newHeight variables are correct -- the...

Quaternions and Transform Matrices

Tell me if I am wrong. I'm starting using quaternions. Using a rotation matrix 4 x 4 (as used in OpenGL), I can compute model view matrix multiplying the current model view with a rotation matrix. The rotation matrix is derived from the quaternion. The quaternion is a direction vector (even not normalized) and a rotation angle. Resulte...

Rotate to landscape for views added to the hierarchy manually (iPhone)

I have a simple UIViewController that uses a XIB for its interface. As such, the interface simply comprises a UIView, a UIActivityIndicator and a UILabel. I have the sizing constraints in Interface Builder set to keep the activity indicator and the label centred when the view rotates. The UIViewController is set to return YES for portr...

Rotation of camera used for perspective projection

I've just started playing with OpenGl to render a number of structure each comprising a number of polygon. Basically I want to perform the equivalent of setting a camera at (0,0,z) in the world (structure) coordinates and rotate it about the x,y and z-axes of the world axes (in that order!) to render a view of each structure (as I under...