1
$\begingroup$

Make a line in 3D that goes through 50 random points with integer coordinates randomly chosen up to 50.

Graphics3D[
 Line[
  Table[RandomInteger[c, 3], {c, 50}]]]
Graphics3D[
 Point[
  Table[RandomInteger[c, 3], {c, 50}]]]

How to combine these two plots into one? plz help. enter image description here

$\endgroup$
0

2 Answers 2

3
$\begingroup$

Try

Graphics3D[{Line[#], Point[#]}] &[Table[RandomInteger[c, 3], {c, 50}]]

enter image description here

$\endgroup$
2
  • $\begingroup$ but it shows incorrect. this question (qst no:14.10) is from Stephen wolfram: an elementary introduction to wolfram language course on the topic ** "coordinates and graphics question no 14.10" **. link to the page:[Link] (wolfram.com/wolfram-u/…) $\endgroup$
    – Ratheesh
    Commented Oct 10, 2022 at 15:18
  • $\begingroup$ @Ratheesh What means "but it shows incorrect"? $\endgroup$ Commented Oct 10, 2022 at 15:32
2
$\begingroup$
ListLinePlot3D[RandomInteger[50, {50, 3}], PlotStyle -> Automatic, 
 PlotMarkers -> Point, Boxed -> True, BoxRatios -> 1, Axes -> False]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.