437 |
|
pview = ourview; |
438 |
|
switch (ourview.type) { |
439 |
|
case VT_PER: |
440 |
< |
pview.horiz = 2.*180./PI*atan( |
441 |
< |
tan(PI/180./2.*ourview.horiz)/hmult ); |
442 |
< |
pview.vert = 2.*180./PI*atan( |
443 |
< |
tan(PI/180./2.*ourview.vert)/vmult ); |
440 |
> |
pview.horiz = (2.*180./PI)*atan( |
441 |
> |
tan((PI/180./2.)*ourview.horiz)/hmult ); |
442 |
> |
pview.vert = (2.*180./PI)*atan( |
443 |
> |
tan((PI/180./2.)*ourview.vert)/vmult ); |
444 |
|
break; |
445 |
|
case VT_PAR: |
446 |
|
case VT_ANG: |
449 |
|
break; |
450 |
|
case VT_CYL: |
451 |
|
pview.horiz = ourview.horiz / hmult; |
452 |
< |
pview.vert = 2.*180./PI*atan( |
453 |
< |
tan(PI/180./2.*ourview.vert)/vmult ); |
452 |
> |
pview.vert = (2.*180./PI)*atan( |
453 |
> |
tan((PI/180./2.)*ourview.vert)/vmult ); |
454 |
|
break; |
455 |
|
case VT_HEM: |
456 |
< |
pview.horiz = 2.*180./PI*asin( |
457 |
< |
sin(PI/180./2.*ourview.horiz)/hmult ); |
458 |
< |
pview.vert = 2.*180./PI*asin( |
459 |
< |
sin(PI/180./2.*ourview.vert)/vmult ); |
456 |
> |
pview.horiz = (2.*180./PI)*asin( |
457 |
> |
sin((PI/180./2.)*ourview.horiz)/hmult ); |
458 |
> |
pview.vert = (2.*180./PI)*asin( |
459 |
> |
sin((PI/180./2.)*ourview.vert)/vmult ); |
460 |
> |
break; |
461 |
> |
case VT_PLS: |
462 |
> |
pview.horiz = sin((PI/180./2.)*ourview.horiz) / |
463 |
> |
(1.0 + cos((PI/180./2.)*ourview.horiz)) / hmult; |
464 |
> |
pview.horiz *= pview.horiz; |
465 |
> |
pview.horiz = (2.*180./PI)*acos((1. - pview.horiz) / |
466 |
> |
(1. + pview.horiz)); |
467 |
> |
pview.vert = sin((PI/180./2.)*ourview.vert) / |
468 |
> |
(1.0 + cos((PI/180./2.)*ourview.vert)) / vmult; |
469 |
> |
pview.vert *= pview.vert; |
470 |
> |
pview.vert = (2.*180./PI)*acos((1. - pview.vert) / |
471 |
> |
(1. + pview.vert)); |
472 |
|
break; |
473 |
|
default: |
474 |
|
fprintf(stderr, "%s: unknown view type '-vt%c'\n", |