Changeset 966 for trunk/src/mouse_down.m


Ignore:
Timestamp:
Jul 9, 2016, 10:02:57 PM (8 years ago)
Author:
sommeria
Message:

3D projection improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_down.m

    r955 r966  
    436436        Delta_x=(xy(1,1)-ObjectData.Coord(1,1));%displacement along x
    437437        Delta_y=(xy(1,2)-ObjectData.Coord(1,2));%displacement along y
    438         Delta_mod=sqrt(Delta_x*Delta_x+Delta_y*Delta_y);%modulus of displacement
    439         ObjectData.Angle(1)=90*Delta_x/Delta_mod;
    440         ObjectData.Angle(2)=90*Delta_y/Delta_mod;
    441         ObjectData.Angle(3)=0;% plane rotated by 90 ° along the axis of mouse displacement since the origin
     438        ObjectData.Angle(1)=(180/pi)*angle(Delta_x+i*Delta_y);
     439        ObjectData.Angle(2)=90;       
    442440        set(hh_set_object.num_Angle_1,'String',num2str(ObjectData.Angle(1)))
    443441        set(hh_set_object.num_Angle_2,'String',num2str(ObjectData.Angle(2)))
    444         set(hh_set_object.num_Angle_3,'String',num2str(ObjectData.Angle(3)))
    445442        drawing_status='off';
    446443    else
Note: See TracChangeset for help on using the changeset viewer.