ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Click Here to receive this Complete Guide absolutely free.

Hi, I am looking for a code that will perform a matrix rotation around a desired point and NOT about an axis for example. I am looking for references in this area that would help me achieve this rotation. I know it is possible, but cannot find anything relevant in the literature.

Well this is a simple Matrix multiplication, you take the standart rotation matrix with the disired Angle and multiply it with the given Matrix. Stuff like that can be found for example in OpenGL guides, or graphic programming guides which also show stuff like the bresenham algorithms, and such. Just Google for Bresenham and you'll going to find a couple of those, which might also keep on going towards more graphic stuff. Literature wise check out the OpenGL Redbook. Even though those kind of Manipulations are already implemented in OpenGL, it will show you how to use those.
Which is your disired Programming Language? I did this kind of stuff using C++/QT/OpenGL in a course at my college.

Well this is a simple Matrix multiplication, you take the standart rotation matrix with the disired Angle and multiply it with the given Matrix. Stuff like that can be found for example in OpenGL guides, or graphic programming guides which also show stuff like the bresenham algorithms, and such. Just Google for Bresenham and you'll going to find a couple of those, which might also keep on going towards more graphic stuff. Literature wise check out the OpenGL Redbook. Even though those kind of Manipulations are already implemented in OpenGL, it will show you how to use those.
Which is your disired Programming Language? I did this kind of stuff using C++/QT/OpenGL in a course at my college.

I have some code that I have inherited which performs a 3D rotation by taking a central point a COM if you like and then determining a vector which defines a point in the system, an atom for example. Then this vector is simply rotated by theta and phi, using matrix rotations. I have the code, but I wish to have a reference to where the code came from and how it was derived.

rotations always occur around an axis. The concept of rotation around a single point is invalid, except insofar as that point lies on the axis of rotation.

One is a rotation about phi, which is with respect to an axis and this simply takes the form:

| cos (phi) -sin (phi) 0 |
| sin (phi) cos (phi) 0 |
| 0 0 1 |

That I agree is rotation about a z axis.

Then there is the theta part which is much more complex. This I have broken down into some of the constituent parts. I cannot find anywhere on the wen where this might have come from. The summation of A, B and C leads to a rotation about theta, assuming some arbitrary axis, which one can assume is that same as before.

LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.