cross Function

public pure function cross(a, b) result(c)

The cross product a x b.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: a(3)

the vectors

real(kind=wp), intent(in) :: b(3)

the vectors

Return Value real(kind=wp), (3)


Called by

proc~~cross~~CalledByGraph proc~cross cross proc~arrow arrow proc~arrow->proc~cross proc~camera_orientation camera_orientation proc~camera_orientation->proc~cross proc~make_cone_look_at PolyhedralCone%make_cone_look_at proc~make_cone_look_at->proc~cross proc~pick_camera pick_camera proc~pick_camera->proc~cross proc~quat_from_vectors quat_from_vectors proc~quat_from_vectors->proc~cross proc~quat_rotate quat_rotate proc~quat_rotate->proc~cross proc~unit_normal unit_normal proc~unit_normal->proc~cross proc~update_arrow update_arrow proc~update_arrow->proc~cross proc~vertex_normals vertex_normals proc~vertex_normals->proc~cross proc~arrow_create arrow_create proc~arrow_create->proc~arrow proc~camera_between camera_between proc~camera_between->proc~camera_orientation proc~make_polyhedron make_polyhedron proc~make_polyhedron->proc~unit_normal proc~make_polyhedron->proc~vertex_normals proc~place place proc~place->proc~quat_from_vectors proc~set_display_scale VectorHandle%set_display_scale proc~set_display_scale->proc~update_arrow proc~set_head_size VectorHandle%set_head_size proc~set_head_size->proc~update_arrow proc~set_vector VectorHandle%set_vector proc~set_vector->proc~update_arrow proc~unit_part unit_part proc~unit_part->proc~arrow proc~vector_build_contents VectorHandle%vector_build_contents proc~vector_build_contents->proc~update_arrow proc~vector_build_contents->proc~unit_part proc~view_camera view_camera proc~view_camera->proc~pick_camera proc~get_camera WindowProxy%get_camera proc~view_camera->proc~get_camera proc~world_to_view View%world_to_view proc~world_to_view->proc~quat_from_vectors proc~cursor_ray WindowProxy%cursor_ray proc~cursor_ray->proc~view_camera proc~fly fly proc~fly->proc~camera_between proc~fly->proc~world_to_view proc~get_camera->proc~world_to_view proc~home View%home proc~home->proc~world_to_view proc~make_axis make_axis proc~make_axis->proc~arrow_create proc~place_camera place_camera proc~place_camera->proc~world_to_view proc~place_camera->proc~fly proc~place_camera->proc~home proc~poly_build_contents Polyhedron%poly_build_contents proc~poly_build_contents->proc~make_polyhedron proc~poly_set_draw_mode Polyhedron%poly_set_draw_mode proc~poly_set_draw_mode->proc~make_polyhedron proc~poly_set_line_color Polyhedron%poly_set_line_color proc~poly_set_line_color->proc~make_polyhedron proc~poly_set_line_width Polyhedron%poly_set_line_width proc~poly_set_line_width->proc~make_polyhedron proc~poly_set_opacity Polyhedron%poly_set_opacity proc~poly_set_opacity->proc~make_polyhedron proc~remove_vertex_colors Polyhedron%remove_vertex_colors proc~remove_vertex_colors->proc~make_polyhedron proc~screen_position WindowProxy%screen_position proc~screen_position->proc~view_camera proc~set_camera WindowProxy%set_camera proc~set_camera->proc~world_to_view proc~set_edges Polyhedron%set_edges proc~set_edges->proc~make_polyhedron proc~set_face_color Polyhedron%set_face_color proc~set_face_color->proc~make_polyhedron proc~set_faces Polyhedron%set_faces proc~set_faces->proc~make_polyhedron proc~set_grid Polyhedron%set_grid proc~set_grid->proc~make_polyhedron proc~set_lit Polyhedron%set_lit proc~set_lit->proc~make_polyhedron proc~set_point_color Polyhedron%set_point_color proc~set_point_color->proc~make_polyhedron proc~set_point_size Polyhedron%set_point_size proc~set_point_size->proc~make_polyhedron proc~set_smooth Polyhedron%set_smooth proc~set_smooth->proc~make_polyhedron proc~set_triangles Polyhedron%set_triangles proc~set_triangles->proc~make_polyhedron proc~set_two_sided Polyhedron%set_two_sided proc~set_two_sided->proc~make_polyhedron proc~set_vertex_colors Polyhedron%set_vertex_colors proc~set_vertex_colors->proc~make_polyhedron proc~set_vertices Polyhedron%set_vertices proc~set_vertices->proc~make_polyhedron proc~shadow_late_update ShadowCones%shadow_late_update proc~shadow_late_update->proc~place proc~track_view track_view proc~track_view->proc~world_to_view proc~vector_move_handle_point VectorHandle%vector_move_handle_point proc~vector_move_handle_point->proc~set_vector proc~window_pick WindowProxy%window_pick proc~window_pick->proc~view_camera proc~build_decorations build_decorations proc~build_decorations->proc~make_axis proc~drag_handle drag_handle proc~drag_handle->proc~cursor_ray proc~frame WindowProxy%frame proc~frame->proc~place_camera proc~frame->proc~track_view proc~realize ReferenceFrame%realize proc~frame->proc~realize proc~dispatch_events dispatch_events proc~frame->proc~dispatch_events proc~grab_handle grab_handle proc~grab_handle->proc~cursor_ray proc~hover_handle hover_handle proc~hover_handle->proc~window_pick proc~move_axis move_axis proc~move_axis->proc~make_axis proc~remake_axes remake_axes proc~remake_axes->proc~make_axis proc~set_x_label ReferenceFrame%set_x_label proc~set_x_label->proc~make_axis proc~set_y_label ReferenceFrame%set_y_label proc~set_y_label->proc~make_axis proc~set_z_label ReferenceFrame%set_z_label proc~set_z_label->proc~make_axis proc~dispatch_event dispatch_event proc~dispatch_event->proc~drag_handle proc~dispatch_event->proc~grab_handle proc~dispatch_event->proc~hover_handle proc~release_handle release_handle proc~dispatch_event->proc~release_handle proc~move_x_axis ReferenceFrame%move_x_axis proc~move_x_axis->proc~move_axis proc~move_y_axis ReferenceFrame%move_y_axis proc~move_y_axis->proc~move_axis proc~move_z_axis ReferenceFrame%move_z_axis proc~move_z_axis->proc~move_axis proc~realize->proc~build_decorations proc~realize->proc~realize proc~relayout_labels relayout_labels proc~relayout_labels->proc~remake_axes proc~release_handle->proc~hover_handle proc~resize WindowProxy%resize proc~resize->proc~frame proc~run WindowProxy%run proc~run->proc~frame proc~set_color~2 ReferenceFrame%set_color proc~set_color~2->proc~remake_axes proc~set_label_font ReferenceFrame%set_label_font proc~set_label_font->proc~remake_axes proc~add_child ReferenceFrame%add_child proc~add_child->proc~realize proc~axes_set_color CoordinateAxes%axes_set_color proc~axes_set_color->proc~set_color~2 proc~dispatch_events->proc~dispatch_event proc~grid_set_color LatLonGrid%grid_set_color proc~grid_set_color->proc~set_color~2 proc~new_reference_frame new_reference_frame proc~new_reference_frame->proc~set_color~2 proc~place_axes place_axes proc~place_axes->proc~move_x_axis proc~place_axes->proc~move_y_axis proc~place_axes->proc~move_z_axis proc~place_grid_axes place_grid_axes proc~place_grid_axes->proc~move_x_axis proc~place_grid_axes->proc~move_y_axis proc~place_grid_axes->proc~move_z_axis proc~segments_set_color CustomLineSegments%segments_set_color proc~segments_set_color->proc~set_color~2 proc~set_label_alignment ReferenceFrame%set_label_alignment proc~set_label_alignment->proc~relayout_labels proc~set_label_size ReferenceFrame%set_label_size proc~set_label_size->proc~relayout_labels proc~sphere_set_color Sphere%sphere_set_color proc~sphere_set_color->proc~set_color~2 proc~time_set_color TimeHandle%time_set_color proc~time_set_color->proc~set_color~2 proc~vector_set_color VectorHandle%vector_set_color proc~vector_set_color->proc~set_color~2 interface~referenceframe ReferenceFrame interface~referenceframe->proc~new_reference_frame proc~grid_set_parameters LatLonGrid%grid_set_parameters proc~grid_set_parameters->proc~place_grid_axes proc~new_coordinate_axes new_coordinate_axes proc~new_coordinate_axes->proc~place_axes proc~new_lat_lon_grid new_lat_lon_grid proc~new_lat_lon_grid->proc~place_grid_axes proc~new_radial_plane new_radial_plane proc~new_radial_plane->proc~place_axes proc~plane_set_parameters RadialPlane%plane_set_parameters proc~plane_set_parameters->proc~place_axes proc~set_axis_length CoordinateAxes%set_axis_length proc~set_axis_length->proc~place_axes interface~coordinateaxes CoordinateAxes interface~coordinateaxes->proc~new_coordinate_axes interface~latlongrid LatLonGrid interface~latlongrid->proc~new_lat_lon_grid interface~radialplane RadialPlane interface~radialplane->proc~new_radial_plane

Source Code

    pure function cross(a, b) result(c)
        real(wp), intent(in) :: a(3), b(3)              !! the vectors
        real(wp) :: c(3)
        c = [a(2) * b(3) - a(3) * b(2), a(3) * b(1) - a(1) * b(3), a(1) * b(2) - a(2) * b(1)]
    end function cross