Polar:
Filter:
Classes | Math

Polar : Number : Magnitude : Object

Polar coordinates
Source: Polar.sc

Description

Represents polar coordinates.

Class Methods

Polar.new(rho, theta)

Create a new polar coordinate with the given radius, rho, and angle in radians, theta.

Inherited class methods

Instance Methods

Math

+(aNumber)

-(aNumber)

*(aNumber)

/(aNumber)

The math operations of addition, subtraction, multiplication and division are accomplished by first converting to complex numbers.

.scale(scale)

Scale the radius by some value.

.rotate(angle)

Rotate the angle by some value.

.neg

Rotate by pi.

.mirrorX

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Mirror x, reflecting across Y axis.

.mirrorY

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Mirror y, reflecting across the X axis.

.mirrorO

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Mirror across the origin.

Discussion:

A synonym for neg.

Conversion

.magnitude

Answer the radius.

.angle

Answer the angle in radians

.phase

Answer the angle in radians

.real

Answer the real part.

.imag

Answer the imaginary part.

.asComplex

Convert to Complex

.asPoint

Convert to Point

.asSpherical

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Convert to Spherical

.asCartesian

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Convert to Cartesian

.angles

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Answer the azimuth and elevation angles, theta and phi, in radians.

.angles

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Answer the azimuth and elevation angles, theta and phi, in radians.

Returns:

[ theta, 0 ]

.phases

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Answer the azimuth and elevation angles, theta and phi, in radians.

Returns:

[ theta, 0 ]

.x

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Answer the cartesian coordinate x of the receiver.

.y

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Answer the cartesian coordinate y of the receiver.

.z

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Answer the cartesian coordinate z of the receiver, 0.

Accessing

.rho

.rho = value

Get or set the rho coordinate value.

.theta

.theta = value

Get or set the theta coordinate value.

.phi

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

Answers 0.

Testing

==(aPolar)

Answers a Boolean whether the receiver equals the argument.

.hash

Returns a hash value for the receiver.

Inherited instance methods

Undocumented instance methods

.asPolar

.mirrorZ

From extension in /Library/Application Support/SuperCollider/downloaded-quarks/MathLib/classes/SpherCoords/extPolar.sc

.performBinaryOpOnSomething(aSelector, thing, adverb)

.performBinaryOpOnUGen(aSelector, aUGen)