function plotSimulation( simulation )

    bodies = simulation.bodies;
    rodConstraints = simulation.rodConstraints;
    
    n = length(bodies);
    m = length(rodConstraints);

    hold off;
    % Plot something to force matlab to clear the graph
    plot3(0,0,0);
    hold on;

    % Draw bodies
    for i = 1:n
        body = bodies(i);
        plotBody(body);
    end

    % Draw constraints
    for i = 1:m
        constraint = rodConstraints(i);
        plotRodConstraint(constraint,bodies(constraint.indexA),bodies(constraint.indexB));
    end

    axis([-1 4 -1 4 -1 4]);
    %view(0,90);
end

