OrthoSphere

class sonic.OrthoSphere

Bases: sonic.OrthoRender

This software is made available under the MIT license. See SONIC/LICENSE for details.

Constructor Summary
OrthoSphere(R, g)

Instantiates a sonic OrthoSphere object.

OrthoSphere assumes observer is nadir-viewing, and the light source is always in the horizontal plane. The phase angle is angle between the observer and the light source.

OrthoSphere also renders a sphere with a homogeneous surface. As a result, all reflectance models used in conjunction with OrthoSphere should contain scalar model parameters like albedo (AL).

Inputs:
  • R (1,1) (double): Radius of sphere [pix]. R > 0.

  • g (1,1) (double): Phase Angle [rad] between 0 and pi

Outputs:
  • obj (sonic.OrthoSphere): OrthoSphere object.

Last revised: 09/30/2024 Last author: Priyal Soni

Property Summary
R

radius of sphere [pix]

g

phase angle [rad]

imgSize

image size [pix]

Method Summary
calcEmissionVecs()

Calculates emission vectors for all points on the sphere.

Inputs:
  • obj (sonic.Orthosphere) - OrthoSphere class object

Outputs:
  • u_i (3xn) (double): emission unit vectors for all

    points on the sphere.

Last revised: 09/30/2024 Last author: Priyal Soni

calcIncidenceVecs()

Calculates incidence vectors for all points on the sphere.

Inputs:
  • obj (sonic.Orthosphere) - OrthoSphere class object

Outputs:
  • u_i (3xn) (double): incidence unit vectors for all

    points on the sphere.

Last revised: 09/30/2024 Last author: Priyal Soni

calcNormals()

Calculates normal vectors for all points on the sphere.

Inputs:
  • obj (sonic.Orthosphere) - OrthoSphere class object

Outputs:
  • u_n (3xn) (double): unit vectors for all the normals on

    the sphere

Last revised: 09/30/2024 Last author: Priyal Soni

calcRefl(reflObj)

Calculates BRDF values for all points on the sphere given a particular reflectance model

Inputs:
  • obj (sonic.Orthosphere) - OrthoSphere class object

  • reflObj - Any class under sonic.Reflectance

Outputs:
  • r (nxn) (double): BRDF values for all points in image
    with n = obj.imgSize.

    Note: Points outside of sphere are assigned -1 in output BRDF matrix

  • sphereMask (nxn) (logical): Logical mask to identify

    points on sphere with n = obj.imgSize = 2*ceil(R)

Last revised: 09/30/2024 Last author: Priyal Soni

static mustBe0ToPi(a)

Input validation function for phase angle input

Inputs:
  • g: phase angle [rad]

Outputs:
  • N/A for input validation functions

Last revised: 09/30/2024 Last author: Priyal Soni