1

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. enter image description here

fidafa123
  • 145
  • 1
  • 8
  • 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. – J. M.'s missing motivation Sep 20 '17 at 00:13

1 Answers1

3

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}}]}]

Mathematica graphics

Or use ParametricPlot:

ParametricPlot3D[{Sin[u], Cos[u], 0}, {u, 0, 2 Pi}]

Mathematica graphics

You can also use Line like this:

pts = Table[{Sin[u], Cos[u], 0}, {u, 0, 2 Pi, 0.01}];
Graphics3D[Line[pts]]

Mathematica graphics

C. E.
  • 70,533
  • 6
  • 140
  • 264