| Author |
Comment/Response |
Jack
|
05/24/12 10:22am
Hello,
I'm currently working on a project that requires modeling intersections between cylinders. I know next to nothing about Mathematica, and am well aware that this project is beyond my skill level.
Basically, I am modifying this demonstration: http://demonstrations.wolfram.com/TwoIntersectingCylinders/
-> so that I can change the location of the intersecting cylinder in relation to the intersected cylinder.
-> I need to change the y component of the intersecting cylinder so that the intersection can occur at different levels of offset away from the center of the intersected cylinder.
-> I need to be able to change the y variable without making the hole resulting from the intersection larger.
-> hole = ( y) + y^2 + z^2 < .001;
pipe1 = {RGBColor[0.4, 1, 0.5],
ParametricPlot3D[{Sin[x], Cos[x], v}, {x, -Pi, Pi}, {v, -2, 1.2},
RegionFunction -> Function[{x, y, z}, Evaluate[! hole ]],
Mesh -> None, BoundaryStyle -> Black,
PerformanceGoal -> "Quality"][[1]]};
pipe1cut = {RGBColor[255, 255, 255],
Translate[
ParametricPlot3D[{Sin[x], Cos[x], v}, {x, -Pi, Pi}, {v, -4, 1.2},
RegionFunction -> Function[{x, y, z}, Evaluate[hole]],
Mesh -> None, BoundaryStyle -> Black,
PerformanceGoal -> "Quality"][[1]], {0, 0, 0}]};
pipe2 = {Specularity[0.7], RGBColor[0, 0, 0],
-> The important bit of code is the "hole = ( y) + y^2 + z^2 < .001;"
-> The first y is designed to increase the offset away from the center of the cylinder, however it also makes the hole larger! I need to modify this equation to prevent it from making the hole larger.
I apologize for the exceptionally long post, and I hope my question made sense.
Thanks,
-Jack
URL: , |
|