Advertisement
Guest User

Untitled

a guest
Nov 30th, 2020
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. n = 4;
  2. positions = RandomReal[{-10, 10}, {n, 3}];
  3. vectors = RandomPoint[Sphere[], n];
  4. lengths = RandomReal[{0, 20}, n];
  5. lines = MapThread[
  6. Line[{#1, #1 + #2*#3}] &, {positions, lengths, vectors}];
  7. Graphics3D[{Thick, Red, lines}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement