fortplot_3d_box Module

3D box frame rendering: back panes, pane gridlines, and box spines.

Selects which of the cube's six panes face away from the viewer using the per-corner camera depth, fills those back panes light gray, draws their gridlines, and strokes the full twelve-edge box. Drawn before the data so panes and gridlines sit behind it, matching matplotlib mplot3d.



Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: CORNER_MIN_MIN_MIN = 1
integer, public, parameter :: CORNER_MAX_MIN_MIN = 2
integer, public, parameter :: CORNER_MAX_MAX_MIN = 3
integer, public, parameter :: CORNER_MIN_MAX_MIN = 4
integer, public, parameter :: CORNER_MIN_MIN_MAX = 5
integer, public, parameter :: CORNER_MAX_MIN_MAX = 6
integer, public, parameter :: CORNER_MAX_MAX_MAX = 7
integer, public, parameter :: CORNER_MIN_MAX_MAX = 8

Subroutines

public subroutine draw_back_panes(ctx, corners_2d, corners_depth)

Fill the three back-facing panes with light gray, behind the data.

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: ctx
real(kind=wp), intent(in) :: corners_2d(2,8)
real(kind=wp), intent(in) :: corners_depth(8)

public subroutine draw_pane_gridlines(ctx, corners_2d, corners_depth, frac, n_frac)

Draw gridlines across each back pane at the per-axis tick fractions, one line per tick, in light gray (matplotlib mplot3d).

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: ctx
real(kind=wp), intent(in) :: corners_2d(2,8)
real(kind=wp), intent(in) :: corners_depth(8)
real(kind=wp), intent(in) :: frac(MAX_TICKS_PER_AXIS,3)
integer, intent(in) :: n_frac(3)

public subroutine draw_back_spines(ctx, corners_2d, corners_depth)

Draw the box edges that lie behind the data (mean edge depth below the cube center). These render before the data so the data paints over them.

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: ctx
real(kind=wp), intent(in) :: corners_2d(2,8)
real(kind=wp), intent(in) :: corners_depth(8)

public subroutine draw_front_spines(ctx, corners_2d, corners_depth)

Draw the box edges in front of the data (mean edge depth above the cube center). These render after the data so they occlude it, matching the global painter ordering of matplotlib mplot3d.

Arguments

Type IntentOptional Attributes Name
class(plot_context), intent(inout) :: ctx
real(kind=wp), intent(in) :: corners_2d(2,8)
real(kind=wp), intent(in) :: corners_depth(8)