Learn R Programming

radsafer (version 2.4.0)

mcnp_matrix_rotations: Rotation matrices for transformations in MCNP

Description

Create 3 x 3 rotation matrix in cosines of the angles between the main and auxiliary coordinate systems in the form: xx' yx' zx' xy' yy' zy' xz' yz' zz'

Usage

mcnp_matrix_rotations(rot.axis, angle_degrees)

Value

rotational matrix for copy and paste to MCNP input

Arguments

rot.axis

axis of rotation

angle_degrees

degree of rotation

See Also

Other mcnp tools: mcnp_cone_angle(), mcnp_est_nps(), mcnp_mesh_bins(), mcnp_plot_out_spec(), mcnp_scan2plot(), mcnp_scan_save(), mcnp_sdef_erg_hist(), mcnp_sdef_erg_line()

Examples

Run this code
mcnp_matrix_rotations("x", 30)
mcnp_matrix_rotations("y", 7)
mcnp_matrix_rotations("z", 15)
# For combined rotations, use matrix multiplication (%*%)
# rotate 45 degrees on x-axis and 45 degrees on y-axis
mcnp_matrix_rotations("x", 45) %*% mcnp_matrix_rotations("y", 45)

Run the code above in your browser using DataLab