A sphere named name, of radius radius (default 1) and color color
([r, g, b] or [r, g, b, a]; default white, 90% opaque).
| Type | Intent | Optional | 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) |
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