CINXE.COM

# Spotted Sphere - [R] Language # Geody - https://www.geody.com/ # R Project - https://www.r-project.org/ # Config xzbgcol <- "blue"; # Background color pcol <- "yellow"; # Spot color wwrad <- 100; # Radius of the Planet wrad <- wwrad/25; # Radius of the Spot wradp <- wwrad-wrad/2; # Distance of the Spot from the center of the Planet lat <- 47.958333; lon <- 23.822778; # requires rgl library(rgl); # open3d(); # Opens a new window for every instance rgl.viewpoint(theta=90, phi=0, fov=60, zoom=1); bg3d(xzbgcol); spheres3d(x=0, y=0, z=0, radius=wwrad, color="white", texture=system.file("textures/world.png", package="rgl")); # spheres3d(x=0, y=0, z=0, radius=wwrad, color="white", texture="terra_col_geody_logo_620x310.png"); latx=lat*pi/180; lonx=lon*pi/180; # Deg to Rad spheres3d(y=(wradp)*sin(latx), x=(-wradp)*cos(latx)*sin(lonx), z=(-wradp)*cos(latx)*cos(lonx), radius=wrad, color=pcol); # axes3d(); # Show Axes 3D # play3d(spin3d(axis = c(0, 1, 0), rpm = 5)); # Rotates the Planet