-
Notifications
You must be signed in to change notification settings - Fork 0
/
CFtoBF_term.m
45 lines (31 loc) · 1.06 KB
/
CFtoBF_term.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function [coord_BF_l, rays_BF_l, coord_BF_t, rays_BF_t] = CFtoBF_term(CB, R, edge_points,edge_points_t, edge_rays,edge_rays_t)
rays_BF_l = [];
coord_BF_l = [];
rays_BF_t = [];
coord_BF_t = [];
BC = CB';
%fudge factor to eliminate silhouette overlap
%gonna push terminator by like 0.001 degrees
%incorporate a translation between the frames
%points first
% edge_points(:,3) = edge_points(:,3) + 100;
% %now rays
% edge_rays(:,3) = edge_rays(:,3) + 100;
% edge_rays(:,6) = edge_rays(:,6) + 100;
for i = 1:length(edge_rays)
rays_BF_l(i,1:3) = (BC*(edge_rays(i,1:3))')';
rays_BF_l(i,4:6) = (BC*(edge_rays(i,4:6))')';
% rays_BF_l(i,7) = 0;
coord_BF_l(i,1:3) = (BC*(edge_points(i,:))')';
% coord_BF_l(i,4) = 0;
end
for i = 1:length(edge_rays_t)
rays_BF_t(i,1:3) = (BC*R*(edge_rays_t(i,1:3))')';
rays_BF_t(i,4:6) = (BC*R*(edge_rays_t(i,4:6))')';
% rays_BF_t(i,7) = 1;
coord_BF_t(i,1:3) = (BC*R*(edge_points_t(i,:))')';
% coord_BF_t(i,4) = 0;
end
% rays_BF = [rays_BF_l;rays_BF_t];
% coord_BF = [coord_BF; coord_BF_t];
end