如何根据中心和半径在R中绘制三维球体? [英] How to plot a three dimensional sphere in R based on center and radius?

查看:175
本文介绍了如何根据中心和半径在R中绘制三维球体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过提供中心点和半径来绘制R中的球体?

例如,如下所示:

sphere_3d(center=c(1,1,1), r=2))

该图将显示在三维坐标系上。

The plot would appear on a three dimensional coordinate system.

推荐答案

尝试使用 rgl 软件包中的 spheres3d 进行交互式绘图:

Try spheres3d in the rgl package for an interactive plot:

library(rgl)
spheres3d(x = 1, y = 1, z = 1, radius = 1)

还有很多其他方法,因此有用的方法需要更多的投入。

There are many other ways, so what's going to be useful needs more input.

这篇关于如何根据中心和半径在R中绘制三维球体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆