Class JxnComplexAlgebra
- java.lang.Object
-
- JxnComplexAlgebra
-
- All Implemented Interfaces:
JxnCloneableAlgebra
public class JxnComplexAlgebra extends Object implements JxnCloneableAlgebra
Implementation of a complex algebra. Stores real and imaginary part with double precision. Supports mixed operations withdouble
,JxnRealArrayAlgebra
andJxnComplexArrayAlgebra
.
Call one of theplot
methods to visualize complex values as phasors (arrows) in aPlotFrame
.
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
defaultNDec
Default nDec fortoString()
.protected static double
equalityTolerance
Tolerance forequals
method.double
im
Imaginary part.protected static JxnComplexAlgebra
J
j
.protected static JxnComplexAlgebra
JJJ
-j
.protected static JxnComplexAlgebra
ONE
1 + j 0
.double
re
Real part.
-
Constructor Summary
Constructors Constructor Description JxnComplexAlgebra()
Createsj
.JxnComplexAlgebra(double re)
Createsre + j 0
.JxnComplexAlgebra(double re, double im)
Createsre + j im
.JxnComplexAlgebra(double r, double phi, boolean deg)
Creates complex from magnituder
and phase anglephi
.JxnComplexAlgebra(JxnComplexAlgebra z)
Creates a copy ofz
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static double
abs(JxnComplexAlgebra z)
Returns the absolute value (magnitude) ofz
.static JxnComplexAlgebra
acos(JxnComplexAlgebra z)
Return the inverse cosine ofz
.static JxnComplexAlgebra
acosh(JxnComplexAlgebra z)
Return the inverse hyperbolic cosine ofz
.JxnComplexAlgebra
add(double d)
Addsd
to this.JxnComplexAlgebra
add(JxnComplexAlgebra z)
Addsz
to this.JxnComplexArrayAlgebra
add(JxnComplexArrayAlgebra ca)
Returnsca
added to this.JxnComplexArrayAlgebra
add(JxnRealArrayAlgebra ra)
Returnsra
added to this.static KmgComplexAngle
angle(JxnComplexAlgebra center, double radius, double startAngle, double tipAngle, String label, Color color)
Seeangle
.static KmgComplexAngle
angle(JxnComplexAlgebra center, double radius, double startAngle, double tipAngle, String label, Color color, boolean d90)
Seeangle
.static KmgComplexAngle
angle(JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color)
Seeangle
.static KmgComplexAngle
angle(JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color, boolean d90)
Seeangle
.static KmgComplexAngle
angle(JxnComplexAlgebra center, JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color)
Returns an angle (arc with arrow tip).static KmgComplexAngle
angle(JxnComplexAlgebra center, JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color, boolean d90)
Seeangle
.static double
arg(JxnComplexAlgebra z)
static double
argD(JxnComplexAlgebra z)
static JxnComplexAlgebra
asin(JxnComplexAlgebra z)
Return the inverse sine ofz
.static JxnComplexAlgebra
asinh(JxnComplexAlgebra z)
Return the inverse hyperbolic sine ofz
.static JxnComplexAlgebra
atan(JxnComplexAlgebra z)
Return the inverse tangent ofz
.static JxnComplexAlgebra
atanh(JxnComplexAlgebra z)
Return the inverse hyperbolic tangent ofz
.JxnCloneableAlgebra
cloneThis()
Called internally.static JxnComplexAlgebra
conj(JxnComplexAlgebra z)
Returns the complex conjugate ofz
.static JxnComplexAlgebra
cos(JxnComplexAlgebra z)
Returns the cosine ofz
.static JxnComplexAlgebra
cosh(JxnComplexAlgebra z)
Returns the hyperbolic cosine ofz
.static JxnComplexAlgebra
delta_wye_Z1(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)
ΔY-transform:Z1 = Z12 * Z31 / ( Z12 + Z23 + Z31 )
.static JxnComplexAlgebra
delta_wye_Z2(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)
ΔY-transform:Z2 = Z23 * Z12 / ( Z12 + Z23 + Z31 )
.static JxnComplexAlgebra
delta_wye_Z3(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)
ΔY-transform:Z3 = Z31 * Z23 / ( Z12 + Z23 + Z31 )
.static JxnComplexAlgebra
dif(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the differencez1 - z2
.JxnComplexAlgebra
div(double d)
Divides this byd
.JxnComplexAlgebra
div(JxnComplexAlgebra z)
Divides this byz
.JxnComplexArrayAlgebra
div(JxnComplexArrayAlgebra ca)
Returns this divided byca
.JxnComplexArrayAlgebra
div(JxnRealArrayAlgebra ra)
Returns this divided byra
.static JxnComplexAlgebra
dreieckstern(JxnComplexAlgebra z23, JxnComplexAlgebra z31, JxnComplexAlgebra z12)
Deprecated.Usedelta_wye_Z1
.boolean
equals(Object other)
Complex objects are equal, if both real and imaginary part are equal.static JxnComplexAlgebra
exp(JxnComplexAlgebra z)
Returns the exponential function value ofz
.static double
getEqualityTolerance()
Returns the tolerance used for theequals
method.static double
imag(JxnComplexAlgebra z)
Returns the imaginary part ofz
.JxnComplexAlgebra
inv()
Replaces this by its reciprocal.static JxnComplexAlgebra
inv(JxnComplexAlgebra z)
Returns the reciprocal ofz
.static JxnComplexAlgebra
log(JxnComplexAlgebra z)
Returns the natural logarithm ofz
.static void
main(String[] args)
Test.JxnComplexAlgebra
mul(double d)
(Post)Multiplies this byd
.JxnComplexAlgebra
mul(JxnComplexAlgebra z)
(Post)Multiplies this byz
.JxnComplexArrayAlgebra
mul(JxnComplexArrayAlgebra ca)
Returns this (post)multiplied byca
.JxnComplexArrayAlgebra
mul(JxnRealArrayAlgebra ra)
Returns this (post)multiplied byra
.static JxnComplexAlgebra
parallel(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the impedance of the parallel connection of two impedances Z1 und Z2.static KmgComplexPhasor
phasor(JxnComplexAlgebra z, String label, Color color)
Returns a phasor representation ofz
.static KmgComplexPhasor
phasor(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)
Returns a phasor representation ofz1
.static double
phi(JxnComplexAlgebra z)
Returns the argument (phase angle) ofz
.static double
phiD(JxnComplexAlgebra z)
Returns the argument (phase angle) ofz
in degrees.static JxnComplexPlotFrame
plot(JxnComplexAlgebra z)
Seeplot
.static JxnComplexPlotFrame
plot(JxnComplexAlgebra z, Color color)
Seeplot
.static JxnComplexPlotFrame
plot(JxnComplexAlgebra z, String label)
Seeplot
.static JxnComplexPlotFrame
plot(JxnComplexAlgebra z, String label, Color color)
Creates a newJxnComplexPlotFrame
and visualizesz
as a phasor (arrow).static JxnComplexPlotFrame
plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1)
Seeplot
.static JxnComplexPlotFrame
plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, Color color)
Seeplot
.static JxnComplexPlotFrame
plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label)
Seeplot
.static JxnComplexPlotFrame
plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)
Creates a newJxnComplexPlotFrame
and visualizesz1
as a phasor (arrow).static JxnComplexPlotFrame
plot90(JxnComplexAlgebra z)
Seeplot90
.static JxnComplexPlotFrame
plot90(JxnComplexAlgebra z, Color color)
Seeplot90
.static JxnComplexPlotFrame
plot90(JxnComplexAlgebra z, String label)
Seeplot90
.static JxnComplexPlotFrame
plot90(JxnComplexAlgebra z, String label, Color color)
Seeplot
.static JxnComplexPlotFrame
plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1)
Seeplot90
.static JxnComplexPlotFrame
plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, Color color)
Seeplot90
.static JxnComplexPlotFrame
plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label)
Seeplot90
.static JxnComplexPlotFrame
plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)
Seeplot
.JxnComplexAlgebra
pow(double d)
Replaces this by its power ofd
.JxnComplexAlgebra
pow(JxnComplexAlgebra exponent)
Replaces this by its power ofexponent
.static JxnComplexAlgebra
pow(JxnComplexAlgebra z, JxnComplexAlgebra e)
Returnsz
to the power ofe
.JxnComplexArrayAlgebra
pow(JxnRealArrayAlgebra ra)
Returns this by its power ofra
.static JxnComplexAlgebra
prd(JxnComplexAlgebra z, double d)
Returns the productz * d
.static JxnComplexAlgebra
prd(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the productz1 * z2
.static JxnComplexAlgebra
quot(JxnComplexAlgebra z, double d)
Returns the quotientz / d
.static JxnComplexAlgebra
quot(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the quotientz1 / z2
.static double
real(JxnComplexAlgebra z)
Returns the real part ofz
.static double
setEqualityTolerance(double eps)
Sets the tolerance for theequals
method for all instances of this class.static int
setNDec(int nDec)
Set default decimals fortoString()
.static JxnComplexAlgebra
sin(JxnComplexAlgebra z)
Returns the sine ofz
.static JxnComplexAlgebra
sinh(JxnComplexAlgebra z)
Returns the hyperbolic sine ofz
.static JxnComplexAlgebra
sqrt(JxnComplexAlgebra z)
Returns the square root ofz
.static JxnComplexAlgebra
sqrt1z(JxnComplexAlgebra z)
Returnssqrt
( 1 - z * z )
.static JxnComplexAlgebra
sterndreieck(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
Deprecated.Usewye_delta_Z23
.JxnComplexAlgebra
sub(double d)
Subtractsd
from this.JxnComplexAlgebra
sub(JxnComplexAlgebra z)
Subtractsz
from this.JxnComplexArrayAlgebra
sub(JxnComplexArrayAlgebra ca)
Returnsca
subtracted from this.JxnComplexArrayAlgebra
sub(JxnRealArrayAlgebra ra)
Returnsra
subtracted from this.static JxnComplexAlgebra
sum(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the sumz1 + z2
.static JxnComplexAlgebra
sum(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
Returns the sumz1 + z2 + z3
.static JxnComplexAlgebra
tan(JxnComplexAlgebra z)
Returns the tangent ofz
.static JxnComplexAlgebra
tanh(JxnComplexAlgebra z)
Returns the hyperbolic tangent ofz
.String
toString()
Formats instance.String
toString(int nDec)
Formats instance withnDec
decimals.String
toString(int nDec1, int nDec2)
Formats instance withnDec1
decimals andnDec2
decimals for the phase angle.static JxnComplexAlgebra
wye_delta_Z12(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
YΔ-transform:Z12 = Z1 + Z2 + Z1 * Z2 / Z3
.static JxnComplexAlgebra
wye_delta_Z23(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
YΔ-transform:Z23 = Z2 + Z3 + Z2 * Z3 / Z1
.static JxnComplexAlgebra
wye_delta_Z31(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
YΔ-transform:Z31 = Z3 + Z1 + Z3 * Z1 / Z2
.
-
-
-
Field Detail
-
re
public double re
Real part.
-
im
public double im
Imaginary part.
-
equalityTolerance
protected static double equalityTolerance
Tolerance forequals
method.- See Also:
setEqualityTolerance(double)
-
defaultNDec
protected static int defaultNDec
Default nDec fortoString()
.- See Also:
toString(int)
-
J
protected static final JxnComplexAlgebra J
j
.
-
ONE
protected static final JxnComplexAlgebra ONE
1 + j 0
.
-
JJJ
protected static final JxnComplexAlgebra JJJ
-j
.
-
-
Constructor Detail
-
JxnComplexAlgebra
public JxnComplexAlgebra()
Createsj
.
-
JxnComplexAlgebra
public JxnComplexAlgebra(JxnComplexAlgebra z)
Creates a copy ofz
.
-
JxnComplexAlgebra
public JxnComplexAlgebra(double re)
Createsre + j 0
.
-
JxnComplexAlgebra
public JxnComplexAlgebra(double re, double im)
Createsre + j im
.
-
JxnComplexAlgebra
public JxnComplexAlgebra(double r, double phi, boolean deg)
Creates complex from magnituder
and phase anglephi
.- Parameters:
deg
- if truephi
is expected in degrees, else in radians
-
-
Method Detail
-
cloneThis
public JxnCloneableAlgebra cloneThis()
Description copied from interface:JxnCloneableAlgebra
Called internally. Required to avoid overwriting the left side operandopndLeft
inopndLeft op opndRght
, ifop
is implemented asopndLeft.op(opndRght)
and the instance methodop
modifies the instance.- Specified by:
cloneThis
in interfaceJxnCloneableAlgebra
- Returns:
- copy of this instance
-
equals
public boolean equals(Object other)
Complex objects are equal, if both real and imaginary part are equal. UsesetEqualityTolerance(double)
to set a tolerance for the comparision ofre
andim
.
-
setEqualityTolerance
public static double setEqualityTolerance(double eps)
Sets the tolerance for theequals
method for all instances of this class.- Parameters:
eps
-
eps > 0.
absolute difference for re and im
eps < 0.
difference relative to themagnitude
of the biggest of two instances to be compared- Returns:
- old tolerance
-
getEqualityTolerance
public static double getEqualityTolerance()
Returns the tolerance used for theequals
method.
-
toString
public String toString(int nDec)
Formats instance withnDec
decimals.
-
toString
public String toString(int nDec1, int nDec2)
Formats instance withnDec1
decimals andnDec2
decimals for the phase angle.
-
setNDec
public static int setNDec(int nDec)
Set default decimals fortoString()
.- See Also:
toString(int)
-
add
public JxnComplexAlgebra add(JxnComplexAlgebra z)
Addsz
to this.
-
sub
public JxnComplexAlgebra sub(JxnComplexAlgebra z)
Subtractsz
from this.
-
mul
public JxnComplexAlgebra mul(JxnComplexAlgebra z)
(Post)Multiplies this byz
.
-
div
public JxnComplexAlgebra div(JxnComplexAlgebra z)
Divides this byz
.
-
inv
public JxnComplexAlgebra inv()
Replaces this by its reciprocal.
-
pow
public JxnComplexAlgebra pow(JxnComplexAlgebra exponent)
Replaces this by its power ofexponent
.
-
add
public JxnComplexAlgebra add(double d)
Addsd
to this.
-
sub
public JxnComplexAlgebra sub(double d)
Subtractsd
from this.
-
mul
public JxnComplexAlgebra mul(double d)
(Post)Multiplies this byd
.
-
div
public JxnComplexAlgebra div(double d)
Divides this byd
.
-
pow
public JxnComplexAlgebra pow(double d)
-
add
public JxnComplexArrayAlgebra add(JxnRealArrayAlgebra ra)
Returnsra
added to this.
-
sub
public JxnComplexArrayAlgebra sub(JxnRealArrayAlgebra ra)
Returnsra
subtracted from this.
-
mul
public JxnComplexArrayAlgebra mul(JxnRealArrayAlgebra ra)
Returns this (post)multiplied byra
.
-
div
public JxnComplexArrayAlgebra div(JxnRealArrayAlgebra ra)
Returns this divided byra
.
-
pow
public JxnComplexArrayAlgebra pow(JxnRealArrayAlgebra ra)
Returns this by its power ofra
.
-
add
public JxnComplexArrayAlgebra add(JxnComplexArrayAlgebra ca)
Returnsca
added to this.
-
sub
public JxnComplexArrayAlgebra sub(JxnComplexArrayAlgebra ca)
Returnsca
subtracted from this.
-
mul
public JxnComplexArrayAlgebra mul(JxnComplexArrayAlgebra ca)
Returns this (post)multiplied byca
.
-
div
public JxnComplexArrayAlgebra div(JxnComplexArrayAlgebra ca)
Returns this divided byca
.
-
inv
public static JxnComplexAlgebra inv(JxnComplexAlgebra z)
Returns the reciprocal ofz
.
-
sum
public static JxnComplexAlgebra sum(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the sumz1 + z2
.
-
sum
public static JxnComplexAlgebra sum(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
Returns the sumz1 + z2 + z3
.
-
dif
public static JxnComplexAlgebra dif(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the differencez1 - z2
.
-
prd
public static JxnComplexAlgebra prd(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the productz1 * z2
.
-
quot
public static JxnComplexAlgebra quot(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the quotientz1 / z2
.
-
prd
public static JxnComplexAlgebra prd(JxnComplexAlgebra z, double d)
Returns the productz * d
.
-
quot
public static JxnComplexAlgebra quot(JxnComplexAlgebra z, double d)
Returns the quotientz / d
.
-
abs
public static double abs(JxnComplexAlgebra z)
Returns the absolute value (magnitude) ofz
.abs( re + j im )
≡Math.
hypot
( re, im )
≡sqrt( re * re + im * im )
.
-
phi
public static double phi(JxnComplexAlgebra z)
-
arg
public static double arg(JxnComplexAlgebra z)
-
phiD
public static double phiD(JxnComplexAlgebra z)
-
argD
public static double argD(JxnComplexAlgebra z)
-
real
public static double real(JxnComplexAlgebra z)
Returns the real part ofz
.
-
imag
public static double imag(JxnComplexAlgebra z)
Returns the imaginary part ofz
.
-
conj
public static JxnComplexAlgebra conj(JxnComplexAlgebra z)
Returns the complex conjugate ofz
.conj( re + j im )
≡( re - j im )
.
-
sqrt
public static JxnComplexAlgebra sqrt(JxnComplexAlgebra z)
-
exp
public static JxnComplexAlgebra exp(JxnComplexAlgebra z)
-
log
public static JxnComplexAlgebra log(JxnComplexAlgebra z)
-
pow
public static JxnComplexAlgebra pow(JxnComplexAlgebra z, JxnComplexAlgebra e)
-
sinh
public static JxnComplexAlgebra sinh(JxnComplexAlgebra z)
-
cosh
public static JxnComplexAlgebra cosh(JxnComplexAlgebra z)
-
tanh
public static JxnComplexAlgebra tanh(JxnComplexAlgebra z)
-
asinh
public static JxnComplexAlgebra asinh(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
acosh
public static JxnComplexAlgebra acosh(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
atanh
public static JxnComplexAlgebra atanh(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
sin
public static JxnComplexAlgebra sin(JxnComplexAlgebra z)
-
cos
public static JxnComplexAlgebra cos(JxnComplexAlgebra z)
-
tan
public static JxnComplexAlgebra tan(JxnComplexAlgebra z)
-
sqrt1z
public static JxnComplexAlgebra sqrt1z(JxnComplexAlgebra z)
Returnssqrt
( 1 - z * z )
.
-
asin
public static JxnComplexAlgebra asin(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
acos
public static JxnComplexAlgebra acos(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
atan
public static JxnComplexAlgebra atan(JxnComplexAlgebra z)
- See Also:
- Wikipedia
-
parallel
public static JxnComplexAlgebra parallel(JxnComplexAlgebra z1, JxnComplexAlgebra z2)
Returns the impedance of the parallel connection of two impedances Z1 und Z2.Zp = Z1 * Z2 / ( Z1 + Z2 )
.
-
dreieckstern
public static JxnComplexAlgebra dreieckstern(JxnComplexAlgebra z23, JxnComplexAlgebra z31, JxnComplexAlgebra z12)
Deprecated.Usedelta_wye_Z1
. Umwandlung Dreieck->
Stern: Berechnet Z1( Z23, Z31, Z12 ).
-
sterndreieck
public static JxnComplexAlgebra sterndreieck(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
Deprecated.Usewye_delta_Z23
. Umwandlung Stern->
Dreieck: Berechnet Z23( Z1, Z2, Z3 ).
-
delta_wye_Z1
public static JxnComplexAlgebra delta_wye_Z1(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)
ΔY-transform:Z1 = Z12 * Z31 / ( Z12 + Z23 + Z31 )
.- See Also:
- Wikipedia
-
delta_wye_Z2
public static JxnComplexAlgebra delta_wye_Z2(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)
ΔY-transform:Z2 = Z23 * Z12 / ( Z12 + Z23 + Z31 )
.- See Also:
- Wikipedia
-
delta_wye_Z3
public static JxnComplexAlgebra delta_wye_Z3(JxnComplexAlgebra z12, JxnComplexAlgebra z23, JxnComplexAlgebra z31)
ΔY-transform:Z3 = Z31 * Z23 / ( Z12 + Z23 + Z31 )
.- See Also:
- Wikipedia
-
wye_delta_Z12
public static JxnComplexAlgebra wye_delta_Z12(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
YΔ-transform:Z12 = Z1 + Z2 + Z1 * Z2 / Z3
.- See Also:
- Wikipedia
-
wye_delta_Z23
public static JxnComplexAlgebra wye_delta_Z23(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
YΔ-transform:Z23 = Z2 + Z3 + Z2 * Z3 / Z1
.- See Also:
- Wikipedia
-
wye_delta_Z31
public static JxnComplexAlgebra wye_delta_Z31(JxnComplexAlgebra z1, JxnComplexAlgebra z2, JxnComplexAlgebra z3)
YΔ-transform:Z31 = Z3 + Z1 + Z3 * Z1 / Z2
.- See Also:
- Wikipedia
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z, String label, Color color)
Creates a newJxnComplexPlotFrame
and visualizesz
as a phasor (arrow).
Call theadd
andapnd
methods on theJxnComplexPlotFrame
instance returned by this method to display further phasors in the same PlotFrame.- Returns:
PlotFrame
instance can be used to add furtherphasors
andcurves
.- See Also:
JxnComplexPlotFrame
, JXN Tutorial
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z, String label)
Seeplot
.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z, Color color)
Seeplot
.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z)
Seeplot
.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)
Creates a newJxnComplexPlotFrame
and visualizesz1
as a phasor (arrow). The starting point of the arrow is given byz0
.
See alsoplot
.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label)
Seeplot
.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1, Color color)
Seeplot
.
-
plot
public static JxnComplexPlotFrame plot(JxnComplexAlgebra z0, JxnComplexAlgebra z1)
Seeplot
.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z, String label, Color color)
Seeplot
. Orientation of the coordinate system: real axis points up.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z, String label)
Seeplot90
.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z, Color color)
Seeplot90
.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z)
Seeplot90
.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)
Seeplot
. Orientation of the coordinate system: real axis points up.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label)
Seeplot90
.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1, Color color)
Seeplot90
.
-
plot90
public static JxnComplexPlotFrame plot90(JxnComplexAlgebra z0, JxnComplexAlgebra z1)
Seeplot90
.
-
phasor
public static KmgComplexPhasor phasor(JxnComplexAlgebra z, String label, Color color)
Returns a phasor representation ofz
. Call theadd
method on aPlotFrame
instance to display the phasor in the PlotFrame. Allows e.g. to show a phasor in aJxnRealArrayPlotFrame
.
Note: Please do not applyadd( phasor( z, label, color ) )
together with any of theplot90
(...)
methods. Withplot90
directly useadd
:plot90(...).
add
( z, label, color )
.
-
phasor
public static KmgComplexPhasor phasor(JxnComplexAlgebra z0, JxnComplexAlgebra z1, String label, Color color)
Returns a phasor representation ofz1
. The starting point of the arrow is given byz0
. Call theadd
method on aPlotFrame
instance to display the phasor in the PlotFrame. Allows e.g. to show a phasor in aJxnRealArrayPlotFrame
.
Note: Please do not applyadd( phasor( z0, z1, label, color ) )
together with any of theplot90
(...)
methods. Withplot90
directly useadd
:plot90(...).
add
( z0, z1, label, color )
.
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra center, JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color)
Returns an angle (arc with arrow tip). Call theadd
method on aPlotFrame
instance to display the angle in the PlotFrame.- Parameters:
center
- complex representing the center of the arcphiStart
-phi
(phiStart)
defines the start angle of the arc (related to the real axis)phiTip
-phi(phiTip)
defines the end angle of the arc (related to the real axis)radFak
- determines the radius of the arc:
> 0 the radius of the arc isradFak * min(
abs
(phiStart), abs(phiTip) )
< 0 the radius of the arc isradFak
= 0 the radius of the arc is0.9 * min( abs(phiStart), abs(phiTip) )
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra center, JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color, boolean d90)
Seeangle
.- Parameters:
d90
- the orientation of the coordinate system: true ⇒ real axis points up, false ⇒ real axis points right
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color)
Seeangle
. The center of the arc is (0,0).
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra phiStart, JxnComplexAlgebra phiTip, double radFak, String label, Color color, boolean d90)
Seeangle
. The center of the arc is (0,0).- Parameters:
d90
- the orientation of the coordinate system: true ⇒ real axis points up, false ⇒ real axis points right
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra center, double radius, double startAngle, double tipAngle, String label, Color color)
Seeangle
.- Parameters:
radius
- radius of the arcstartAngle
- start angle of the arc (related to the real axis)tipAngle
- end angle of the arc (related to the real axis)
-
angle
public static KmgComplexAngle angle(JxnComplexAlgebra center, double radius, double startAngle, double tipAngle, String label, Color color, boolean d90)
Seeangle
.- Parameters:
d90
- the orientation of the coordinate system: true ⇒ real axis points up, false ⇒ real axis points right
-
main
public static void main(String[] args)
Test.
-
-