亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? polygoncutter.m

?? 自己編寫的 matlab gui 可以實現(xiàn)任意多邊形定點參數(shù)輸入 然后使用Sutherland_Hodgeman等算法進行多邊形被矩形截取的演示程序
?? M
字號:
function varargout = Polygoncutter(varargin)
% POLYGONCUTTER M-file for Polygoncutter.fig
%      POLYGONCUTTER, by itself, creates a new POLYGONCUTTER or raises the existing
%      singleton*.
%
%      H = POLYGONCUTTER returns the handle to a new POLYGONCUTTER or the handle to
%      the existing singleton*.
%
%      POLYGONCUTTER('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in POLYGONCUTTER.M with the given input arguments.
%
%      POLYGONCUTTER('Property','Value',...) creates a new POLYGONCUTTER or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before Polygoncutter_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to Polygoncutter_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 Polygoncutter

% Last Modified by GUIDE v2.5 09-Nov-2007 21:07:00

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Polygoncutter_OpeningFcn, ...
                   'gui_OutputFcn',  @Polygoncutter_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 Polygoncutter is made visible.
function Polygoncutter_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 Polygoncutter (see VARARGIN)
zonepoint=str2num(get(handles.zonepointedit,'string'));
x=zonepoint(1);
y=zonepoint(2);
p=str2num(get(handles.polypointedit,'string'));
pp=[p;p(1,:)];
plot(pp(:,1),pp(:,2),'b');hold on;
plot([0 0 x x 0],[0 y y 0 0],'r');hold on;
grid on;


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

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Polygoncutter wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = Polygoncutter_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;



function zonepointedit_Callback(hObject, eventdata, handles)
% hObject    handle to zonepointedit (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,'String') returns contents of zonepointedit as text
%        str2double(get(hObject,'String')) returns contents of zonepointedit as a double


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

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function polypointedit_Callback(hObject, eventdata, handles)
% hObject    handle to polypointedit (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,'String') returns contents of polypointedit as text
%        str2double(get(hObject,'String')) returns contents of polypointedit as a double


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

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in exe.
function exe_Callback(hObject, eventdata, handles)
% hObject    handle to exe (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
format short;
h=findobj('color','b');
delete(h);
h=findobj('color','g');
delete(h);
h=findobj('color','k');
delete(h);

zonepoint=str2num(get(handles.zonepointedit,'string'));
x=zonepoint(1);
y=zonepoint(2);
p=str2num(get(handles.polypointedit,'string'));
[row,len]=size(p);
p=reshape(p,(row*len/2),2);
pp=[p;p(1,:)];
plot(pp(:,1),pp(:,2),'b');hold on;
plot([0 0 x x 0],[0 y y 0 0],'r');hold on;
grid on;

error=0.0001;
[n,dim]=size(p);

j=1;
i=str2num(get(handles.edgechange,'string'));
for k=1:n+1
    bit2and=2^(i-1);
    temp(k)=getzonecode(zonepoint,pp(k,:));  %get the all the point's code grouped by 1st line
    code(k)=bitand(temp(k),bit2and);
end
    
for k=1:n
    judge1=bitand(code(k),code(k+1));
    if judge1~=0     %this line is totally unvisible,record no points
    else
        if code(k)==0&&code(k+1)==0   %this line is totally visible,keep the terminal point
        output(j,:)=pp(k+1,:);
        j=j+1;
        
        elseif code(k)==0&&code(k+1)~=0   %this line has only p1 in area while p2 outside
        sectpoint=intersectp(pp(k,:),pp(k+1,:),zonepoint,error,bit2and,0);
        output(j,:)=sectpoint;
        j=j+1;
            
        else %this line has only p2 in area while p1 outside
        sectpoint=intersectp(pp(k,:),pp(k+1,:),zonepoint,error,bit2and,1);
        output(j,:)=sectpoint;
        j=j+1;
        output(j,:)=pp(k+1,:);
        j=j+1;
        end
    end
end
output=[output;output(1,:)];
[row,len]=size(output);
polypoint=reshape(output,1,row*len);
polystr=num2str(polypoint);
set(handles.polypointedit,'string',polystr);
plot(output(:,1),output(:,2),'k *');hold on;
plot(output(:,1),output(:,2),'g -.');hold on;
axis auto;
i=i+1;
set(handles.edgechange,'string',i);
if i==5
    set(handles.exe,'enable','off');
    h=findobj('color','b');
    delete(h);
end

% --- Executes on button press in credit.
function credit_Callback(hObject, eventdata, handles)
% hObject    handle to credit (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
set(handles.zonepointedit,'string','10 10');
set(handles.polypointedit,'string','5 15;15 10;5 -5;-2 5');
delete(get(handles.axes,'children'));
set(handles.exe,'enable','on');
set(handles.edgechange,'string','1');




function edgechange_Callback(hObject, eventdata, handles)
% hObject    handle to edgechange (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,'String') returns contents of edgechange as text
%        str2double(get(hObject,'String')) returns contents of edgechange as a double


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

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end





function saver_Callback(hObject, eventdata, handles)
% hObject    handle to saver (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,'String') returns contents of saver as text
%        str2double(get(hObject,'String')) returns contents of saver as a double


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

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本久久电影网| 久久综合久久综合久久综合| 欧美日本一道本在线视频| 欧美成人高清电影在线| 亚洲另类中文字| 韩国三级中文字幕hd久久精品| 不卡区在线中文字幕| 精品久久人人做人人爽| 亚洲一级在线观看| www.在线欧美| 日本一区二区视频在线| 亚洲一级片在线观看| 国产成人精品免费看| 欧美男男青年gay1069videost| 中文字幕第一区第二区| 欧美aa在线视频| 欧美视频一区二区三区在线观看| 中文字幕第一区二区| 国产一区在线视频| 欧美电影免费观看高清完整版在线观看| 亚洲成人免费在线| 国产成人免费视频网站| 精品不卡在线视频| 久久99这里只有精品| 日韩精品中文字幕一区二区三区 | 欧美国产激情一区二区三区蜜月| 日一区二区三区| 精品视频1区2区| 一区二区三区日韩欧美精品| 色综合久久综合网97色综合| 国产精品美女视频| 顶级嫩模精品视频在线看| 久久精品亚洲一区二区三区浴池| 美女视频网站久久| 精品久久久久香蕉网| 国产一区二区三区在线观看精品 | 欧美国产精品v| 国产精品白丝jk黑袜喷水| 久久嫩草精品久久久久| 国产真实精品久久二三区| 久久亚洲捆绑美女| 高清不卡一区二区在线| 中文字幕欧美激情一区| 成人aa视频在线观看| 综合av第一页| 日本韩国一区二区三区视频| 一区二区三区在线播放| 欧美日本在线播放| 奇米色一区二区三区四区| 日韩一区二区在线播放| 久久疯狂做爰流白浆xx| 国产三级欧美三级日产三级99| 国产高清视频一区| 日韩一区欧美小说| 欧美亚洲免费在线一区| 日韩avvvv在线播放| 精品国产三级电影在线观看| 国产在线精品一区二区夜色 | 中文字幕亚洲电影| 91片黄在线观看| 亚洲一区二区三区四区在线观看| 在线成人av网站| 国产乱码精品一区二区三区av | 国产老肥熟一区二区三区| 欧美激情一区二区三区不卡| 91丝袜美腿高跟国产极品老师| 亚洲激情成人在线| 日韩欧美高清dvd碟片| 成人在线视频一区二区| 亚洲国产视频a| 精品国产一区二区三区久久影院| 99视频在线精品| 日本成人在线网站| 欧美国产欧美综合| 6080国产精品一区二区| 高清成人免费视频| 日韩av网站在线观看| 国产精品国产自产拍高清av | 亚洲蜜臀av乱码久久精品| 亚洲视频在线一区观看| 欧美精品一二三区| 成人丝袜18视频在线观看| 亚洲成人三级小说| 中文字幕日韩av资源站| 欧美va日韩va| 欧美日韩激情在线| jvid福利写真一区二区三区| 老色鬼精品视频在线观看播放| 国产精品国产三级国产普通话99| 69堂成人精品免费视频| 色八戒一区二区三区| 国产一区91精品张津瑜| 亚洲一区国产视频| 国产精品情趣视频| 欧美xingq一区二区| 欧美性欧美巨大黑白大战| 粉嫩aⅴ一区二区三区四区五区| 日韩二区三区四区| 国产精品久久毛片av大全日韩| 日韩一区二区三区四区| 91福利小视频| 91啪在线观看| 91在线视频免费观看| 国产精品综合在线视频| 精品制服美女丁香| 日本免费新一区视频| 天天免费综合色| 亚洲午夜av在线| 亚洲一区二区成人在线观看| 亚洲欧美一区二区三区极速播放| 国产欧美日本一区二区三区| wwwwww.欧美系列| 欧美电视剧免费全集观看| 在线成人高清不卡| 在线播放欧美女士性生活| 欧美三级电影精品| 欧美日韩色一区| 欧美精品丝袜中出| 91精品久久久久久久99蜜桃 | 岛国一区二区在线观看| 国产做a爰片久久毛片| 国产一区欧美一区| 国产成人精品免费| 成人精品免费网站| 99久久精品99国产精品| 91在线免费看| 久久精品男人的天堂| 久久久久国色av免费看影院| 久久综合成人精品亚洲另类欧美 | 欧美日韩精品福利| 91精品国模一区二区三区| 欧美α欧美αv大片| 久久影院午夜片一区| 日本一区二区视频在线观看| 国产精品久久三| 亚洲最大色网站| 奇米888四色在线精品| 国产一区二区三区四区五区美女| 国产91丝袜在线播放九色| 97久久精品人人做人人爽| 在线观看日韩毛片| 日韩情涩欧美日韩视频| 久久久影院官网| 又紧又大又爽精品一区二区| 午夜在线电影亚洲一区| 黄网站免费久久| 成人黄页毛片网站| 欧美精品xxxxbbbb| 国产丝袜在线精品| 一区二区在线观看视频| 久久精品国产一区二区三 | 日本女人一区二区三区| 极品少妇xxxx精品少妇| 97久久久精品综合88久久| 欧美一区二区在线不卡| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产精品动漫网站| 日韩在线卡一卡二| 丁香一区二区三区| 欧美精品一二三区| 国产精品久久久久婷婷| 午夜久久久影院| 成人免费精品视频| 日韩一区二区三区观看| 中文字幕一区二区在线观看| 爽好多水快深点欧美视频| 国产91精品入口| 欧美顶级少妇做爰| 综合久久给合久久狠狠狠97色| 日本va欧美va欧美va精品| 91毛片在线观看| 国产午夜精品久久久久久免费视| 一二三区精品福利视频| 日韩一级二级三级| 日韩美女视频19| 国产精品一区二区男女羞羞无遮挡 | 日韩免费看网站| 亚洲一区二区免费视频| 99久久99久久久精品齐齐| 欧美va亚洲va国产综合| 日日嗨av一区二区三区四区| 91首页免费视频| 国产精品嫩草99a| 精品一区二区国语对白| 在线不卡的av| 亚洲国产精品一区二区www在线| 成人美女视频在线观看18| 日韩三级免费观看| 午夜精品一区二区三区电影天堂 | 中文字幕欧美日韩一区| 国产一区二区按摩在线观看| 日韩一卡二卡三卡国产欧美| 一区二区三区**美女毛片| 91在线视频网址| 成人欧美一区二区三区视频网页| 国产自产视频一区二区三区| 欧美成人伊人久久综合网| 日韩精品久久理论片| 在线不卡中文字幕播放| 奇米精品一区二区三区四区|