LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3d plot sphere with vectors

Hi, I'm trying to create a 3d shpere [i've doen that bit] with a number of vector lines out from the plot within the 3d enviroment,

can this be done by adding aditional plots, if so how can they be done??

 

The vector lines i'm trying to make will be controlled by a source, and destination coordiantes defined by:  {theta, phi, r} - in sherical coordinates,

 

also can they be plotted as just lines, and idealy with arrows on the destination end??

 

Help!!

 

VI attatched, any help apreciated!!

0 Kudos
Message 1 of 21
(7,578 Views)
Dear John,The function you are looking for is the 3D curve.vi – you can specify 3 separate coordinates for x, y, z to form a vector. How you specify these coordinates is up to you – I imagine that, with a little thought, you would have no problems specifying these radially.Another important function, that is rather easy to miss, is the setplots.vi. By default you can only make a single plot on a 3D graph. But, using the setplots function, you can add as many plots as you require.The only last thing to remember is that you must specify the plot number when you are changing properties of a specific plot.Please see the attached code for further help.It sounds like you are creating quite an exciting application! Best of luck to you!!Kind regards,
Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
Message 2 of 21
(7,562 Views)

You can choose the coordinates system used when plotting. See here.

 

Ben

Message Edited by Ben on 08-14-2008 07:46 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 21
(7,559 Views)

Hi i understood how to carry out corrdinate conversion, it was the format i was having issue with.

I'll givwe reply 1 a try, many thanks

0 Kudos
Message 4 of 21
(7,537 Views)

Hi could you convert the labview edition from 8.5 to 8.2 for me??

my labview won't read it.

0 Kudos
Message 5 of 21
(7,536 Views)

Apologies John, I made an incorrect assumption.

Please find the attached 8.2 code.

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
Message 6 of 21
(7,520 Views)
no my mistake i didn't say which version i was using!
0 Kudos
Message 7 of 21
(7,516 Views)

One last thing, i'd like to make the vi accept a number of vectors to plot, i've tried to do this using a for loop, and attatching the plot number to the plot number +1, but this seems to give one plots and the ball and then an error, if i set it to +2 it gives me both lines but no balls.

 

I'm a touch confused. 

help is again very much apreciated!

 

see attatched!

0 Kudos
Message 8 of 21
(7,510 Views)

Ah found it, there is a 'number of plots' part that has to include the ball as well as the lines

my bad.

0 Kudos
Message 9 of 21
(7,509 Views)

Great news! I am guessing that, before you resolved your own issue, you were over writing the sphere plot. So, by adding two to the for loop iteration rather than one you are able to avoid this (i.e. during the first run of the for loop, you are writing to plot number 2, rather than overwriting the sphere in plot number 1).

 

John, for the sake of your fellow developers, could you please post your new and improved vi on here. That way, if another developer stumbles on to this thread they will have a prebuilt piece of code.

 

Robot Very Happy

 

Thanks for your time John,

Best wishes,

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
0 Kudos
Message 10 of 21
(7,496 Views)