Point:
Filter:
Classes | Geometry

Point : Object

Cartesian point
Source: Point.sc
Subclasses: PointArray

Description

Defines a point on the Cartesian plane.

Class Methods

Point.new(x: 0, y: 0)

Defines a new point.

Inherited class methods

Undocumented class methods

Point.big(x, y)

From extension in /usr/local/share/SuperCollider/SCClassLibrary/DefaultLibrary/extNumber.sc

Instance Methods

Accessing

.x

.x = value

Get or set the x coordinate value.

.y

.y = value

Get or set the y coordinate value.

.set(argX: 0, argY: 0)

Sets the point x and y values.

.z: METHOD NOT FOUND!

Answer the cartesian coordinate z of the receiver, 0.

Testing

==(aPoint)

Answers a Boolean whether the receiver equals the argument.

.hash

Returns a hash value for the receiver.

Math

+(delta)

Addition.

-(delta)

Subtraction.

*(scale)

Multiplication.

/(scale)

Division.

.translate(delta)

Addition by a Point.

.scale(scale)

Multiplication by a Point.

.rotate(angle)

Rotation about the origin by the angle given in radians.

.abs

Absolute value of the point.

.rho

Return the polar coordinate radius of the receiver.

.theta

Return the polar coordinate angle of the receiver.

.dist(aPoint)

Return the distance from the receiver to aPoint.

.transpose

Return a Point whose x and y coordinates are swapped.

.round(quant)

Round the coordinate values to a multiple of quantum.

.trunc(quant)

Truncate the coordinate values to a multiple of quantum.

.angle: METHOD NOT FOUND!

Return the polar coordinate angle of the receiver.

.angles: METHOD NOT FOUND!

Return the spherical coordinate azimuth and elevation angles of the receiver.

.mirrorX: METHOD NOT FOUND!

Mirror x, reflecting across Y axis.

.mirrorY: METHOD NOT FOUND!

Mirror y, reflecting across the X axis.

.mirrorO: METHOD NOT FOUND!

Mirror across the origin.

Discussion:

A synonym for neg.

Conversion

.asPoint

Returns the receiver.

.asComplex

Returns a complex number with x as the real part and y as the imaginary part.

.asString(limit: 512)

From superclass: Object

Return a string representing the receiver.

.phi: METHOD NOT FOUND!

Return the spherical coordinate elevation angle of the receiver.

Returns:

0

.asCartesian: METHOD NOT FOUND!

Convert to Cartesian, with z = 0.

@(aPoint)

If aValue is Number, create a new Cartesian whose x coordinate is this.x, y coordinate is this.y and whose z coordinate is aValue. If aValue is a Point, create a new Rect.

Arguments:

aValue

Inherited instance methods

Undocumented instance methods

.asArray

.asPolar

.asRect

.asSize

.conjugate

From extension in /usr/local/share/SuperCollider/SCClassLibrary/DefaultLibrary/extNumber.sc

.div(scale)

.mod(that)

.modSeaside(that)

.performBinaryOpOnSomething(aSelector, thing, adverb)

.swap

From extension in /usr/local/share/SuperCollider/SCClassLibrary/DefaultLibrary/extNumber.sc