Changeset 1060 for trunk/src/set_object.m
- Timestamp:
- Dec 19, 2018, 10:16:08 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_object.m
r1059 r1060 165 165 % if isfield(data,'Angle') && isequal(numel(data.Angle),3) 166 166 set(handles.num_Angle_1,'String',num2str(data.Angle(1))) 167 set(handles.num_Angle_2,'String',num2str(data.Angle(2)))167 % set(handles.num_Angle_2,'String',num2str(data.Angle(2))) 168 168 % set(handles.num_Angle_3,'String',num2str(data.Angle(3))) 169 169 % end … … 332 332 set(handles.num_RangeY_2,'TooltipString',['num_RangeY_2: half width of the ' ObjectStyle]) 333 333 case {'plane','plane_z'} 334 set(handles.num_Angle_ 3,'Visible','on')334 set(handles.num_Angle_1,'Visible','on') 335 335 set(handles.num_RangeX_1,'Visible','on') 336 336 set(handles.num_RangeX_2,'Visible','on') … … 418 418 PlaneAngle(2)=str2num(get(handles.num_Angle_2,'String'));%second angle in degrees 419 419 %PlaneAngle(3)=str2num(get(handles.num_Angle_3,'String'));%second angle in degrees 420 om=norm(PlaneAngle);%norm of rotation angle in radians 421 OmAxis=PlaneAngle/om; %unit vector marking the rotation axis 422 cos_om=cos(pi*om/180); 423 sin_om=sin(pi*om/180); 424 coeff=OmAxis(3)*(1-cos_om); 420 % om=norm(PlaneAngle);%norm of rotation angle in radians 421 % OmAxis=PlaneAngle/om; %unit vector marking the rotation axis 422 cos_om1=cos(pi*PlaneAngle(1)/180); 423 sin_om1=sin(pi*PlaneAngle(1)/180); 424 cos_om2=cos(pi*PlaneAngle(2)/180); 425 sin_om2=sin(pi*PlaneAngle(2)/180); 425 426 %components of the unity vector norm_plane normal to the projection plane 426 norm_plane(1)=OmAxis(1)*coeff+OmAxis(2)*sin_om;427 norm_plane(2)=OmAxis(2)*coeff-OmAxis(1)*sin_om;428 norm_plane(3)=OmAxis(3)*coeff+cos_om;427 % norm_plane(1)=OmAxis(1)*coeff+OmAxis(2)*sin_om; 428 % norm_plane(2)=OmAxis(2)*coeff-OmAxis(1)*sin_om; 429 % norm_plane(3)=OmAxis(3)*coeff+cos_om; 429 430 huvmat=findobj('Tag','uvmat');%find the current uvmat interface handle 430 431 UvData=get(huvmat,'UserData');%Data associated to the current uvmat interface 431 432 if isfield(UvData,'X') && isfield(UvData,'Y') && isfield(UvData,'Z') 432 Z= norm_plane(1)*(UvData.X)+norm_plane(2)*(UvData.Y)+norm_plane(3)*(UvData.Z);433 Z=sin_om2*(cos_om1*(UvData.X)+sin_om1*(UvData.Y))+cos_om2*(UvData.Z); 433 434 set(handles.z_slider,'Min',min(Z)) 434 435 set(handles.z_slider,'Max',max(Z))
Note: See TracChangeset
for help on using the changeset viewer.