crossRatio | R Documentation |
The cross ratio of four points.
crossRatio(A, B, C, D)
A, B, C, D |
four distinct points |
A complex number. It is real if and only if the four points lie on a generalized circle (that is a circle or a line).
c <- Circle$new(c(0, 0), 1)
A <- c$pointFromAngle(0)
B <- c$pointFromAngle(90)
C <- c$pointFromAngle(180)
D <- c$pointFromAngle(270)
crossRatio(A, B, C, D) # should be real
Mob <- Mobius$new(rbind(c(1+1i,2),c(0,3-2i)))
MA <- Mob$transform(A)
MB <- Mob$transform(B)
MC <- Mob$transform(C)
MD <- Mob$transform(D)
crossRatio(MA, MB, MC, MD) # should be identical to `crossRatio(A, B, C, D)`
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.