new_sphere Function

private function new_sphere(name, radius, color) result(s)

A sphere named name, of radius radius (default 1) and color color ([r, g, b] or [r, g, b, a]; default white, 90% opaque).

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

the frame's name

real(kind=wp), intent(in), optional :: radius

scene units (default 1)

real(kind=wp), intent(in), optional :: color(:)

[r, g, b] or [r, g, b, a] (0 to 1)

Return Value type(Sphere)


Called by

proc~~new_sphere~~CalledByGraph proc~new_sphere new_sphere interface~sphere Sphere interface~sphere->proc~new_sphere

Source Code

    function new_sphere(name, radius, color) result(s)
        character(len=*), intent(in) :: name                !! the frame's name
        real(wp), intent(in), optional :: radius            !! scene units (default 1)
        real(wp), intent(in), optional :: color(:)          !! [r, g, b] or [r, g, b, a] (0 to 1)
        type(Sphere) :: s
        s%ReferenceFrame = ReferenceFrame(name, color)
        if (present(radius)) s%radius_ = radius
    end function new_sphere