Plotting 2 3D functions on one plot ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Plotting 2 3D functions on one plot ?

linux guy
Hello all.

How does one plot 2 different functions on the same 3D plot ?

For example, if I wanted to plot a line and a cylinder on the same plot ?  Preferably without using the built in line and cylinder functions, because the functions I need to plot are not available as built in functions.

Thanks.

LG


Reply | Threaded
Open this post in threaded view
|

Re: Plotting 2 3D functions on one plot ?

Juan Pablo Carbajal-2
There are plenty of functions to plot in 3D[1]
You need to select the one that accomplish what you want.
Then you need to write functions that convert your 3D objects into the
data format the selected function needs
Finally you need to call the plotting functions for the converted
objects after you have hold on the plot.

figure(1)
hold on
# call the 3d plotting function on object one
# call the 3d plotting function on object two
# fix axes, camera position, lights, view, annotations, etc

I hope my abstract description leads you somewhere.

[1] https://octave.org/doc/interpreter/Three_002dDimensional-Plots.html#Three_002dDimensional-Plots