grid_view_level
grid_view_level(grid, level, alpha = 1, color_p = PT.Color[["O"]], color_n = PT.Color[["N"]], ...)
grid | |
---|---|
level | |
alpha | |
color_p | |
color_n | |
… |
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as function (grid, level, alpha = 1, color_p = PT.Color[["O"]], color_n = PT.Color[["N"]], ...) { positive_present <- FALSE negative_present <- FALSE for (igridx in 1:grid$ngridx) { for (igridy in 1:grid$ngridy) { for (igridz in 1:grid$ngridz) { v <- grid$val[igridx, igridy, igridz] if (v > level) { positive_present <- TRUE } if (-v > level) { negative_present <- TRUE } if (positive_present && negative_present) break } } } val <- grid$val if (positive_present) { contour3d(grid$val, level, grid$gridx, grid$gridy, grid$gridz, color = color_p, add = TRUE, alpha = alpha, ...) } if (negative_present) { contour3d(-val, level, grid$gridx, grid$gridy, grid$gridz, color = color_n, add = TRUE, alpha = alpha, ...) } }#> function (grid, level, alpha = 1, color_p = PT.Color[["O"]], #> color_n = PT.Color[["N"]], ...) #> { #> positive_present <- FALSE #> negative_present <- FALSE #> for (igridx in 1:grid$ngridx) { #> for (igridy in 1:grid$ngridy) { #> for (igridz in 1:grid$ngridz) { #> v <- grid$val[igridx, igridy, igridz] #> if (v > level) { #> positive_present <- TRUE #> } #> if (-v > level) { #> negative_present <- TRUE #> } #> if (positive_present && negative_present) #> break #> } #> } #> } #> val <- grid$val #> if (positive_present) { #> contour3d(grid$val, level, grid$gridx, grid$gridy, grid$gridz, #> color = color_p, add = TRUE, alpha = alpha, ...) #> } #> if (negative_present) { #> contour3d(-val, level, grid$gridx, grid$gridy, grid$gridz, #> color = color_n, add = TRUE, alpha = alpha, ...) #> } #> } #> <environment: 0x10fc0d660>