Does rotation matrix keeps perpendicularity of two vectors?

I know my question is quite silly but let me explain my problem...
During the execution of my program, I wrote my own "lookAt" function wich takes into parameters two 3D points (eye position and view position) and a up vector. Everything is working great but, at one time, when I need to rotate my whole thing, I get a strange mistake I don't know how to solve :
I compute my two vectors (up vector and the view one (view - eye)), there I check this two vectors are perpendicular (v1.dot(v2) == 0). Then I multiply my two vectors by my rotation matrix and I get my two new vectors. But, when I check if the two vectors are perpendicular, v1.dot(v2) now equals to something like -x.xxxxxxxxxxxxxxxE-XX, XX like 16 or 17. I know the problem is coming from the precision of my numbers, but does someone knows how I can solve it to conserve the perpendicularity?
I really need this perpendicularity because I need to compute a new transform Matrix and with my problem, this one is not congruent, so I get an error.
Thanks!!

i did the same and had an error too, post you calculation code and i will try to help if i can

Similar Messages

  • Rotation between two vectors

    Hello,
    I am looking for a way for my 3D character to slowly rotate
    between two vectors. The rotation vectors is results from the
    rotation property of GetWorldTransform().
    My first idea was to somehow convert the two vectors into
    degrees and with the help with that information then simple use the
    rotation()-function.
    All help to figure out how to do so, or other suggestions,
    would be highly appreciated. Thanks. :)
    Thanks!

    The interpolate() and interpolateTo() commands accept a
    percentage value as the second parameter, so you should be able to
    specify what percentage of the interpolation you want, at the
    current point in time, as a factor of your time delta.
    - Ben

  • Why does a movie keep rotating everytime that I attempt to view the movie?

    Why does a movie keep rotating everytime that I turn it to view the movie as shot?

    Maybe:
    https://discussions.apple.com/message/23482925#23482925
    make sure you read through all of the relies since the last one seems to apply in your case.

  • I create name plaques using TypeStyler, but my laser cutter says they must be converted into two vector files; a cut file to cut the outlines of all the letters and an "etch" to etch the letter intersect lines.  Can AI convert my TypeStyler file into a cu

    I create name plaques using TypeStyler, but my laser cutter says they must be converted into two vector files; a cut file to cut the outlines of all the letters and an "etch" to etch the letter intersect lines.  Can AI convert my TypeStyler file into a cut file and an etch file?

    Thanks. I might use it soon...
    Does it automatically make folders named after the volume labels? And does it handle the conversion of spaces and non-alphanumeric characters to octal codes?
    I could read the script but it would be faster for everyone reading, if you leave the answer as a reply.
    I also think that there should be some major work done on modernizing the fstab, either by replacing it with a better implementation of file system mounting or changing the file structure and adding in better handling of non-alphanumerics. I don't want to have to look up a stupid octal table every time I type in my labels.

  • Why does my Internet keep closing

    Why does my Internet keep closing

    1. Double-click the Home button to see all Inactive Apps
    2. Hold the Apps down for a second or two until you see the minus sign
    3. Tap the minus sign to close App
    4. Reset iPad. Hold the Sleep and Home button down for about 10 second until you see the Apple logo. Ignore the red slider

  • Performance issues comparing two vectors

    I need some advice on what is the fastest way to compare two vectors. My question is all about performance;
    I have two vectors one(Vect A) of which has more than 20000 string values and the other Vector B would hold typically around 200 strings.I compare them both to find out if Vector B has values in Vector A and remove those.
    I iterate thro each element in a loop from the smaller to the bigger vector comparing element by element.But it takes a long time.
    Is there any quick way to do this comparison and can I use contains/compare methods instead of iterating thro the vectors.will it speeden up things
    Arn

    first of all, you should probably examine your collection choice and make sure that java.util.Vector is your best option (assumming you can change the class). Do not use a Hashtable as the previous poster suggested- it doesn't sound like you have a key/value type relationship in your elements, making a Map implementation superflous. Will there be duplicate elements in either Collection? If you will not have duplicate elements, you should probably use a Set collection instead of a List. Does your collection have to be thread-safe? If not, one of the unsynchronized collections should give you better performance (e.g. ArrayList should be quicker then Vector). For the best possible performance, you could use an ordered collection and write your own comparator, so that it does not iterate beyond what ever element assurres that there is no match (i.e. if the first element is "fred" in an ordered collection, you know there will be no match for "adam"). Sun has some good tutorials on the java.util.Collection package that will help you understand the benefit of each implemenation...
    although, and I suppose this is neither here nor there, I wouldn't use java objects to sort through 20K string items- sounds like storing them in a database might be superior. Take care.

  • Find difference between two vectors ?

    Hi,
    I have two vectors, the first contains:
    v1.add("1");
    v1.add("2");
    the second:
    v2.add("1");
    Now I want to print out the difference between both.
    Does anybody have en idea ?
    Regards
    Micha

    Yep, that should definitely do it. I think the point ssav is trying to make is that to solve this problem we need to know your actual requirements. "the difference between" is too vague. Here are some things to think about:
    - Is position important? That is, is a List containing 1 and 2 the same as a List containing 2 and 1 or different?
    - If List A contains 1,2,4,5,6 and List B contains 1,2,3,4,5,6 what would you want to see?
    - What if List A contains 1,2,3 and List B 1,2,2,3?
    - What if List A contains 1,2,3 and Lits B 1,2,and a java.lang.NullPointerException?
    You're probably starting to see that this is not as simple as you thought. Come back with more specific requirements and you may get better help.

  • OCS package SAPKITL437 does not match the current software component vector

    I am trying to apply SAPKB70108 in SOLMAN 7.1 ehp1. SPAM=KD70143, got error OCS package SAPKITL437 does not match the current software component vector
    Lalit Kumar

    I have posted single time but due to internet problem, I clicked two times and the same posted twice.. I want to delete one but haven't find delete option...
    Lalit Kumar

  • Why does magic mouse keep disconnecting?

    I've got an Apple Magic Mouse  that is less than one year old and it keeps disconnecting from my Mac Mini.  It just started doing it.  I've put in fresh batteries and restarted the computer.   I've got all the latest operating system software.   Nothing is out of date.   Every couple of minutes it just randomlly disconnects then reconnects and so on, over and over again.  It's only about 2 feet away from my Mac Mini.
    Anybody know what to do?
    Thanks.
    David

    I thank you for your help, Ascendi, but I have no idea what you're saying.  I'm guessing I stand alone, because others do understand.  What I got from it was that the batteries don't fit snuggly, and to shove aluminum foil... somewhere.  I'm don't have a PhD in battery terminal dimensions and their terminonolgy.  But I do appreciate that you helped.
    David / Flashkube2... EXACTLY!  After years and years with my wonderful white Magic Mouse, just today the exact same thing started happening, only I was losing connection every 20 seconds.  Half the time, I'd get it back.  I feared it was a Bluetooth error, or a hacker was "stealing my juice"  So I got online here, read this stuff, wiggled my batteries around (for years and years, I've only used Duracel), and for the last 10 minutes, I have kept connection with Mr. Mouse and Mr. Mac.  Keep your fingers crossed!
    So if this problem arises again, I just stuff aluminum foil in there?  (I'll be a wee bit neater than "stuff").  Speak "positive terminal" and "negative terminal" and "top of the batteries" to me, because "depth of the recess" and "vernier caliper" are Chinese to me.  Does "battery recess" mean how the two batteries sit in its casing?
    Maybe I just didn't have enough coffee this morning.  I'm not ususally shtooo-pid.  (don't go there!)

  • Does the Student License Allow for Two Installs?

    Does the Student License Allow for Two Installs?
    I have a desktop iMac and a Macbook notebook. I just purchased Adobe Web Standard CS3 (student license).
    Can I install and activate the package on both of my computers? I know I could do this with a regular license, but I was unsure about the student license.
    Thanks in advance.
    Dave

    HEEEEEELPPPPPPPPPP, PLEASE
    I purchased adobe cs3 primium but i already had photoshop installed. I installed cs3 primium and now i keep getting the error that the licensing has stopped working can't use file cont IT or cust. support. I tried to download the clean file and it gives me the same error to open this file. i tried to uninstall with control panel programs and uninstall and it gives me the error uninstall not complete. I tried to repair with disc and uninstall with the disc and nothing is working. I have windows vista with 100g hd 500 mem duo core all the proper requirements but i can't get this to work.'
    HELP anyone

  • Imagesnapshot.capturebitmapdata with rotation matrix

    Hi all,
    I am not able to use imagesnapshot with rotation matrix.
    I am using imagesnapshot to cpature bitmapdata from image.
    My image is rotated so I want to rotate bitmapdata as per rotation.
    Here is the code.
    var matrix:Matrix = new Matrix();
    matrix.rotate(degreesToRadians(90));
    var bitmapData:BitmapData = ImageSnapshot.captureBitmapData(image, matrix);
    This code is not working it gives error.
    any idea why it is giving error?

    Kglad,
    While the parent isn't being rotated, it used to:
    Group all of the shapes together
    Acts as a basis for a bitmap object
    The problem occurs when I align the parentMC to the bottom and right edges of the stage. If left where the true boundary of the parentMC exists, there's a huge gap between the visible part of the shapes and the edge of the screen. If I manually adjust the parenMC, the screen size of the background is enlarged, and any object that rely on the right edge for alignment slide off screen.
    The breakdown of the display objects looks like this:
    ScreenContainer
    Background Image Container
    Shapes Container (holds all of the puzzle shapes)
    Individual Shape Container (a movieclip that can be dragged or rotated--X and Y offset to rotate around center)
    Individual Shape Subcontainer (a movieclip holds the drag handles and the shape--X and Y offset)
    Handle at each vertex
    Shape
    Tool Area
    I want to rotate the Individual Shape Container (not the subcontainer) without offsetting the X and Y positions of it or the Subcontainer using a transform. My problem seems to be in assigning the center point during the transform.
    Does that make sense?

  • Need to sort two vectors at the same time! please help!

    I have
    vectorA: 2 4 9 1 7 6 8
    vectorB: two four nine one seven six eight
    i want to sort these two vectors in parallel
    what is the best way?
    i could just do Collection.sort(vectorA) and get
    1 2 4 6 7 8 9
    but i want the vectorB to have a corresponding order
    please help!!
    thanks

    public class Pair implements Comparable {
    private int value;
    private String name;
    public int getValue() {
    return this.value;
    public void setValue(int value) {
    this.value = value;
    public String getName() {
    return this.name;
    public void setName(String name) {
    this.name = name;
    public int compareTo(Object o) {
    Pair that = (Pair) o;
    return this.value - that.value;
    place both in a Collection (vector is a bad choice if you are going to do sorting LinkedList is better) the Collections.sort method will sort
    according to the compareTo method.

  • Why does my Macbook keep going to sleep every 10-20 secs!

    why does my Macbook keep going to sleep every 10-20 secs when first turning on then it seems ok after about 10 mins ? This has only happened since upgrding to Lion 3 days ago, it's driving me mad!

    You are most welcome

  • After installing yosemite iphoto does not open keep getting message"This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled.

    I upgraded to yosemite iphoto does not open keep getting message"This update is not available for this Apple ID either because it was bought by a different user or the item was refunded or cancelled.

    Contact App Store support. There's a link on the right hand side of the App Store Window. They're the only ones who can sort out account issues.

  • Why does this message keep appearing when i try to instal windows 7 through bootcamp? - "something went wrong and the USB cannot be configured for the installation"

    Why does this message keep appearing when Itry to instal windows 7 through bootcamp? - "Your bootable USB drive could not be created. An error occurred while copying the Windows installation files."

    Found a solution!
    Follow the extended version of these directions here:
    https://discussions.apple.com/docs/DOC-3581
    Worked like a charm!

Maybe you are looking for

  • Can't use Swing in my java application

    I installed J2SE 5 Update 4 on my machine and was trying my hands on creating GUI using swing. I kept getting the error message: "Package javax,swing not found in import". I have the statement: import javax.swing.*; in my code so I don't what to do a

  • Is there a way to secure an iPad running iOS 5.1.1?

    I have an original iPad that can only be upgraded to iOS 5.1.1 which is not secure for email, short of getting a new tablet, is there a way to secure the iPad to mitigate the exposure while still deriving some use from the device?

  • Error while uploading the data Using LSMW - Idoc method

    Hi Experts,    I am working on LSMW using Idoc method. Till 12th step (Display converted data) i wasn't got any problem. For the Idoc method, I have to specify details to Idoc inbound processing from the menu settings. In that screen I have to specif

  • How to call Process Task in AD User proccess definition from Xellerate user

    Hello, I need a help from you guys. I have one customized process task in "Xellerate User" Process definition. When my this task executes completely, I would like to call one of the customized process task in "AD User" process definition from xellear

  • How to make multi user drawing application

    how to make multi user drawing application in as 3.0