3d line plot faster.
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi
I am looking for 3D Line plot faster.
My plot data is continuous and has 1 to 86400*365*10 lines. (1sec ~10 years seconds)
Actually it is orbit position data.
But when I just plot just 30 days(86400*30 lines), Rotating the plot was too slow.I think It cause of data ploints are too many.
If I would like to plot faster, what can I do?
Should I interpolate for convert 1 sec data to 60 sec?
Thank for your help.
Here is my pseudo code on app designer.
variables...;
start_time = yyyy/mm/dd HH:MM:SS;
end_time = yyyy/mm/dd HH:MM:SS;
dt = end_time - start_time; % this will be seconds. so If the time interval is 30 days,
% then dt is 86400 * 30.
init_satellites_properties(); % this properties make sure the satellites orbit.
[x_,y_,z_] = function_for_get_orbit_position(app); % this function returns the positions
% of satellites by times.
% thus if the time interval is 30 days
% then size(x_),size(y_),size(z_) will be [1, 86400*30].
hold(app.FigureHandle,'on'0);
plot3(app.FigureHandle,x_,y_,z_);
hild(app.FigureHandle,'off');
% I wannt to rotate 3D plot smoothly but It has too much delay.
3 commentaires
Jan
le 13 Juin 2022
Voss hits the point: Withpout seeing the code, we cannot improve it.
Do you want to plot faster or does the question concern the rotation?
Do you really need 86400*30 lines? Creating more lines than the number of pixels of the monitor seems to be an overkill.
Réponses (1)
Nipun
le 9 Oct 2023
Hi Jae-Hee,
I understand that you are looking for a method to plot 3D lines faster. I assume that the mentioned function function_for_get_orbit_position that populates the x,y,z coordinates for the plot is considerably faster than the plot function and is not the bottleneck for optimization.
Given that you have data points of order for a period of 30 days, MATLAB needs to plot all the points for one interval. There is one way that may lead to considerable speed up in plotting: use interpolation to reduce the number of points and return an approximate trajectory.
The number of points in your current dataset is more than the number of pixels in a screen monitor - thereby making many points on screen redundant. You can use scatteredInterpolant to interpolate the points.
Additionally, you may leverage gridfit toolbox to plot the semi-scattered data, that is, the subset of the number of points in your original dataset.
Link to resources:
- 3D plot faster for large data - MATLAB Answer: https://in.mathworks.com/matlabcentral/answers/1401-3d-plot-with-large-data
- Interpolate 3D data: https://in.mathworks.com/help/matlab/ref/scatteredinterpolant.html
- Gridfit toolbox: https://in.mathworks.com/matlabcentral/fileexchange/8998-surface-fitting-using-gridfit
Regards,
Nipun
0 commentaires
Voir également
Catégories
En savoir plus sur Reference Applications dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!