I want to graph a circle in 3d, but don't know the code for it. I've tried the following code, but it doesn't seem to work.
$\begingroup$
$\endgroup$
1
-
$\begingroup$ Since it seems you weren't told yet: please do not post code as an image. Copy the text of your code and paste it in your question. In the meantime, please look at the linked thread to see if anything there suits your needs. $\endgroup$– J. M.'s missing motivation ♦Commented Sep 20, 2017 at 0:13
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
Circle
is a 2D graphics primitive. The corresponding primitive in 3D would be Cylinder
:
Graphics3D[{FaceForm[None], Cylinder[{{0, 0, 0}, {0, 0, 0.01}}]}]
Or use ParametricPlot
:
ParametricPlot3D[{Sin[u], Cos[u], 0}, {u, 0, 2 Pi}]
You can also use Line
like this:
pts = Table[{Sin[u], Cos[u], 0}, {u, 0, 2 Pi, 0.01}];
Graphics3D[Line[pts]]