function varargout = Rakete1(varargin)
% RAKETE1 MATLAB code for Rakete1.fig
%      RAKETE1, by itself, creates a new RAKETE1 or raises the existing
%      singleton*.
%
%      H = RAKETE1 returns the handle to a new RAKETE1 or the handle to
%      the existing singleton*.
%
%      RAKETE1('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in RAKETE1.M with the given input arguments.
%
%      RAKETE1('Property','Value',...) creates a new RAKETE1 or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before Rakete1_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to Rakete1_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help Rakete1

% Last Modified by GUIDE v2.5 06-Nov-2014 21:12:58

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Rakete1_OpeningFcn, ...
                   'gui_OutputFcn',  @Rakete1_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before Rakete1 is made visible.
function Rakete1_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to Rakete1 (see VARARGIN)

% Choose default command line output for Rakete1
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Rakete1 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
set(handles.rumpf_slider, 'Min', 200, 'Max', 500, 'sliderstep', [0.01 0.1]);
set(handles.rumpf_slider, 'Value', 300);
Q = get(handles.rumpf_slider,'Value');
W = 0
% Anfangswerte der Rakete
% Ellipse der Spitze

xCenter = 0;
yCenter = 0;
xRadius = 150;  
yRadius = 15;
theta = 0 : 0.01 : pi;
x = xRadius * -sin(theta) + xCenter;
y = yRadius * -cos(theta) + yCenter;
plot(x, y, 'LineWidth', 2);
axis square;
xlim([-200 350]);
ylim([-40 40]);
grid off;

hold on

% Rumpflänge

     


x1 = [W, Q];
y1 = [15, 15];
plot(x1,y1,'linewidth',2)
   
hold on

x2 = [0, Q];
y2 = [-15, -15];
plot(x2,y2,'linewidth',2)

hold on 

%Rückwand
x3 = [Q, Q];
y3 = [15,  -15];
plot(x3,y3,'Linewidth',2)
function varargout = Rakete1_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on slider movement.
function rumpf_slider_Callback(hObject, eventdata, handles)
slider_value = get(handles.slider1,'Value');
return
% hObject    handle to rumpf_slider (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider


% --- Executes during object creation, after setting all properties.
function rumpf_slider_CreateFcn(hObject, eventdata, handles)
% hObject    handle to rumpf_slider (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end


