LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rotate a parable in XY Graph

Hello!I have a parable on an xy axis, how can I make it rotate around the origin of the coordinate system or around the tip?
How do I do the same thing with moving a sphere on the parabola, from one end to the other, and how can I change the speed of movement?

0 Kudos
Message 1 of 4
(2,202 Views)

Hi Whifitws,

 


@Whifitws wrote:

I have a parable on an xy axis, how can I make it rotate around the origin of the coordinate system or around the tip?

Well, in your VI there is no plot when I run it - you forgot to set some useful default values…

 

On the rotation: as a student you should have heard about complex numbers before and how they are visualized on a XY plane. You should also know about conversion between Re/Im and r/theta representation: convert your XY coordinates to complex numbers, then change their representation to r/theta, then simply apply basic complex math by changing theta to "rotate" around a certain point in your XY plane…

(LabVIEW perfectly handles complex numbers, even in XY graphs, and supports you by functions dedicated to complex numbers!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,189 Views)

@GerdW wrote:

then simply apply basic complex math by changing theta to "rotate" around a certain point in your XY plane…


Or just multiply with a complex number (r=scale, theta=angle). Also make sure to not autoscale the axes and size the xy graph so the x and y scales have the same range and length (i.e. square gridpoints) to avoid distortions.

 

(To rotate about an arbitrary point, flank the code with an subtract/add of the center RE/IM complex point. Not shown)

 

altenbach_0-1582908913120.png

 

Message 3 of 4
(2,165 Views)

@altenbach wrote:
(To rotate about an arbitrary point, flank the code with an subtract/add of the center RE/IM complex point. Not shown)

altenbach_0-1582910518660.png

 

Message 4 of 4
(2,157 Views)