Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The following code gets you a long way, I think. See example output: <img src="https://i.stack.imgur.com/QH0cL.png" alt="enter image description here"></p> <p>I added enought comments that you should be able to take it from here...</p> <pre><code>% plot ellipsoid in 3D % height and width of ellipsoid: e_h = 10; e_w = 3; % position where the "quivers" (arrows) go: q_offset = 2; % distance from axis q_scale = 0.5; % multiplier to give parabola some size q_spacing = 0.5; % distance between arrows q_height = 2.5; % height above XY plane where arrows are drawn N = 1000; % number of points for drawing theta = linspace(0, 2*pi, N); % parameter to help drawing ellipse zerov = zeros(1, N); % array of zeros that I will need % coordinates of main ellipse: x = e_w * sin(theta); y = zeros(size(x)); z = e_h * cos(theta); % plot main ellipse: figure; plot3(x, y, z) % secondary plot y2 = q_scale*(e_w.^2 - x.^2) + 2; % offset parabola - what your plot looked like... hold on plot3(x, y2, zerov+q_height); % plotting the parabola in the XY plane at height axis equal % make the plot dimensions isotropic % add quivers q_base = -e_w:q_spacing:e_w; % x coordinate; y and z are fixed q_length = (e_w.^2 - q_base.^2)*q_scale; % length of quiver - just an equation I chose q0 = zeros(size(q_base)); % another vector I will need multiple times q1 = ones(size(q_base)); % ditto % plot the arrows: the "-1" argument means "don't scale" quiver3(q_base, q0+q_offset, q_height*q1, q0, q_length, q0, -1) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload