Quadric

class sonic.Quadric
Constructor Summary
Quadric(raw_quadric, inputType)

Instantiates a Quadric object.

Inputs:
  • raw_quadric (4x4 double): a 4x4 matrix representing the quadric

  • type (string or char): specifying what type of input. “locus”, “envelope”

Outputs:
  • obj (1,1 sonic.Quadric): Quadric object containing locus and envelope

Last revised: 11/14/24 Last author:Michela Mancini

Property Summary
envelope
locus

Quadric internally represented as the quadric locus

proper
stable
type
Method Summary
center(quadric)

Takes a quadric object and translates it by its center.

Inputs:
  • quadric (sonic.Quadric object): the original quadric

Outputs:
  • centeredQuadric (sonic.Quadric object): the quadric

translated by its center - center (sonic.Points3 object): new origin of the coordinate system (center of the original quadric)

Last revised: 11/14/2024 Last author: Michela Mancini

static getType(matrix, matrixType)

Determines type of quadric

Inputs:
  • locus (4x4 double): quadric locus matrix

Outputs:
  • type (1xn string)

Last revised: 4/24/24 Last author: Michela Mancini

static isNumericallyStable(matrix, matrixType)

Determines whether the quadric matrix representation is numerically stable or not considering if an origin shift makes the previously degenerate matrix a non-degenerate one

Inputs:
  • matrix (4x4 double): quadric locus or envelope

Outputs:
  • stable (1x1 logical): true if the quadric is proper, or

degenerate and remains degenerate after origin shift, false if origin shift transforms degenerate quadric to non-degenerate quadric

Last revised: 10/25/24 Last author: Michela Mancini

static isProperQuadric(matrix, matrixType)

Determines whether the quadric locus represents a proper quadric

Inputs:
  • matrix (4x4 double): quadric locus or quadric envelope

Outputs:
  • proper (1x1 logical): true if the quadric is proper, false otherwise

Last revised: 10/30/24 Last author: Michela Mancini

rotate(quadric, DCM)

Takes a quadric object and a translation vector and outputs the quadric object shifted by the translation vector

Inputs:
  • quadric (sonic.Quadric object): the original quadric

  • DCM (3x3 double): the rotation matrix

Outputs:
  • rotatedQuadric (sonic.Quadric object): the quadric

rotated by the DCM

Last revised: 11/14/2024 Last author: Michela Mancini

translate(quadric, translation)

Takes a quadric object and a translation vector and outputs the quadric object shifted by the translation vector

Inputs:
  • quadric (sonic.Quadric object): the original quadric

  • translation (sonic.Points3 object): the translation

vector (origin of the new coordinate system)

Outputs:
  • translatedQuadric (sonic.Quadric object): the quadric

translated by the translation vector

Last revised: 11/14/2024 Last author: Michela Mancini