2 function draw_ellipses(axe, ellipses, plot_3d, plot_center)
3 if ~exist('plot_3d', 'var')
7 if ~exist('plot_center', 'var')
19 for i = 1:length(ellipses)
21 transform_mat = [cos(e.alpha) -sin(e.alpha); sin(e.alpha) cos(e.alpha)];
24 for phi = linspace(0, 2 * pi, 36);
26 p = [e.x0; e.y0] + transform_mat * [e.r1 * cos(phi); e.r2 * sin(phi)]; % p : [x y]
27 if ~isempty(p_previous)
28 line = plot3(axe, [p(1) p_previous(1)], [p(2) p_previous(2)], [z z], 'LineWidth', 1, 'Color', 'yellow');
32 line = plot3(axe, [p(1) p(1)], [p(2) p(2)], [0 1], 'LineWidth', 0.5, 'Color', 'yellow');
40 plot(e.x0, e.y0, 'r.', 'MarkerSize', 20);