02-28-2020 09:57 AM
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?
02-28-2020 10:19 AM
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!)
02-28-2020 10:58 AM - edited 02-28-2020 11:13 AM
@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)
02-28-2020 11:22 AM
@altenbach wrote:
(To rotate about an arbitrary point, flank the code with an subtract/add of the center RE/IM complex point.Not shown)