Ignore:
Timestamp:
Mar 21, 2019, 6:35:43 PM (5 years ago)
Author:
sommeria
Message:

bugs repaired, still problems with geometry_calib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/proj_field.m

    r1061 r1062  
    574574        NbSegment=0;
    575575    case 'rectangle'
    576         LineCoord([1 4],1)=ObjectData.Coord(1,1)-ObjectData.RangeX;
    577         LineCoord([1 2],2)=ObjectData.Coord(1,2)-ObjectData.RangeY;
    578         LineCoord([2 3],1)=ObjectData.Coord(1,1)+ObjectData.RangeX;
    579         LineCoord([4 1],2)=ObjectData.Coord(1,2)+ObjectData.RangeY;
     576        LineCoord([1 4],1)=ObjectData.Coord(1,1)-ObjectData.num_RangeX_2;
     577        LineCoord([1 2],2)=ObjectData.Coord(1,2)-ObjectData.num_RangeX_2;
     578        LineCoord([2 3],1)=ObjectData.Coord(1,1)+ObjectData_RangeX_2;
     579        LineCoord([4 1],2)=ObjectData.Coord(1,2)+ObjectData.RangeY-Y2;
    580580    case 'polygon'
    581581        LineCoord(NbPoints+1)=LineCoord(1);
     
    16101610                    ProjData.(AXName)=[coord_x_proj(1) coord_x_proj(end)]; %record the new (projected ) x coordinates
    16111611                    [X,YI]=meshgrid(coord_x_proj,coord_y_proj);%grid in the new coordinates
    1612                     XI=ObjectData.Coord(1,1)+(X)*cos(PlaneAngle(2))-YI*sin(PlaneAngle(1));%corresponding coordinates in the original system
    1613                     YI=ObjectData.Coord(1,2)+(X)*sin(PlaneAngle(2))+YI*cos(PlaneAngle(1));
     1612                    XI=ObjectData.Coord(1,1)+(X)*cos(PlaneAngle(1))-YI*sin(PlaneAngle(1));%corresponding coordinates in the original system
     1613                    YI=ObjectData.Coord(1,2)+(X)*sin(PlaneAngle(1))+YI*cos(PlaneAngle(1));
    16141614                   
    16151615                    if numel(Coord{1})==2% x coordinate defined by its bounds, get the whole set
Note: See TracChangeset for help on using the changeset viewer.