rotation

How to define apache's logrotation's file name using an external shell script

Guys, I have apache running on different servers, I would like to rsync log files back to a centralised server on a daily basis. I can use log rotate to create log file for a day and put it in a directory that gets rsync'd to the central server. However is there any way to set the log filename with a designation that could be read from ...

Is it possible to rotate a plot in R (base graphics) ?

I searched for this and found that with {grid} there are ways to rotate an image, and that for some plots you can play with their rotation (for example plot(x,y) instead of plot(y,x)). However, I want to know if there is a generic method to rotate a plot in R (one that would work for ANY plot generated in base graphics) ? ...

iPhone rotates screen after changing view

Hello, i have an app with two views. both are in landscape view. if i change the views, the screen of my iphone rotates from portrait mode into landscape mode. but it was in landscape mode before i changed the view. this happens every time i change any view. i simply want two views that are ALWAYS in landscape mode even if they came vi...

3D rotation with Axis & Angle

I know 3D rotation is well documented on SO and many other sites, but despite reading countless explanations I still haven't figured out where I'm going wrong. My background is in art and design, not math and programming, and I'm never really certain if my angle of attack (no pun intended) is the right one. Rather than paste a patchwork ...

Alert views in portrait, iPad in landscape, and unable to rotate to anything but "other" landscape (180 degrees).

Update: Solved. See fix at bottom. In my iPad app which supports all orientations, if the app is loaded in landscape, weird things happen: Alert views appear in portrait, even though the rest is in landscape Rotating the iPad from landscape to portrait does not trigger a rotation (nor does it trigger any of the shouldAutorotate style ...

rotate uiview using touch (ipad and iphone)

Hi guys.. I am trying to design another app and am struggling to think of the best way to do it. I'm after some advice please! If you imaging a bicycle wheel in the middle of the ipad (and iPhone)... I want the user to be able to click on the tyre and spin it to the left or right. Depending on the speed of the swish will drive the speed...

JQuery thumbnail src rotator on hover (multiple images)

Situation: We've got this DIV with thumbnails who need their src being changed on hover: <div id="moreVideos"> <span class="mb"> <a href="#" onclick="javascript:loadAndPlayVideo('qrO4YZeyl0I');return false;" class="ml"> <img src="http://i.ytimg.com/vi/qrO4YZeyl0I/default.jpg" id="thumb_qrO4YZeyl0I" class="mvThumb" title="Lad...

Rotate dictionary keys in python

I have a dictionary with several values that I want to keep constant, but I need to rotate them throughout the different keys. Is there a built in function or external library that would be able to do this or would I be better off just writing the entire thing myself? Example of what I am trying to do: >>> firstdict = {'a':'a','b':'b',...

Does anyone know an efficient way to rotate a 32 * 32 bit matrix by 90 degrees in C#?

Possible Duplicate: How do you rotate a two dimensional array? I have 32 Int32's. Picture this as a block of 32 * 32 bits. I need to rotate this block of bits 90 degrees clockwise. What's the most efficient way to do this in C#? ...

Android camera unexplainable rotation on capture for some devices (not in EXIF)

What I'm doing seems like it should be simple, but I'm still lost after I've read every possible Stackoverflow answer I can find and Googled every article I can find. I'm using a preview SurfaceView and capturing an image from an activity that is set for screenOrientation="landscape" in my AndroidManifest.xml. I followed the sample Cam...

Blinking UIView

Hi For my iPhone app I'm creating some rotating gears with the help of some subclassed UIViews. I have created subclasses that rotate themselves triggered by a timer. In one place I have one of these subclasses within another one (so rotation within rotation, think moon rotation around earth and it's own axle). It all rotates fine an...

Transform (rotate) a UIBarButtonItem

Hello, Does anybody know how to transform a UIBarButtonItem ? I tried this but with no results :( It's not working on both UIBarButtonItem and its customview. [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:5.0f]; CGAffineTransform myTransform = CGAffineTransformMakeRotation(M_PI_2); UIBarButtonItem * currentI...

How do I make an exact copy of a UIImage returned from a UIImagePickerController?

I have divergent needs for the image returned from the iPhone camera. My app scales the image down for upload and display and, recently, I added the ability to save the image to the Photos app. At first I was assigning the returned value to two separate variables, but it turned out that they were sharing the same object, so I was gettin...

Loop-Tiling to Rotate a Matrix

I'm trying to write a function to rotate an image matrix using the loop-tiling technique. However, I'm running into some issues with getting it to work properly. EDIT: Here's my updated code that works, but only when n is a multiple of the block size. How would I go about handling varying matrix sizes? Right now, I'm just using square ...

how to transform a sphere to a hemisphere, smoothly

Hi all, I am using a 3rd-party "rotator" object, which is providing a smooth, random rotation along the surface of a sphere. The rotator is used to control a camera (see rotator.h/c in source code for xscreensaver). The output of the rotator is latitude and longitude. What I want is for the camera to stay above the "equator" - thus lim...

cocos2d + box2d: Rotation towards point

I'm attempting to rotate a box2d body that's tied to a cocos2d sprite via box2d's GetUserData() in my iPhone application. Specifically, I'm attempting to grab the latest touch location and rotate my box2d body in that direction. I'm fairly inexperienced when it comes to box2d, so any advice would be appreciated. Below is a quick stab at...

How can I find the rotation of a quad in 3D ?

I have coordinates for 4 vectors defining a quad and another one for it's normal. I am trying to get the rotation of the quad. I get good results for rotation on X and Y just using the normal, but I got stuck getting the Z, since I've used just 1 vector. Here's my basic test using Processing and toxiclibs(Vec3D and heading methods): im...

"Rotating" to get AVL Tree

Why is the process of balancing to get an AVL tree called rotation? (While you are at it, what's single & double rotation?) Every textbook of mine blatantly uses that word without any explanation. ...

How do 3D engines typically handle object rotation? (Illustrated)

I'm building a quick 3D engine for a game I'm developing. Currently I'm handling rotation of 3D objects by rotating around the global axis Y, X then Z. Is this the correct way to do it, or should I be rotating objects about its local axis? Which do you recommend and why? If the local axis method is the correct way, would a 3D 3x3 or 4...

Easy code sample for formula for simulating deceleration of a rotating sphere due to friction and gravity?

I have a rotating sphere that the user rotates by applying a virtual force, like a virtual accelerator. I want to be able to simulate a nice momentum effect so that when they lift off the accelerator the ball winds down in speed in a natural and realistic way, as if due to friction and/or gravity. I don't want to get into any deep phys...