Mathematica Graphing cylinders in Mathematica

Click For Summary
The discussion revolves around creating and visualizing two intersecting cylinders using Mathematica. The first cylinder is defined with a parametric plot that is semi-transparent and oriented along the vertical axis. The second cylinder, intended to be perpendicular to the first, is also created with a parametric plot but requires adjustments to ensure proper orientation. Users express challenges in graphing both cylinders together and in finding the intersection curve that highlights the common surface points. The key issue is understanding how to visualize the intersection effectively within the same graph. The conversation emphasizes the need for correct parametrization and the use of Mathematica's plotting functions to achieve the desired visual representation.
Reflected
Messages
13
Reaction score
0
Below is some code that creates a semi-transparent cylinder.
firstcylinder =
ParametricPlot3D[{Cos[t], u, Sin[t]}, {t, 0, 2 Pi}, {u, -2, 2} ,
PlotStyle -> {Red, Opacity -> .3}, Mesh -> None];
Show[firstcylinder]

Draw a second cylinder that is perpendicular to the given cylinder.
Draw a three-dimensional curve that shows that complete intersection of the two cylinders.

Need help!
 
Physics news on Phys.org
Do you have difficulties finding the parametrizations of the cylinder and the intersection or using mathematica?:smile:
 
It's kind of both, I have gotten somewhere though.
secondcylinder =
ParametricPlot3D[{(u*Sin[Pi] + Cos[Pi]*Cos[t]),
Sin[t], (u*Cos[Pi] - Sin[Pi]*Cos[t])}, {t, 0, 2 Pi}, {u, -2, 2} ,
PlotStyle -> {Blue, Opacity -> .3}, Mesh -> None];
Show[secondcylinder]
I don't know how to graph both cylinders on the same graph, but that graph itself looks perpendicular to the first cylinder. If that's true, then I'm not sure about the second part about how to find the curve that shows the complete intersection of the two cylinders.
 
If you put them together by Show[firstcylinder, secondcylinder], you will see that they intersect. The problem is asking you to "highlight" the surface points that are common to both.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 0 ·
Replies
0
Views
636
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K