Professional Documents
Culture Documents
Danman:Yrd. Do.Dr.Serdar KK
VOLKAN AYGL
a1
a2
C1
C2
l1
l2
1
OB1
2
OB2
X
1-TERS KNEMATK
VOLKAN AYGL
0 1 0 OB yi sin i
OB1 i
PT
0 0 1
0 0
0 0 0
1
0
cos(i ai ) sin(i ai )
sin(i ai ) cos(i ai )
0
0
0
0
sin i
cos i
0
0
0 0 cos ai
0 0 sin ai
1 0
0
0 1
0
sin ai
cos ai
0
0
0
0
li
0
1 0
0 1
1 0 0
0 1 0
li
0
0 0 1 0
0 0 0 1
0
1
A tan 2( a, b) A tan 2 a 2 b 2 c 2 , c
i A tan 2(2li (OByi Py ), 2li (OBxi Px )) A tan 2 2li (OB yi Py )
ai A tan 2(ai sin i , ai cos i ) A tan 2 ai sin i ,
x2 Px OBX l cos i
2li (OBxi Px
)
ai cos i x2 2 , x2
2
2-LER KNEMATK
ai sin(i ai )
OByi Py li sin i
xi 2 , xi
VOLKAN AYGL
li2 2li Px cos i 2li Py sin i 2libxi cos i 2li byi sin i 2 Pxbxi Py 2 2 Pybyi bxi 2 byi 2 a 2 0
di 2(li cos i bxi )
bi 2(li sin i byi )
ci 2libyi sin i 2libxi cos i li 2 bxi 2 byi 2 a 2
Px 2 Py 2 di Px bi Py ci 0
Px 2 Py 2 d1Px b1Py c1
Px 2 Py 2 d 2 Px b2 Py c2
Px
c1 c2 Py (b1 b2 )
d1 d 2
(di d12b12 d12 2bi 2c12b12 )2 4(b12 2 d12 2 )(c12 2 d1d12c12 d12 2ci )
q3 bxi Px li cos i
q1 ai sin i
i A tan 2(q1 , q2 ) A tan q12 q22 q32 , q3
3-GUI ARAYZ
q2 i cos i
VOLKAN AYGL
EK-1 KODLAR
function varargout = rbt(varargin)
% RBT M-file for rbt.fig
%
RBT, by itself, creates a new RBT or raises the existing
%
singleton*.
%
%
H = RBT returns the handle to a new RBT or the handle to
%
the existing singleton*.
%
%
RBT('CALLBACK',hObject,eventData,handles,...) calls the local
%
function named CALLBACK in RBT.M with the given input arguments.
%
%
RBT('Property','Value',...) creates a new RBT or raises the
%
existing singleton*. Starting from the left, property value pairs
are
%
applied to the GUI before rbt_OpeningFcn gets called. An
%
unrecognized property name or invalid value makes property
application
%
stop. All inputs are passed to rbt_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 rbt
% Last Modified by GUIDE v2.5 27-Nov-2011 18:06:56
VOLKAN AYGL
% --- Outputs from this function are returned to the command line.
function varargout = rbt_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;
handles)
Py2 Py3 Py4 Xa Ya alfa1
version of MATLAB
(see GUIDATA)
VOLKAN AYGL
Q2=str2double(get(handles.edit2,'String'));
l1=10;
l2=10;
a1=10;
a2=10;
Bx1=10;
Bx2=10+10*sqrt(2);
By1=0;
By2=0;
d1=2*(l1*cosd(Q1)+Bx1);
d2=2*(l2*cosd(Q2)+Bx2);
b1=2*(l1*sind(Q1)+By1);
b2=2*(l2*sind(Q2)+By2);
c1=2*l1*By1*sind(Q1)+l1^2+2*l1*Bx1*cosd(Q1)+Bx1^2-a1^2;
c2=2*l2*By2*sind(Q2)+l2^2+2*l2*Bx2*cosd(Q2)+Bx2^2-a2^2;
delta1=(d1*(d1-d2)*(b1-b2)-(d1-d2)^2*b1-(2*(c1-c2)*(b1-b2)))^2-4*((b1b1)^2+(d1-d2)^2)*((c1-c2)^2-d1*(d1-d2)*(c1-c2)+(d1-d2)^2*c1);
delta2=(d2*(d1-d2)*(b1-b2)-(d1-d2)^2*b2-(2*(c1-c2)*(b1-b2)))^2-4*((b1b1)^2+(d1-d2)^2)*((c1-c2)^2-d1*(d1-d2)*(c1-c2)+(d1-d2)^2*c2);
Py1=(-(((d1-d2)*(b1-b2))-((d1-d2)^2*b1)-(2*(c1-c2)*(b1-b2)))+sqrt(delta1))/
(2*((b1-b2)^2+(d1-d2)^2));
Py2=(-(d1*(d1-d2)*(b1-b2)-(d1-d2)^2*b1-(2*(c1-c2)*(b1-b2)))-sqrt(delta1))/
(2*((b1-b2)^2+(d1-d2)^2));
Py3=(-(d2*(d1-d2)*(b1-b2)-(d1-d2)^2*b2-(2*(c1-c2)*(b1-b2)))+sqrt(delta2))/
(2*((b1-b2)^2+(d1-d2)^2));
Py4=(-(d2*(d1-d2)*(b1-b2)-(d1-d2)^2*b2-(2*(c1-c2)*(b1-b2)))-sqrt(delta2))/
(2*((b1-b2)^2+(d1-d2)^2));
Px1=(c1-c2-Py1*(b1-b2))/(d1-d2);
%Px2=(c1-c2-Py2*(b1-b2))/(d1-d2);
%Px3=(c1-c2-Py3*(b1-b2))/(d1-d2);
%Px4=(c1-c2-Py4*(b1-b2))/(d1-d2);
t1=a1*sind(Q1);
t2=a1*cosd(Q1);
t3=Bx1-Px1+l1*cosd(Q1);
t4=a2*sind(Q1);
t5=a2*cosd(Q1);
t6=Bx1-Px1+l1*cosd(Q1);
alfa1=(atan2(t1,t2)*180/pi)+(atan2(sqrt(t1^2+t2^2-t3^2),t3)*180/pi);
alfa2=(atan2(t1,t2)*180/pi)-(atan2(sqrt(t1^2+t2^2-t3^2),t3)*180/pi);
alfa3=(atan2(t4,t5)*180/pi)+(atan2(sqrt(t4^2+t5^2-t6^2),t6)*180/pi);
alfa4=(atan2(t4,t5)*180/pi)-(atan2(sqrt(t4^2+t5^2-t6^2),t6)*180/pi);
%%%
Xa=(cosd(Q1)*10)+10;
Ya=10*(sind(Q1));
Xb=cosd(Q2)*10+(10+10*sqrt(2));
Yb=10*sind((Q2));
X=[10 Xa Px1 Xb 10+10*sqrt(2)];
Y=[ 0 Ya Py1 Yb 0];
axes(handles.axes1);
plot(X,Y,'b','LineWidth',3);
hold on;
plot(X,Y,'*','Markersize',8,'LineWidth',3);
grid on;
hold off;
set(handles.edit5,'String',Px1);
set(handles.edit6,'String',Py1);
VOLKAN AYGL
VOLKAN AYGL
VOLKAN AYGL
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
10
VOLKAN AYGL
11
VOLKAN AYGL
%
double
12