LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with image rotation

Solved!
Go to solution

For the attached code for by giving the inputs to a single cordinate by keeping other cordinates ==0 . everythin is ok. 

 

But if ikeep some x = 10 and if i am varing y image is getting to starting position. what might be the problem

Download All
0 Kudos
Message 1 of 8
(2,636 Views)
Solution
Accepted by topic author Nagaa

First, you probably don't want to use a timeout case but instead change this to a "Value Change" event that checks X, Y and Y. This will be significantly more efficient (right now, even if nothing is changed, you are recalculating the image every 2 ms...). See attached modification.

Next, what do you want to do? As you probably know, rotations in 3D are not commutative (e.g. a rotation around X followed by a rotation around Y is not the same as the two operations accomplished in the opposite order). Your code currently specify the rotation axis (the cluster of X, Y, Z coordinates) by passing ANGLES. That's probably not what you want to do. This cluster specifies the axis VECTOR. The other parameter, which is the angle, needs to be controlled by a separate parameter. Therefore, if you want to rotate either around the X, Y or Z axis by a specific angle, you probably want to do what I did on the attached modified version 2.

Download All
0 Kudos
Message 2 of 8
(2,624 Views)

Thank u sir 

0 Kudos
Message 3 of 8
(2,611 Views)

In my below code can u help me why the below object is rotating slowly without any delay please

Download All
0 Kudos
Message 4 of 8
(2,596 Views)

take x = 20 y = 30 = 20 then observe the code

0 Kudos
Message 5 of 8
(2,578 Views)

I don't understand what you are trying to do and what the question is. If something is rotating slowly, it exhibit some kind of delay, so it cannot be rotating "without any delay". Incidentally, are you planning to expand your diagram to several more screen widths?

0 Kudos
Message 6 of 8
(2,571 Views)

Application : to rotate a ball according to the xyz inputs

 

what i mean is  in that vi. under event structure ( ok button value change ) ,  i kept one while loop,  that loop is executing slowly .

i want to know why that loop is executing too slowly

0 Kudos
Message 7 of 8
(2,557 Views)

The reason is that the action in the "Scene Window" case (Render to Image) takes a significant amount of time. On my not-so-new dualcore desktop, it takes about 230 ms per iteration...

If you replace your Picture indicator by a 3D Picture and directly connect the wire that you are currently connecting to your Scene property to it, this is pretty much instantaneous:

 

ScreenHunter_002.jpg

0 Kudos
Message 8 of 8
(2,539 Views)