complexR
is a tool for easily computing and visualizing
transformations on complex numbers:
-
circle_transform()
performs and visualizes any kind of transformation on circles -
line_transform()
performs and visualizes any kind of transformation on lines -
quad_transform()
performs and visualizes any kind of transformation on squares and rectangles -
disc_transform()
performs and visualizes any kind of transformation on discs -
plane_to_sphere()
andsphere_to_plane()
compute stereographic projections -
st_sphere_plot()
andst_plane_plot()
visualize them.
These functions combine other intermediary functions like
cart_to_polar()
and polar_to_cart()
to execute their operations. You
can learn more about them in vignette("complexR")
.
Use this code to download the development version of complexR
.
devtools::install_github("Swaha294/complexR")
## Downloading GitHub repo Swaha294/complexR@HEAD
##
## checking for file ‘/private/var/folders/0p/hkwpsbqj047d4nq34kz3_wdr0000gn/T/Rtmpy8jJo1/remotesf58d78bf1442/Swaha294-complexR-d60dad2/DESCRIPTION’ ... ✔ checking for file ‘/private/var/folders/0p/hkwpsbqj047d4nq34kz3_wdr0000gn/T/Rtmpy8jJo1/remotesf58d78bf1442/Swaha294-complexR-d60dad2/DESCRIPTION’ (341ms)
## ─ preparing ‘complexR’:
## checking DESCRIPTION meta-information ... ✔ checking DESCRIPTION meta-information
## ─ checking for LF line-endings in source and make files and shell scripts
## ─ checking for empty or unneeded directories
## ─ building ‘complexR_1.0.0.tar.gz’
##
##
Visualize the transformation
library(complexR)
circle_transform(
x0 = 1,
x_new = expression(2*x*y),
y_new = expression(y^2),
annotations = c(complex(real = 2, imaginary = 0), complex(real = 1, imaginary = 1))
)
Visualize the transformation
disc_transform(
x0 = 1,
y0 = 1,
x_new = expression(x^3 - y^2),
y_new = expression(2*x*y),
theta_min = 0,
theta_max = pi/3
)
Visualize the stereographic projection of z = 2 + 3i in
st_sphere_plot(2, 3)