Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.4K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Using a table of rotation matrices to get rotated lines?

Posted 5 years ago
POSTED BY: Brian OBrien
2 Replies

This gives an output, although it may not be exactly what you want:

p = {0, 0, 0};
wx = {0, 0, 1};
line = {{-1, 0, 0}, {1, 0, 0}};
b = Ball[];
Region[RegionUnion @@ Table[RegionDifference[
    TransformedRegion[Cylinder[line, 1/8],
     RotationTransform[i, wx, p]], b],
   {i, 0, Pi, Pi/4}]]
POSTED BY: Gianluca Gorni

What do you want to do?

Start with

 Line[{{0,0 }, {1,0}}]
and
Graphics[Line[{{0, 0}, {1, 0}}]]

Now with

rot = ( {
   {Cos[u], -Sin[u]},
   {Sin[u], Cos[u]}
  } )

and

Graphics[Line[{{0, 0}, rot.{1, 0}}]] /. u -> # & /@   RandomReal[{0, 2 Pi}, 5];
Show[%]

you get some rotated lines.

POSTED BY: Hans Dolhaine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard