projected_box_metrics Subroutine

public subroutine projected_box_metrics(azim, elev, dist, x_min, x_max, y_min, y_max, width_px_per_data, height_px_per_data, map)

Build the aspect-preserving projection map for one 3D axes box.

Projects the unit cube, then chooses a single pixel scale so the projected box fits the data window in pixel space (the window spans width_px_per_datarange_x by height_px_per_datarange_y pixels) while preserving the projected aspect ratio and centering the box.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: azim
real(kind=wp), intent(in) :: elev
real(kind=wp), intent(in) :: dist
real(kind=wp), intent(in) :: x_min
real(kind=wp), intent(in) :: x_max
real(kind=wp), intent(in) :: y_min
real(kind=wp), intent(in) :: y_max
real(kind=wp), intent(in) :: width_px_per_data
real(kind=wp), intent(in) :: height_px_per_data
type(projected_axes_map_t), intent(out) :: map