function final_pos = draw_direction_segment(segment_length, curr_pos, direction)
% 1 --> up
% 2 --> right
% 3 --> down
% 4 --> left
switch direction
    case 1
        final_pos = draw_angle_segment(segment_length, curr_pos, 0);
    case 2
        final_pos = draw_angle_segment(segment_length, curr_pos, 88);
    case 3
        final_pos = draw_angle_segment(segment_length, curr_pos, 180);
    case 4
        final_pos = draw_angle_segment(segment_length, curr_pos, 272);
end
end

